Alida-C++ 0.1

Alida::_ALDOperatorManager Class Reference

Hidden class for operator instance management. More...

#include <ALDOperatorManager.h>

Collaboration diagram for Alida::_ALDOperatorManager:

List of all members.

Public Member Functions

ALDOperatorregisterOperator (std::string name, ALDOperator *op)
 Registration function for operators.
ALDOperatorgetOperator (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 >

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
nameof desired operator.
Returns:
Pointer to a prototype instance, might be NULL.

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).

Parameters:
nameOperator name to be registered.
opPrototype instance of operator class.
Returns:
Pointer to prototype instance.

Definition at line 73 of file ALDOperatorManager.cc.


Friends And Related Function Documentation

friend class Loki::CreateUsingNew< Alida::_ALDOperatorManager > [friend]

Definition at line 91 of file ALDOperatorManager.h.


Member Data Documentation

std::map<std::string, ALDOperator*>* Alida::_ALDOperatorManager::operatorHash [protected]

Map containing registered operators.

Definition at line 85 of file ALDOperatorManager.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines