OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::CallbackModule Class Reference
[Common Classes]

The module and factory to drive the callback nodes. More...

#include <CallbackModule.h>

Inheritance diagram for ot::CallbackModule:

Inheritance graph
[legend]
Collaboration diagram for ot::CallbackModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CallbackModule ()
virtual ~CallbackModule ()
virtual NodecreateNode (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]

constructor method.

Definition at line 86 of file CallbackModule.h.

virtual ot::CallbackModule::~CallbackModule (  )  [inline, virtual]

Destructor method, clears nodes member.

Definition at line 89 of file CallbackModule.h.


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
Returns:
pointer to new Node or NULL. The new Node must be allocated with new !

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

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:

copyright (c) 2006 Graz University of Technology