ot::Module Class Reference

#include <Module.h>

Inheritance diagram for ot::Module:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Module ()
 constructor method
virtual ~Module ()
 virtual destructor (as it befits any true class hierarchy)
virtual void close ()
virtual void init (StringTable &attributes, ConfigNode *localTree)
virtual void pullEvent ()
virtual void pushEvent ()
virtual void start ()
virtual int stop ()
virtual void addNode (const Node *)
virtual void removeNode (Node *)
int isInitialized ()

Static Public Attributes

static Contextcontextx = NULL

Protected Attributes

int initialized
 check if this module appeared in the configuration section
Contextcontext

Friends

class Context

Constructor & Destructor Documentation

ot::Module::Module  )  [inline]
 

constructor method

virtual ot::Module::~Module  )  [inline, virtual]
 

virtual destructor (as it befits any true class hierarchy)


Member Function Documentation

virtual void ot::Module::addNode const Node  )  [inline, virtual]
 

This method should be called by the Node's factory, in order to register the Node with its Module. It should be overloaded by descendants that need to keep track of their Nodes.

Reimplemented in ot::ICubeXModule.

virtual void ot::Module::close  )  [inline, virtual]
 

closes the module. A place for cleanup code etc. This class provides an empty implementation for subclasses not doing anything here.

Reimplemented in ot::ConsoleModule, ot::FileModule, ot::TimeModule, ot::ThreadModule, ot::ARTDataTrackerModule, ot::DynaSightModule, ot::ECGModule, ot::EndoScoutModule, ot::FastTrakModule, ot::FlashpointModule, ot::FOBModule, ot::GENavModule, ot::GPSModule, ot::ICubeXModule, ot::InterSenseModule, ot::LinmouseModule, ot::MagicYModule, ot::MedScanModule, ot::MulticastInputModule, ot::NDIModule, ot::OrientationModule, ot::ParButtonModule, ot::RDSModule, ot::SerButtonModule, ot::SpeechModule, ot::TerasonModule, ot::UltraTrakModule, ot::XSensModule, ot::NetworkSinkModule, ot::NetworkSourceModule, ot::OldOTNetworkSourceModule, and ot::TCPModule.

virtual void ot::Module::init StringTable attributes,
ConfigNode localTree
[inline, virtual]
 

initializes the tracker module. This class provides an implementation that sets the initialization flag to true. Subclasses should call this method, if they override it, before doing anything else. It takes the attributes of the element configuring this module and a local tree consisting of the children of the element. This tree must be build of Nodes.

Parameters:
attributes StringTable of elements attribute values. Should be possibly , but is not for convenience.
localTree pointer to root of configuration nodes tree

Reimplemented in ot::ConsoleModule, ot::FileModule, ot::LogModule, ot::TimeModule, ot::ARTDataTrackerModule, ot::DynaSightModule, ot::ECGModule, ot::EndoScoutModule, ot::FastTrakModule, ot::FlashpointModule, ot::FOBModule, ot::GENavModule, ot::GPSModule, ot::ICubeXModule, ot::InterSenseModule, ot::LinmouseModule, ot::MagicYModule, ot::MedScanModule, ot::MulticastInputModule, ot::NDIModule, ot::OrientationModule, ot::RDSModule, ot::SpeechControlModule, ot::SpeechModule, ot::TerasonModule, ot::UltraTrakModule, ot::NetworkSinkModule, and ot::TCPModule.

int ot::Module::isInitialized  )  [inline]
 

tests whether the module was initialized or not.

Returns:
1 of the module was initialized, 0 otherwise.

virtual void ot::Module::pullEvent  )  [inline, virtual]
 

pulls event information out of the tracker tree. It enables the module to query any EventQueue or TimeDependend node in the shared memory. It is called after pushEvent was executed on each module.

Reimplemented in ot::ConsoleModule, ot::NetworkSinkModule, and ot::TCPModule.

virtual void ot::Module::pushEvent  )  [inline, virtual]
 

pushes event information into the tracker tree. It enables the module to push new data into the tree by updating EventGenerator nodes and thereby triggering an event.

Reimplemented in ot::ButtonHoldFilterModule, ot::CallforwardModule, ot::ConsoleModule, ot::FileModule, ot::InterpolatorModule, ot::TimestampGeneratorModule, ot::TestModule, ot::ARTDataTrackerModule, ot::DynaSightModule, ot::ECGModule, ot::EndoScoutModule, ot::FastTrakModule, ot::FlashpointModule, ot::FOBModule, ot::GENavModule, ot::GPSModule, ot::ICubeXModule, ot::InterSenseModule, ot::LinmouseModule, ot::MagicYModule, ot::MedScanModule, ot::MulticastInputModule, ot::NDIModule, ot::OrientationModule, ot::ParButtonModule, ot::RDSModule, ot::SerButtonModule, ot::SpeechControlModule, ot::SpeechModule, ot::TerasonModule, ot::UltraTrakModule, ot::XSensModule, ot::NetworkSourceModule, and ot::OldOTNetworkSourceModule.

virtual void ot::Module::removeNode Node  )  [inline, virtual]
 

This method deregisters a node from the Module. It is called when removing a node from the graph. It should be overloaded by descendants that need to keep track of their Nodes.

Reimplemented in ot::TestModule.

virtual void ot::Module::start  )  [inline, virtual]
 

This method is called after initialisation is finished and before the main loop is started. It allows the module to finish any setups that need to be done before entering the main loop.

Reimplemented in ot::ConsoleModule, ot::TimeModule, ot::ThreadModule, ot::ARTDataTrackerModule, ot::DynaSightModule, ot::ECGModule, ot::EndoScoutModule, ot::FastTrakModule, ot::FlashpointModule, ot::FOBModule, ot::GENavModule, ot::GPSModule, ot::ICubeXModule, ot::InterSenseModule, ot::LinmouseModule, ot::MagicYModule, ot::MedScanModule, ot::MulticastInputModule, ot::NDIModule, ot::OrientationModule, ot::RDSModule, ot::TerasonModule, ot::UltraTrakModule, ot::XSensModule, ot::NetworkSinkModule, ot::NetworkSourceModule, ot::OldOTNetworkSourceModule, and ot::TCPModule.

virtual int ot::Module::stop  )  [inline, virtual]
 

tests whether the module wants the tracker main loop to stop.

Returns:
1 if main loop should stop, 0 otherwise.

Reimplemented in ot::ConsoleModule, ot::TimeModule, and ot::SpeechControlModule.


Friends And Related Function Documentation

friend class Context [friend]
 


Member Data Documentation

Context* ot::Module::context [protected]
 

pointer to the context this module is working in. It will be set by the initialize method.

Context * ot::Module::contextx = NULL [static]
 

int ot::Module::initialized [protected]
 

check if this module appeared in the configuration section


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:29:04 2007 for NaviTrack by  doxygen 1.4.6