Alida-C++ 0.1
|
Hidden class for operator instance management. More...
#include <ALDOperatorManager.h>
Public Member Functions | |
ALDOperator * | registerOperator (std::string name, ALDOperator *op) |
Registration function for operators. | |
ALDOperator * | getOperator (std::string) |
Returns operator instance corresponding to provided classname. | |
void | printOperatorHash () |
Prints the contents of the hash to standard out. | |
Protected Member Functions | |
_ALDOperatorManager () | |
Default constructor. | |
virtual | ~_ALDOperatorManager () |
Default destructor. | |
Protected Attributes | |
std::map< std::string, ALDOperator * > * | operatorHash |
Map containing registered operators. | |
Friends | |
class | Loki::CreateUsingNew< Alida::_ALDOperatorManager > |
Hidden class for operator instance management.
In this class all operators register on program initialization prior to the run of the main()-function. Afterwards this class can be queried for instances of registered operators, e.g., for generic execution.
The class is encapsulated into a singleton, i.e. not directly accessible from outside.
Instead, refer to the data type ALDOperatorManager for using oeprator manager functionality.
Definition at line 80 of file ALDOperatorManager.h.
Alida::_ALDOperatorManager::_ALDOperatorManager | ( | ) | [protected] |
Default constructor.
The constructor of the operator manager takes care of proper initialization of its operator hash.
Definition at line 54 of file ALDOperatorManager.cc.
virtual Alida::_ALDOperatorManager::~_ALDOperatorManager | ( | ) | [inline, protected, virtual] |
Default destructor.
Definition at line 91 of file ALDOperatorManager.h.
ALDOperator * Alida::_ALDOperatorManager::getOperator | ( | std::string | name | ) |
Returns operator instance corresponding to provided classname.
This function returns a pointer to the prototype instance of the requested operator.
name | of desired operator. |
Definition at line 98 of file ALDOperatorManager.cc.
void Alida::_ALDOperatorManager::printOperatorHash | ( | ) |
Prints the contents of the hash to standard out.
This function prints all registered operator name to standard out.
Definition at line 83 of file ALDOperatorManager.cc.
ALDOperator * Alida::_ALDOperatorManager::registerOperator | ( | std::string | name, |
ALDOperator * | op | ||
) |
Registration function for operators.
Each operator that is supposed to be generically executed is required to register itself in this class using this registration function.
The function basically adds a prototype instance of the operator to the manager's operator hash for later reference. In addition, it returns a pointer to the prototype instance to facilitate dynamic registration during a program's initialization phase (refer to Alida::ALDDataIOManager::registerProvider for details on this mechanism).
name | Operator name to be registered. |
op | Prototype instance of operator class. |
Definition at line 73 of file ALDOperatorManager.cc.
friend class Loki::CreateUsingNew< Alida::_ALDOperatorManager > [friend] |
Definition at line 91 of file ALDOperatorManager.h.
std::map<std::string, ALDOperator*>* Alida::_ALDOperatorManager::operatorHash [protected] |
Map containing registered operators.
Definition at line 85 of file ALDOperatorManager.h.