OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::KeyIterator Class Reference
[Core Classes]

This is a little helper class that iterates through the keys in a StringTable. More...

#include <StringTable.h>

List of all members.


Public Member Functions

 KeyIterator (StringTable &table)
int hasMoreKeys () const
const std::string & nextElement ()

Protected Attributes

StringMap::const_iterator it
StringMapmap

Detailed Description

This is a little helper class that iterates through the keys in a StringTable.

You cannot reset the Iterator.

Author:
Gerhard Reitmayr

Definition at line 202 of file StringTable.h.


Constructor & Destructor Documentation

ot::KeyIterator::KeyIterator ( StringTable table  )  [inline]

constructor to create a new KeyIterator for a given StringTable.

It initializes the iterator and sets it to the first key.

Parameters:
table the StringTable to iterate through

Definition at line 214 of file StringTable.h.


Member Function Documentation

int ot::KeyIterator::hasMoreKeys (  )  const

tests if there are more keys to see.

Returns:
0 if no more keys are left, 1 otherwise

Definition at line 252 of file StringTable.cxx.

References it, and map.

Referenced by ot::QtMouseEventModuleBase::createNode(), ot::Context::createNode(), ot::OTQtMEMCalibProc::exec(), ot::QtMouseEventModule::init(), and nextElement().

const std::string & ot::KeyIterator::nextElement (  ) 

returns the key at the current location and advances the iterator by one.

Returns:
the key string at the current location.

Definition at line 257 of file StringTable.cxx.

References ot::empty(), hasMoreKeys(), and it.

Referenced by ot::QtMouseEventModuleBase::createNode(), ot::Context::createNode(), ot::OTQtMEMCalibProc::exec(), and ot::QtMouseEventModule::init().


Member Data Documentation

StringMap::const_iterator ot::KeyIterator::it [protected]

iterator to keep track of the KeyIterator

Definition at line 205 of file StringTable.h.

Referenced by hasMoreKeys(), and nextElement().

the actual StringMap we are working with

Definition at line 207 of file StringTable.h.

Referenced by hasMoreKeys().


The documentation for this class was generated from the following files:

copyright (c) 2006 Graz University of Technology