The processor manager. More...
#include "keyvalue/mngt/ProcessorMngr.h"
Public Member Functions | |
void | add (const Processor *processor) |
Registers a Processor. | |
const Processor & | getProcessor (const string &name) const |
Gets Processor of a given type. | |
Static Public Member Functions | |
static ProcessorMngr & | getInstance () |
Gets the unique instance of this class . | |
Private Types | |
typedef std::map< string, const Processor * > | MapType_ |
Private Attributes | |
MapType_ | map_ |
bool | dummy |
Static Private Attributes | |
static const Processor * | kvProcessors_ [] |
static const Processor * | processors_ [] |
The processor manager.
This class
centralizes the processing of all types of results. It maps Processor's names to a corresponding pointer to Processor.
Given the Processor's name and an input sufficient for the processing, this class
redirects the input to the correct Processor.
This class
is a singleton that is constructed only when its getInstance() method is called for the first time.
static ProcessorMngr& getInstance | ( | ) | [static] |
Gets the unique instance of this class
.
void add | ( | const Processor * | processor | ) |
const Processor& getProcessor | ( | const string & | name | ) | const |
const Processor* kvProcessors_[] [static, private] |
An array of registers of KeyValue Processor implementations is needed to have at least one symbol in KeyValue library which refer to the registers. Otherwise they won't be included by the linker and, consequently, registration won't occur.
This variable is set in keyvalue/mngt/Register.cpp
const Processor* processors_[] [static, private] |
Similarly to kvProcessors_ but for Processors of core library objects and results.
This variable must be set by the bridge library.