ot::TestModule Class Reference
[Core Classes]
The module and factory to drive the test source nodes.
More...
#include <TestModule.h>
Inheritance diagram for ot::TestModule:


Public Member Functions | |
| TestModule () | |
| virtual | ~TestModule () |
| virtual Node * | createNode (const std::string &name, StringTable &attributes) |
| virtual void | pushEvent () |
Protected Attributes | |
| NodeVector | nodes |
| int | cycle |
Detailed Description
The module and factory to drive the test source nodes.It constructs TestSource nodes via the NodeFactory interface and pushes events into the tracker tree according to the nodes configuration.
- Author:
- Gerhard Reitmayr
Definition at line 79 of file TestModule.h.
Constructor & Destructor Documentation
| ot::TestModule::TestModule | ( | ) | [inline] |
| ot::TestModule::~TestModule | ( | ) | [virtual] |
Destructor method, clears nodes member.
Definition at line 70 of file TestModule.cxx.
References nodes.
Member Function Documentation
| Node * ot::TestModule::createNode | ( | const std::string & | name, | |
| StringTable & | attributes | |||
| ) | [virtual] |
This method is called to ruct 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 77 of file TestModule.cxx.
References ot::StringTable::containsKey(), ot::TestSource::event, ot::StringTable::get(), ot::Event::getButton(), ot::Event::getConfidence(), ot::Event::getOrientation(), ot::Event::getPosition(), ot::Module::initialized, nodes, and ot::TestSource::noise.
| void ot::TestModule::pushEvent | ( | ) | [virtual] |
pushes events into the tracker tree.
Checks all TestSources and pushes new events, if a TestSource fires.
Reimplemented from ot::Module.
Definition at line 115 of file TestModule.cxx.
Member Data Documentation
int ot::TestModule::cycle [protected] |
current cycle count, for computing when to fire a TestSource
Definition at line 86 of file TestModule.h.
Referenced by pushEvent().
NodeVector ot::TestModule::nodes [protected] |
list of TestSource nodes in the tree
Definition at line 84 of file TestModule.h.
Referenced by createNode(), pushEvent(), and ~TestModule().
The documentation for this class was generated from the following files: