te::st::PointCoverageIterator Class Reference

A class to traverse the observations of a PointCoverage. More...

#include <PointCoverageIterator.h>

Public Member Functions

double getDouble (int i) const
 It returns the i-th attribute value as a double pointed by the internal cursor. More...
 
double getDouble () const
 It returns the first attribute value as a double pointed by the internal cursor. More...
 
int getInt (int i) const
 It returns the i-th attribute value as an integer pointed by the internal cursor. More...
 
int getInt () const
 It returns the first attribute value as an integer pointed by the internal cursor. More...
 
te::gm::PointgetLocation () const
 It returns the location pointed by the internal cursor. More...
 
te::dt::AbstractDatagetValue (int i) const
 It returns the i-th attribute value pointed by the internal cursor. More...
 
te::dt::AbstractDatagetValue () const
 It returns the first attribute value pointed by the internal cursor. More...
 
bool operator!= (const PointCoverageIterator &rhs)
 Operator !=. More...
 
PointCoverageObservation operator* () const
 Prefix operator *. More...
 
PointCoverageIteratoroperator++ ()
 Prefix operator ++. More...
 
PointCoverageIterator operator++ (int aux)
 Postfix operator ++. More...
 
PointCoverageIteratoroperator-- ()
 Prefix operator –. More...
 
PointCoverageIterator operator-- (int aux)
 Postfix operator –. More...
 
const PointCoverageIteratoroperator= (const PointCoverageIterator &rhs)
 Assignment operator. More...
 
bool operator== (const PointCoverageIterator &rhs)
 Operator ==. More...
 
 PointCoverageIterator ()
 Empty constructor. More...
 
 PointCoverageIterator (const PointCoverageObservationSet::const_iterator &it)
 Constructor. More...
 
virtual ~PointCoverageIterator ()
 Virtual destructor. More...
 

Private Attributes

PointCoverageObservationSet::const_iterator m_it
 The internal cursor. More...
 

Detailed Description

A class to traverse the observations of a PointCoverage.

This class provides a mechanism to traverse the point coverage observations sequentially.

An example of use:

PointCoverageIterator it = cv.begin(); while(it!=cv.end()) { Point& l = it.getLocation(); double v = it.getDouble(i); //or getValue() or getInt or... ++it; }

See also
PointCoverage

Definition at line 68 of file PointCoverageIterator.h.

Constructor & Destructor Documentation

te::st::PointCoverageIterator::PointCoverageIterator ( )

Empty constructor.

te::st::PointCoverageIterator::PointCoverageIterator ( const PointCoverageObservationSet::const_iterator &  it)

Constructor.

Parameters
itA iterator that points to the point coverage observations
virtual te::st::PointCoverageIterator::~PointCoverageIterator ( )
virtual

Virtual destructor.

Member Function Documentation

double te::st::PointCoverageIterator::getDouble ( int  i) const

It returns the i-th attribute value as a double pointed by the internal cursor.

Parameters
iThe index of the property to be returned.
Returns
The attribute value as a double pointed by the internal cursor.
double te::st::PointCoverageIterator::getDouble ( ) const

It returns the first attribute value as a double pointed by the internal cursor.

Returns
The attribute value as a double pointed by the internal cursor.
int te::st::PointCoverageIterator::getInt ( int  i) const

It returns the i-th attribute value as an integer pointed by the internal cursor.

Parameters
iThe index of the property to be returned.
Returns
The attribute value as an integer pointed by the internal cursor.
int te::st::PointCoverageIterator::getInt ( ) const

It returns the first attribute value as an integer pointed by the internal cursor.

Returns
The first attribute value as an integer pointed by the internal cursor.
te::gm::Point& te::st::PointCoverageIterator::getLocation ( ) const

It returns the location pointed by the internal cursor.

Returns
A reference to the location pointed by the internal cursor.
te::dt::AbstractData* te::st::PointCoverageIterator::getValue ( int  i) const

It returns the i-th attribute value pointed by the internal cursor.

Parameters
iThe index of the property to be returned.
Returns
A pointer to the attribute value pointed by the internal cursor.
Note
The caller will NOT take the ownership of the returned pointer.
te::dt::AbstractData* te::st::PointCoverageIterator::getValue ( ) const

It returns the first attribute value pointed by the internal cursor.

Returns
A pointer to the first attribute value pointed by the internal cursor.
Note
The caller will NOT take the ownership of the returned pointer.
bool te::st::PointCoverageIterator::operator!= ( const PointCoverageIterator rhs)

Operator !=.

PointCoverageObservation te::st::PointCoverageIterator::operator* ( ) const

Prefix operator *.

It returns the item (a shared pointer to a pair of a point and a vector of values) pointed by the internal cursor.

PointCoverageIterator& te::st::PointCoverageIterator::operator++ ( )

Prefix operator ++.

After using this operator, the internal cursor points to the next point coverage observation.

The semantics of prefix is this: Increment the value and then fetch it.

PointCoverageIterator te::st::PointCoverageIterator::operator++ ( int  aux)

Postfix operator ++.

After using this operator, the internal cursor points to the next point coverage observation.

The semantics of postfix is: Fetch the value and then increment the original.

PointCoverageIterator& te::st::PointCoverageIterator::operator-- ( )

Prefix operator –.

After using this operator, the internal cursor points to the preceding point coverage observation.

The semantics of prefix is this: Increment the value and then fetch it.

PointCoverageIterator te::st::PointCoverageIterator::operator-- ( int  aux)

Postfix operator –.

After using this operator, the internal cursor points to the preceding point coverage observation.

The semantics of postfix is: Fetch the value and then increment the original.

const PointCoverageIterator& te::st::PointCoverageIterator::operator= ( const PointCoverageIterator rhs)

Assignment operator.

bool te::st::PointCoverageIterator::operator== ( const PointCoverageIterator rhs)

Operator ==.

Member Data Documentation

PointCoverageObservationSet::const_iterator te::st::PointCoverageIterator::m_it
private

The internal cursor.

Definition at line 203 of file PointCoverageIterator.h.


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