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 ( )
default

Empty constructor.

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

Constructor.

Parameters
itA iterator that points to the point coverage observations

Definition at line 36 of file PointCoverageIterator.cpp.

te::st::PointCoverageIterator::~PointCoverageIterator ( )
virtualdefault

Virtual destructor.

Referenced by getInt().

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.

Definition at line 109 of file PointCoverageIterator.cpp.

References m_it.

Referenced by te::st::IDWInterpolator::estimate().

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.

Definition at line 115 of file PointCoverageIterator.cpp.

References m_it.

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.

Definition at line 121 of file PointCoverageIterator.cpp.

References m_it.

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.

Definition at line 127 of file PointCoverageIterator.cpp.

References m_it, and ~PointCoverageIterator().

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.

Definition at line 92 of file PointCoverageIterator.cpp.

References m_it.

Referenced by te::st::IDWInterpolator::estimate().

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.

Definition at line 97 of file PointCoverageIterator.cpp.

References m_it.

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.

Definition at line 103 of file PointCoverageIterator.cpp.

References m_it.

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

Operator !=.

Definition at line 56 of file PointCoverageIterator.cpp.

References m_it.

te::st::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.

Definition at line 87 of file PointCoverageIterator.cpp.

References m_it.

te::st::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.

Definition at line 61 of file PointCoverageIterator.cpp.

References m_it.

te::st::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.

Definition at line 67 of file PointCoverageIterator.cpp.

References m_it.

te::st::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.

Definition at line 74 of file PointCoverageIterator.cpp.

References m_it.

te::st::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.

Definition at line 80 of file PointCoverageIterator.cpp.

References m_it.

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

Assignment operator.

Definition at line 42 of file PointCoverageIterator.cpp.

References m_it.

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

Operator ==.

Definition at line 51 of file PointCoverageIterator.cpp.

References m_it.

Member Data Documentation

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

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