C2DTransformation::const_iterator Class Reference

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

Inherits std::forward_iterator_tag.

## Public Types

typedef size_t | difference_type
| generic name for the difference type of this iterator
typedef std::forward_iterator_tag | iterator_category
| provide the STL with some typedef fro traits
typedef C2DFVector * | pointer
| generic name for the pointer type of this iterator
typedef C2DFVector & | reference
| generic name for the reference type of this iterator
typedef C2DFVector | value_type
| generic name for the value type of this iterator

## Public Member Functions

| const_iterator ()
| const_iterator (const const_iterator &other)
| const_iterator (iterator_impl *holder)
const C2DBounds & | get_size () const
const C2DFVector & | operator* () const
const_iterator & | operator++ ()
const_iterator | operator++ (int)
const_iterator & | operator+= (unsigned int delta)
const C2DFVector * | operator-> () const
const_iterator & | operator= (const const_iterator &other)
const C2DBounds & | pos () 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 142 of file 2d/transform.hh.

## Member Typedef Documentation

## difference_type

typedef size_t C2DTransformation::const_iterator::difference_type

generic name for the difference type of this iterator

Definition at line 153 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 147 of file 2d/transform.hh.

## pointer

typedef C2DFVector* C2DTransformation::const_iterator::pointer

generic name for the pointer type of this iterator

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

## reference

typedef C2DFVector& C2DTransformation::const_iterator::reference

generic name for the reference type of this iterator

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

## value_type

typedef C2DFVector C2DTransformation::const_iterator::value_type

generic name for the value type of this iterator

Definition at line 150 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.

Referenced by const_iterator(), operator++(), operator++(), operator+=(), and operator=().

## const_iterator() [2/3]

C2DTransformation::const_iterator::const_iterator | ( | iterator_impl * | holder | ) |

Constructor to be initialized with "a real implementation"

Parameters

  holder | is 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.

References const_iterator().

## 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

References const_iterator().

## operator++() [2/2]

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

Postfix increment

References const_iterator().

## 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 |

References const_iterator().

## 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.

References const_iterator().

## 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 Symbol Documentation

## operator==

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

friend

References EXPORT_2D.

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

- 2d/transform.hh