ot::CallbackModule Class Reference
[Common Classes]
The module and factory to drive the callback nodes.
More...
#include <CallbackModule.h>
Inheritance diagram for ot::CallbackModule:


Public Member Functions | |
| CallbackModule () | |
| virtual | ~CallbackModule () |
| virtual Node * | createNode (const std::string &name, StringTable &attributes) |
| void | setCallback (const std::string &name, CallbackFunction *function, void *data=NULL) |
Protected Attributes | |
| NodeMap | nodes |
Detailed Description
The module and factory to drive the callback nodes.It constructs CallbackNode nodes via the NodeFactory interface and registers callbacks with them after parsing
- Author:
- Gerhard Reitmayr
Definition at line 76 of file CallbackModule.h.
Constructor & Destructor Documentation
| ot::CallbackModule::CallbackModule | ( | ) | [inline] |
| virtual ot::CallbackModule::~CallbackModule | ( | ) | [inline, virtual] |
Member Function Documentation
| Node * ot::CallbackModule::createNode | ( | const std::string & | name, | |
| StringTable & | attributes | |||
| ) | [virtual] |
This method is called to construct a new Node.
It compares name to the TestSource element name, and if it matches creates a new TestSource node.
- Parameters:
-
name reference to string containing element name refenrence to StringMap containing attribute values
Implements ot::NodeFactory.
Definition at line 65 of file CallbackModule.cxx.
References ot::StringTable::get(), LOG_ACE_INFO(), and nodes.
| void ot::CallbackModule::setCallback | ( | const std::string & | name, | |
| CallbackFunction * | function, | |||
| void * | data = NULL | |||
| ) |
sets a callback on a certain node.
The node is identified by its unique name. Any present callback function in the node is overwritten by the new one.
- Parameters:
-
name the unique name of the callback node function the new callback function to set on the node data pointer to data that is passed to the callback function
Definition at line 84 of file CallbackModule.cxx.
References nodes.
Referenced by main().
Member Data Documentation
NodeMap ot::CallbackModule::nodes [protected] |
map of strings onto nodes
Definition at line 81 of file CallbackModule.h.
Referenced by createNode(), and setCallback().
The documentation for this class was generated from the following files: