ot::Module Class Reference
#include <Module.h>
Inheritance diagram for ot::Module:


Public Member Functions | |
| Module () | |
| virtual | ~Module () |
| virtual void | close () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| virtual void | pullEvent () |
| virtual void | pushEvent () |
| virtual void | start () |
| virtual int | stop () |
| int | isInitialized () |
Protected Attributes | |
| int | initialized |
| Context * | context |
Friends | |
| class | Context |
Detailed Description
Definition at line 68 of file Module.h.
Constructor & Destructor Documentation
| virtual ot::Module::~Module | ( | ) | [inline, virtual] |
Member Function Documentation
| 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::ARToolKitModule, ot::CyberMouseModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::InterSenseModule, ot::JoystickModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::OpenVideoModule, ot::P5GloveModule, ot::ParButtonModule, ot::SpaceMouseModule, ot::SpeechModule, ot::TargusModule, ot::UbisenseModule, ot::UltraTrakModule, ot::WacomGraphireModule, ot::XSensModule, ot::NetworkSinkModule, ot::NetworkSourceModule, ot::TCPModule, ot::QtMouseEventCalibModule, ot::QtMouseEventModule, and ot::QtMouseEventModuleBase.
| 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::ARToolKitModule, ot::ARToolKitPlusModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::InterSenseModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::OpenVideoModule, ot::P5GloveModule, ot::SpeechModule, ot::UbisenseModule, ot::UltraTrakModule, ot::CORBAModule, ot::DwarfModule, ot::NetworkSinkModule, ot::TCPModule, ot::VRPNModule, ot::QtMouseEventModule, and ot::QtMouseEventModuleBase.
Definition at line 103 of file Module.h.
Referenced by ot::VRPNModule::init(), ot::UltraTrakModule::init(), ot::TimeModule::init(), ot::TCPModule::init(), ot::SpeechModule::init(), ot::QtMouseEventModuleBase::init(), ot::P5GloveModule::init(), ot::OpenVideoModule::init(), ot::NetworkSinkModule::init(), ot::MulticastInputModule::init(), ot::MagicYModule::init(), ot::LogModule::init(), ot::InterSenseModule::init(), ot::GPSModule::init(), ot::FOBModule::init(), ot::FileModule::init(), ot::FastTrakModule::init(), ot::DynaSightModule::init(), ot::DwarfModule::init(), ot::CORBAModule::init(), ot::ARTDataTrackerModule::init(), ot::ConfigurationParser::parseConfigurationFile(), and ot::SpaceMouseModule::run().
| int ot::Module::isInitialized | ( | ) | [inline] |
tests whether the module was initialized or not.
- Returns:
- 1 of the module was initialized, 0 otherwise.
Definition at line 139 of file Module.h.
Referenced by ot::WacomGraphireModule::close(), ot::TCPModule::close(), ot::SpaceMouseModule::close(), ot::P5GloveModule::close(), ot::FOBModule::close(), ot::FastTrakModule::close(), ot::DynaSightModule::close(), ot::CyberMouseModule::close(), ot::GPSModule::createNode(), ot::SpaceMouseModule::processMessages(), ot::TCPModule::pullEvent(), ot::WacomGraphireModule::pushEvent(), ot::SpaceMouseModule::pushEvent(), ot::P5GloveModule::pushEvent(), ot::MulticastInputModule::pushEvent(), ot::JoystickModule::pushEvent(), ot::FOBModule::pushEvent(), ot::FastTrakModule::pushEvent(), ot::DynaSightModule::pushEvent(), ot::CyberMouseModule::pushEvent(), ot::ARTDataTrackerModule::pushEvent(), ot::WacomGraphireModule::start(), ot::UltraTrakModule::start(), ot::TimeModule::start(), ot::TCPModule::start(), ot::SpaceMouseModule::start(), ot::P5GloveModule::start(), ot::MulticastInputModule::start(), ot::MagicYModule::start(), ot::JoystickModule::start(), ot::GPSModule::start(), ot::FOBModule::start(), ot::FastTrakModule::start(), ot::DynaSightModule::start(), ot::CyberMouseModule::start(), and ot::ARTDataTrackerModule::start().
| 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::DwarfModule, ot::NetworkSinkModule, ot::TCPModule, ot::VRPNModule, ot::QtMouseEventModule, and ot::QtMouseEventModuleBase.
| 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::ConsoleModule, ot::FileModule, ot::InterpolatorModule, ot::TestModule, ot::ARTDataTrackerModule, ot::ARToolKitModule, ot::ARToolKitPlusModule, ot::CyberMouseModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::InterSenseModule, ot::JoystickModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::P5GloveModule, ot::ParButtonModule, ot::SpaceMouseModule, ot::SpeechModule, ot::TargusModule, ot::UbisenseModule, ot::UltraTrakModule, ot::WacomGraphireModule, ot::XSensModule, ot::CORBAModule, ot::DwarfModule, ot::NetworkSourceModule, ot::VRPNModule, and ot::QtMouseEventModuleBase.
| 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::ARToolKitModule, ot::CyberMouseModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::InterSenseModule, ot::JoystickModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::OpenVideoModule, ot::P5GloveModule, ot::SpaceMouseModule, ot::TargusModule, ot::UbisenseModule, ot::UltraTrakModule, ot::WacomGraphireModule, ot::XSensModule, ot::NetworkSinkModule, ot::NetworkSourceModule, ot::TCPModule, ot::VRPNModule, ot::QtMouseEventModule, and ot::QtMouseEventModuleBase.
Definition at line 126 of file Module.h.
Referenced by ot::NetworkSinkModule::start().
| 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::QtMouseEventModuleBase.
Definition at line 131 of file Module.h.
Referenced by ot::ARToolKitPlusModule::ARToolKitPlusModule(), ot::UltraTrakModule::close(), ot::SpaceMouseModule::close(), ot::MulticastInputModule::close(), ot::MagicYModule::close(), ot::JoystickModule::close(), ot::FOBModule::close(), ot::FastTrakModule::close(), ot::DynaSightModule::close(), ot::ARTDataTrackerModule::close(), ot::MulticastInputModule::createNode(), ot::ARTDataTrackerModule::createNode(), ot::DynaSightModule::DynaSightModule(), ot::MagicYModule::receive(), ot::UltraTrakModule::run(), ot::SpaceMouseModule::run(), ot::MulticastInputModule::run(), ot::MagicYModule::run(), ot::JoystickModule::run(), ot::FOBModule::run(), ot::FastTrakModule::run(), ot::DynaSightModule::run(), ot::ARTDataTrackerModule::run(), ot::NetworkSourceModule::runMulticastReceiver(), ot::NetworkSourceModule::runUnicastTransceiver(), and ot::NetworkSinkModule::runUnicastTransceiver().
Friends And Related Function Documentation
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.
Reimplemented in ot::OpenVideoModule.
Definition at line 77 of file Module.h.
Referenced by ot::Context::addModule(), ot::FileModule::createNode(), ot::ARToolKitPlusModule::createNode(), and ot::ARToolKitPlusModule::init().
int ot::Module::initialized [protected] |
check if this module appeared in the configuration section
Definition at line 73 of file Module.h.
Referenced by ot::XSensModule::createNode(), ot::TestModule::createNode(), ot::SpeechModule::createNode(), ot::SpaceMouseModule::createNode(), ot::InterpolatorModule::createNode(), ot::ButtonHoldFilterModule::createNode(), ot::ARToolKitPlusModule::init(), ot::ARToolKitPlusModule::newVideoFrame(), ot::SpaceMouseModule::run(), ot::WacomGraphireModule::start(), ot::FOBModule::start(), and ot::FastTrakModule::start().
The documentation for this class was generated from the following file: