ot::CallbackNode Class Reference
[Common Classes]
This class implements a simple node that stores a function pointer and calls it every time an event it received.
More...
#include <CallbackNode.h>
Inheritance diagram for ot::CallbackNode:


Public Member Functions | |
| virtual int | isEventGenerator () |
| virtual void | onEventGenerated (Event &event, Node &generator) |
| const std::string & | getCallbackName (void) const |
Public Attributes | |
| std::string | name |
| CallbackFunction * | function |
| void * | data |
| Event | event |
Protected Member Functions | |
| CallbackNode (const std::string &name_) | |
Friends | |
| class | CallbackModule |
Detailed Description
This class implements a simple node that stores a function pointer and calls it every time an event it received.The event passed to the can be changed by the function and the changes will propagate to the parent node. Furthermore it passes the event on to its single child.
- Author:
- Gerhard Reitmayr
Definition at line 83 of file CallbackNode.h.
Constructor & Destructor Documentation
| ot::CallbackNode::CallbackNode | ( | const std::string & | name_ | ) | [inline, protected] |
constructor method,sets commend member
- Parameters:
-
name_ the name of the Callback node
Definition at line 103 of file CallbackNode.h.
Member Function Documentation
| const std::string& ot::CallbackNode::getCallbackName | ( | void | ) | const [inline] |
This method returns the value set by the name attribute of the CallbackNode.
This is a different value then the one returned by getName() which is the value set by the attribute DEF.
- Returns:
- reference to the name string.
Definition at line 140 of file CallbackNode.h.
References name.
| virtual int ot::CallbackNode::isEventGenerator | ( | ) | [inline, virtual] |
tests for EventGenerator interface being present.
Is overriden to return 1 always.
- Returns:
- always 1
Reimplemented from ot::Node.
Definition at line 114 of file CallbackNode.h.
| virtual void ot::CallbackNode::onEventGenerated | ( | Event & | event, | |
| Node & | generator | |||
| ) | [inline, virtual] |
This method notifies the object that a new event was generated.
- Parameters:
-
event reference to the new event. generator reference to the EventGenerator object that notified the EventObserver.
Reimplemented from ot::Node.
Definition at line 125 of file CallbackNode.h.
Friends And Related Function Documentation
friend class CallbackModule [friend] |
Definition at line 143 of file CallbackNode.h.
Member Data Documentation
| void* ot::CallbackNode::data |
| std::string ot::CallbackNode::name |
name of the CallbackNode for retrieving it from the module.
Note that this is not the name returned by getName(), rather the value set by the attribute name.
Reimplemented from ot::Node.
Definition at line 91 of file CallbackNode.h.
Referenced by getCallbackName().
The documentation for this class was generated from the following file: