OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

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:

Collaboration graph
[legend]
List of all members.

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
QTableoutput

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]

Destructor method, clears nodes member.

Definition at line 59 of file ToolIOModule.cxx.

References sinks, and sources.


Member Function Documentation

void ToolIOModule::close (  )  [virtual]

On Unix platforms closes curses.

Definition at line 150 of file ToolIOModule.cxx.

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.

References sinks, and sources.

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]

cycle interval to use for printing out events

Definition at line 69 of file ToolIOModule.h.

the table displaying the output information

Definition at line 73 of file ToolIOModule.h.

Referenced by pullEvent(), start(), and ToolIOModule().

int ToolIOModule::quit [protected]

should the module quit ?

Definition at line 71 of file ToolIOModule.h.

Referenced by stop().

list of ConsoleSink nodes in the tree

Definition at line 63 of file ToolIOModule.h.

Referenced by createNode(), pullEvent(), start(), and ~ToolIOModule().

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:

copyright (c) 2006 Graz University of Technology