C2DTransformation::const_iterator Class Reference

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

Inherits forward_iterator_tag.

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 C2DBoundsget_size () const
 
const C2DFVectoroperator* () const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator+= (unsigned int delta)
 
const C2DFVectoroperator-> () const
 
const_iteratoroperator= (const const_iterator &other)
 
const C2DBoundspos () const
 
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

◆ difference_type

generic name for the difference type of this iterator

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

◆ iterator_category

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.

◆ pointer

generic name for the pointer type of this iterator

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

◆ reference

generic name for the reference type of this iterator

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

◆ value_type

generic name for the value type of this iterator

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

Constructor & Destructor Documentation

◆ const_iterator() [1/3]

C2DTransformation::const_iterator::const_iterator ( )

Standard constructor

Remarks
constructed like this the iterator is not usable.

◆ const_iterator() [2/3]

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

◆ const_iterator() [3/3]

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

◆ get_size()

const C2DBounds& C2DTransformation::const_iterator::get_size ( ) const

◆ operator*()

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

◆ operator++() [1/2]

const_iterator& C2DTransformation::const_iterator::operator++ ( )

Prefix increment

◆ operator++() [2/2]

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

Postfix increment

◆ operator+=()

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

◆ operator->()

const C2DFVector* C2DTransformation::const_iterator::operator-> ( ) const
Returns
the pointer version of the current value of the transformation

◆ operator=()

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.

◆ pos()

const C2DBounds& C2DTransformation::const_iterator::pos ( ) const

◆ print()

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

◆ operator==

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: