All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 34 of file PointCoverageIterator.cpp.

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

Constructor.

Parameters
itA iterator that points to the point coverage observations

Definition at line 38 of file PointCoverageIterator.cpp.

te::st::PointCoverageIterator::~PointCoverageIterator ( )
virtual

Virtual destructor.

Definition at line 135 of file PointCoverageIterator.cpp.

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 111 of file PointCoverageIterator.cpp.

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 117 of file PointCoverageIterator.cpp.

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 123 of file PointCoverageIterator.cpp.

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 129 of file PointCoverageIterator.cpp.

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 94 of file PointCoverageIterator.cpp.

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 99 of file PointCoverageIterator.cpp.

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 105 of file PointCoverageIterator.cpp.

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

Operator !=.

Definition at line 58 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 89 of file PointCoverageIterator.cpp.

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 63 of file PointCoverageIterator.cpp.

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 69 of file PointCoverageIterator.cpp.

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 76 of file PointCoverageIterator.cpp.

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 82 of file PointCoverageIterator.cpp.

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

Assignment operator.

Definition at line 44 of file PointCoverageIterator.cpp.

References m_it.

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

Operator ==.

Definition at line 53 of file PointCoverageIterator.cpp.

References m_it.

Member Data Documentation

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

The internal cursor.

Definition at line 203 of file PointCoverageIterator.h.

Referenced by operator!=(), operator=(), and operator==().


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