glove::devices::CyberGlove::CyberGlove::sensor_iterator Class Reference

#include <CyberGlove.hpp>

List of all members.

Public Member Functions

 sensor_iterator (CyberGlove &glove)
virtual ~sensor_iterator ()
sensor_iteratoroperator= (const Sensor s)
sensor_iteratoroperator++ ()
sensor_iterator operator++ (int unused)
sensor_iteratoroperator+= (const unsigned int i)
unsigned int operator* () const
bool operator== (sensor_iterator &itr)
bool operator!= (sensor_iterator &itr)


Detailed Description

An iterator for sensor values according to the order that is described in the documentation of the getValue() function of the CyberGlove class. By increasing the iterator position, it directly jumps sensors that are disabled.

Author:
Christian Wressnegger
Date:
2009-2010

Constructor & Destructor Documentation

glove::devices::CyberGlove::CyberGlove::sensor_iterator::sensor_iterator ( CyberGlove glove  ) 

The constructor that associates this iterator with a concrete CyberGlove object.

Parameters:
glove The CyberGlove object that corresponds to this iterator.

virtual glove::devices::CyberGlove::CyberGlove::sensor_iterator::~sensor_iterator (  )  [virtual]

The desctructor.


Member Function Documentation

bool glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator!= ( sensor_iterator itr  ) 

Compares this iterator with another sensor_iterator.

Parameters:
itr The sensor_iterator to compare to.
Returns:
An boolean value that indicates if this sensor_iterator mismatches the one passed as parameter.

unsigned int glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator* (  )  const

Dereferences this iterator. If the iterator is invalid (ran out of range) this operator returns -1.

Returns:
The CyberGlove::Sensor identifier that corresponds to this iterator.

sensor_iterator glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator++ ( int  unused  ) 

Increases the iterator by one and automatically jumps disabled sensors.

Parameters:
unused Indicates that it is a postfix operator.

sensor_iterator& glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator++ (  ) 

Increases the iterator by one and automatically jumps disabled sensors.

sensor_iterator& glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator+= ( const unsigned int  i  ) 

Increases the iterator by the given value and automatically jumps disabled sensors.

sensor_iterator& glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator= ( const Sensor  s  ) 

Assigns a specific sensor identifier as starting point to this iterator.

Exceptions:
std::invalid_argument If the CyberGlove::Sensor identifier is invalid
Parameters:
s The CyberGlove::Sensor identifier assigned to this iterator.

bool glove::devices::CyberGlove::CyberGlove::sensor_iterator::operator== ( sensor_iterator itr  ) 

Compares this iterator with another sensor_iterator.

Parameters:
itr The sensor_iterator to compare to.
Returns:
An boolean value that indicates if this sensor_iterator equals the one passed as parameter.


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

Generated on Thu Feb 4 12:36:53 2010 for libglove by  doxygen 1.5.8