JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Types | Public Member Functions
joda::docparsing::DefaultContainerScheduler< meta > Class Template Reference

#include <DefaultContainerScheduler.h>

Public Types

typedef short ContainerIdentifier
 

Public Member Functions

 DefaultContainerScheduler (JsonContainerQueue::queue_t *queue, size_t contSize=0)
 
ContainerIdentifier getContainerForDoc (const RJDocument &doc)
 
ContainerIdentifier getContainerForDoc (std::string &raw)
 
ContainerIdentifier getContainerForDoc (rapidjson::IStreamWrapper &stream)
 
void scheduleDocument (ContainerIdentifier id, std::unique_ptr< RJDocument > &&doc, std::unique_ptr< IOrigin > &&origin, size_t size)
 
std::unique_ptr< RJDocumentgetNewDoc (ContainerIdentifier id)
 
void finalize ()
 
virtual ~DefaultContainerScheduler ()=default
 
void scheduleDocument (ContainerIdentifier, std::unique_ptr< RJDocument > &&doc, std::unique_ptr< IOrigin > &&origin, size_t size)
 
void scheduleDocument (ContainerIdentifier, std::unique_ptr< RJDocument > &&doc, std::unique_ptr< IOrigin > &&origin, size_t size)
 
void finalize ()
 
void finalize ()
 

Detailed Description

template<bool meta>
class joda::docparsing::DefaultContainerScheduler< meta >

A document scheduler scheduling the documents into the same container

Template Parameters
metaIf the Container should be meta finalized or really finalized

Member Typedef Documentation

◆ ContainerIdentifier

template<bool meta>
typedef short joda::docparsing::DefaultContainerScheduler< meta >::ContainerIdentifier

Constructor & Destructor Documentation

◆ DefaultContainerScheduler()

template<bool meta>
joda::docparsing::DefaultContainerScheduler< meta >::DefaultContainerScheduler ( JsonContainerQueue::queue_t queue,
size_t  contSize = 0 
)

Constructs a scheduler for use within the parsers.

Parameters
queueThe container queue to use to pass finalized containers through.
contSizeThe size of newly constructed containers.

◆ ~DefaultContainerScheduler()

template<bool meta>
virtual joda::docparsing::DefaultContainerScheduler< meta >::~DefaultContainerScheduler ( )
virtualdefault

Member Function Documentation

◆ finalize() [1/3]

void joda::docparsing::DefaultContainerScheduler< true >::finalize ( )

◆ finalize() [2/3]

void joda::docparsing::DefaultContainerScheduler< false >::finalize ( )

◆ finalize() [3/3]

template<bool meta>
void joda::docparsing::DefaultContainerScheduler< meta >::finalize ( )

Finalizes the Scheduler. Has to be called before deconstructing it.

◆ getContainerForDoc() [1/3]

template<bool meta>
joda::docparsing::DefaultContainerScheduler< meta >::ContainerIdentifier joda::docparsing::DefaultContainerScheduler< meta >::getContainerForDoc ( const RJDocument doc)

Always returns 0, as this scheduler does not require an id

Parameters
docThe document
Returns
0

◆ getContainerForDoc() [2/3]

template<bool meta>
joda::docparsing::DefaultContainerScheduler< meta >::ContainerIdentifier joda::docparsing::DefaultContainerScheduler< meta >::getContainerForDoc ( rapidjson::IStreamWrapper &  stream)

Always returns 0, as this scheduler does not require an id

Parameters
streamThe stream to check against
Returns
0

◆ getContainerForDoc() [3/3]

template<bool meta>
joda::docparsing::DefaultContainerScheduler< meta >::ContainerIdentifier joda::docparsing::DefaultContainerScheduler< meta >::getContainerForDoc ( std::string &  raw)

Always returns 0, as this scheduler does not require an id

Parameters
rawThe document in string representation (before parsing)
Returns
0

◆ getNewDoc()

template<bool meta>
std::unique_ptr< RJDocument > joda::docparsing::DefaultContainerScheduler< meta >::getNewDoc ( ContainerIdentifier  id)

Returns a document initialized with the allocator of the container represented by id

Parameters
idThe id representing the container
Returns
A new document

◆ scheduleDocument() [1/3]

template<bool meta>
void joda::docparsing::DefaultContainerScheduler< meta >::scheduleDocument ( ContainerIdentifier  id,
std::unique_ptr< RJDocument > &&  doc,
std::unique_ptr< IOrigin > &&  origin,
size_t  size 
)

Schedules the document into the container given by id.

Parameters
idThe id of the container
docThe document to schedule
originThe origin of the document
sizeThe size of the document (bytes)

◆ scheduleDocument() [2/3]

void joda::docparsing::DefaultContainerScheduler< true >::scheduleDocument ( ContainerIdentifier  ,
std::unique_ptr< RJDocument > &&  doc,
std::unique_ptr< IOrigin > &&  origin,
size_t  size 
)

◆ scheduleDocument() [3/3]

void joda::docparsing::DefaultContainerScheduler< false >::scheduleDocument ( ContainerIdentifier  ,
std::unique_ptr< RJDocument > &&  doc,
std::unique_ptr< IOrigin > &&  origin,
size_t  size 
)

The documentation for this class was generated from the following files: