Public Types | Public Member Functions | Friends
C2DTransformation::const_iterator Class Reference

#include <mia/2d/transform.hh>

Inheritance diagram for C2DTransformation::const_iterator:

Public Types

typedef size_t difference_type
 generic name for the difference type of this iterator More...
 
typedef std::forward_iterator_tag iterator_category
 provide the STL with some typedef fro traits More...
 
typedef C2DFVectorpointer
 generic name for the pointer type of this iterator More...
 
typedef C2DFVectorreference
 generic name for the reference type of this iterator More...
 
typedef C2DFVector value_type
 generic name for the value type of this iterator More...
 

Public Member Functions

 const_iterator ()
 
 const_iterator (iterator_impl *holder)
 
 const_iterator (const const_iterator &other)
 
const C2DFVectoroperator* () const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator+= (unsigned int delta)
 
const C2DFVectoroperator-> () const
 
const_iteratoroperator= (const const_iterator &other)
 
void print (std::ostream &os) const
 

Friends

EXPORT_2D bool operator== (const C2DTransformation::const_iterator &a, const C2DTransformation::const_iterator &b)
 

Detailed Description

Iterator to iterator over the grid points of the supported range

Todo:
this iterator shouldn't be here, but should be a separate class not bound to the 2D transformation

Definition at line 140 of file 2d/transform.hh.

Member Typedef Documentation

generic name for the difference type of this iterator

Definition at line 150 of file 2d/transform.hh.

typedef std::forward_iterator_tag C2DTransformation::const_iterator::iterator_category

provide the STL with some typedef fro traits

Definition at line 144 of file 2d/transform.hh.

generic name for the pointer type of this iterator

Definition at line 153 of file 2d/transform.hh.

generic name for the reference type of this iterator

Definition at line 156 of file 2d/transform.hh.

generic name for the value type of this iterator

Definition at line 147 of file 2d/transform.hh.

Constructor & Destructor Documentation

C2DTransformation::const_iterator::const_iterator ( )

Standard constructor

Remarks
constructed like this the iterator is not usable.
C2DTransformation::const_iterator::const_iterator ( iterator_impl holder)

Constructor to be initialized with "a real implementation"

Parameters
holderis the implementation that does all the real work and depends on the transformation
C2DTransformation::const_iterator::const_iterator ( const const_iterator other)

Copy Constructor impelemnts the deep copy of the holder The pointer to the holder is not shared but cloned.

Member Function Documentation

const C2DFVector& C2DTransformation::const_iterator::operator* ( ) const
Returns
the current value of the transformation
const_iterator& C2DTransformation::const_iterator::operator++ ( )

Prefix increment

const_iterator C2DTransformation::const_iterator::operator++ ( int  )

Postfix increment

const_iterator& C2DTransformation::const_iterator::operator+= ( unsigned int  delta)

Advance a certain amount of steps. This implementation will ususlly be fatser than the generic std::advance function, since for forward_iterators std::advance calls "++" delta times

Parameters
delta
const C2DFVector* C2DTransformation::const_iterator::operator-> ( ) const
Returns
the pointer version of the current value of the transformation
const_iterator& C2DTransformation::const_iterator::operator= ( const const_iterator other)

Assignment operator implemnts the deep copy of the holder The pointer to the holder is not shared but cloned.

void C2DTransformation::const_iterator::print ( std::ostream &  os) const

Print the current position and value to an output stream

Parameters
os

Referenced by operator<<().

Friends And Related Function Documentation

EXPORT_2D bool operator== ( const C2DTransformation::const_iterator a,
const C2DTransformation::const_iterator b 
)
friend

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