ToolIOModule Class Reference
[Tool Classes]

#include <ToolIOModule.h>

List of all members.


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


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
 list of ConsoleSink nodes in the tree
NodeVector sources
 list of ConsoleSource nodes in the tree
int cycle
 current cycle count, for computing when to print out the event again
int interval
 cycle interval to use for printing out events
int quit
 should the module quit ?
QTable * output
 the table displaying the output information


Constructor & Destructor Documentation

ToolIOModule::ToolIOModule QTable *  out_  ) 
 

constructor method. initializes internal and static data such as the functionMap and keyMap tables.

ToolIOModule::~ToolIOModule  )  [virtual]
 

Destructor method, clears nodes member.


Member Function Documentation

void ToolIOModule::close  )  [virtual]
 

On Unix platforms closes curses.

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 !

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

void ToolIOModule::pullEvent  )  [virtual]
 

reads out the ConsoleSink nodes current event an prints it to the console. This is done only each length cylce.

void ToolIOModule::start  )  [virtual]
 

On Unix platforms initializes curses. This method is called after initialisation is finished and before the main loop is started.

int ToolIOModule::stop  )  [virtual]
 

tests whether a key was pressed, if so it stops.

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


Member Data Documentation

int ToolIOModule::cycle [protected]
 

current cycle count, for computing when to print out the event again

int ToolIOModule::interval [protected]
 

cycle interval to use for printing out events

QTable* ToolIOModule::output [protected]
 

the table displaying the output information

int ToolIOModule::quit [protected]
 

should the module quit ?

NodeVector ToolIOModule::sinks [protected]
 

list of ConsoleSink nodes in the tree

NodeVector ToolIOModule::sources [protected]
 

list of ConsoleSource nodes in the tree


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