ToolIOModule Class Reference
[Tool Classes]
This module substitutes the usuall ConsoleModule in an OpenTracker Context and takes over its nodes and configuration.
More...
#include <ToolIOModule.h>
Collaboration diagram for ToolIOModule:

Public Member Functions | |
| ToolIOModule (QTable *out_) | |
| virtual | ~ToolIOModule () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| virtual Node * | createNode (const std::string &name, StringTable &attributes) |
| virtual void | pullEvent () |
| virtual void | start () |
| virtual void | close () |
| virtual int | stop () |
Protected Attributes | |
| NodeVector | sinks |
| NodeVector | sources |
| int | cycle |
| int | interval |
| int | quit |
| QTable * | output |
Detailed Description
This module substitutes the usuall ConsoleModule in an OpenTracker Context and takes over its nodes and configuration.It does not implement ConsoleSources with keyboard events, but will at some event provide a special user interface to do so. Until then it will only output stuff.
- Author:
- Gerhard Reitmayr
Definition at line 58 of file ToolIOModule.h.
Constructor & Destructor Documentation
| ToolIOModule::ToolIOModule | ( | QTable * | out_ | ) |
constructor method.
initializes internal and static data such as the functionMap and keyMap tables.
Definition at line 51 of file ToolIOModule.cxx.
References output, and QTable::setNumRows().
| ToolIOModule::~ToolIOModule | ( | ) | [virtual] |
Member Function Documentation
| void ToolIOModule::close | ( | ) | [virtual] |
| Node * ToolIOModule::createNode | ( | const std::string & | name, | |
| StringTable & | attributes | |||
| ) | [virtual] |
This method is called to ruct a new Node.
It compares name to the ConsoleSink element name, and if it matches creates a new ConsoleSink node.
- Parameters:
-
name reference to string containing element name refenrence to StringTable containing attribute values
- Returns:
- pointer to new Node or NULL. The new Node must be allocated with new !
Definition at line 74 of file ToolIOModule.cxx.
| void ToolIOModule::init | ( | StringTable & | attributes, | |
| ConfigNode * | localTree | |||
| ) | [virtual] |
initializes the tracker module.
- Parameters:
-
attributes StringTable of elements attribute values. Should be possibly , but is not for convenience. localTree pointer to root of configuration nodes tree
Definition at line 67 of file ToolIOModule.cxx.
| void ToolIOModule::pullEvent | ( | ) | [virtual] |
reads out the ConsoleSink nodes current event an prints it to the console.
This is done only each length cylce.
Definition at line 104 of file ToolIOModule.cxx.
References output, QTable::setText(), sinks, and QString::sprintf().
| void ToolIOModule::start | ( | ) | [virtual] |
On Unix platforms initializes curses.
This method is called after initialisation is finished and before the main loop is started.
Definition at line 137 of file ToolIOModule.cxx.
References output, QHeader::setLabel(), QTable::setNumRows(), sinks, and QTable::verticalHeader().
| int ToolIOModule::stop | ( | ) | [virtual] |
tests whether a key was pressed, if so it stops.
- Returns:
- 1 if main loop should stop, 0 otherwise.
Definition at line 154 of file ToolIOModule.cxx.
References quit.
Member Data Documentation
int ToolIOModule::cycle [protected] |
current cycle count, for computing when to print out the event again
Definition at line 67 of file ToolIOModule.h.
int ToolIOModule::interval [protected] |
QTable* ToolIOModule::output [protected] |
the table displaying the output information
Definition at line 73 of file ToolIOModule.h.
Referenced by pullEvent(), start(), and ToolIOModule().
int ToolIOModule::quit [protected] |
NodeVector ToolIOModule::sinks [protected] |
list of ConsoleSink nodes in the tree
Definition at line 63 of file ToolIOModule.h.
Referenced by createNode(), pullEvent(), start(), and ~ToolIOModule().
NodeVector ToolIOModule::sources [protected] |
list of ConsoleSource nodes in the tree
Definition at line 65 of file ToolIOModule.h.
Referenced by createNode(), and ~ToolIOModule().
The documentation for this class was generated from the following files: