range2d_iterator< I > Class Template Reference

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

Inherits std::iterator< std::forward_iterator_tag, I::value_type >.

## Public Types

typedef I | internal_iterator
| data type for the real iterator in the background
typedef I::pointer | pointer
| data type pointer
typedef I::reference | reference
| data type reference
typedef I::value_type | value_type

## Public Member Functions

internal_iterator | get_point ()
reference | operator* () const
range2d_iterator< I > & | operator++ ()
| prefix increment
range2d_iterator< I > | operator++ (int)
| postfix increment
pointer | operator-> () const
template<typename AI>
range2d_iterator< I > & | operator= (const range2d_iterator< AI > &other)
range2d_iterator< I > & | operator= (const range2d_iterator< I > &other)
| assignment operator
const reference | operator[] (int i) const
const C2DBounds & | pos () const
| range2d_iterator ()
| range2d_iterator (const C2DBounds &pos)
| range2d_iterator (const C2DBounds &pos, const C2DBounds &size, const C2DBounds &start, const C2DBounds &end, I iterator)
template<typename AI>
| range2d_iterator (const range2d_iterator< AI > &other)
| range2d_iterator (const range2d_iterator< I > &other)
| copy constructore
range2d_iterator_with_boundary_flag< I > | with_boundary_flag () const

## Friends

template<typename AI>
class | range2d_iterator
| friend iterator type because we may want to copy a iterator to a const_iterator.

## Detailed Description

template<typename I>
class range2d_iterator< I >

Definition at line 215 of file 2d/iterator.hh.

## Member Typedef Documentation

## internal_iterator

template<typename I>

typedef I range2d_iterator< I >::internal_iterator

data type for the real iterator in the background

Definition at line 223 of file 2d/iterator.hh.

## pointer

template<typename I>

typedef I::pointer range2d_iterator< I >::pointer

data type pointer

Definition at line 221 of file 2d/iterator.hh.

## reference

template<typename I>

typedef I::reference range2d_iterator< I >::reference

data type reference

Definition at line 219 of file 2d/iterator.hh.

## value_type

template<typename I>

typedef I::value_type range2d_iterator< I >::value_type

Definition at line 225 of file 2d/iterator.hh.

## Constructor & Destructor Documentation

## range2d_iterator() [1/5]

template<typename I>

range2d_iterator< I >::range2d_iterator | ( |  | ) |

standard constructor

## range2d_iterator() [2/5]

template<typename I>

range2d_iterator< I >::range2d_iterator | ( | const C2DBounds & | pos,
|  | const C2DBounds & | size,
|  | const C2DBounds & | start,
|  | const C2DBounds & | end,
|  | I | iterator )

Full constructor of the range iterator

Parameters

  pos | iterator position to initialize the iterator with
  size | size of the original data field
  start | start of the iterator range
  end | end of the iterator range
  iterator | the iterator of the underlying 2D data structure

References pos().

## range2d_iterator() [3/5]

template<typename I>

range2d_iterator< I >::range2d_iterator | ( | const C2DBounds & | pos | ) |

End iterator, can't be dereferenced This iterator is only there to define the end position of the range_iterator.

Parameters

  pos | end position to set this iterator to.

References pos().

## range2d_iterator() [4/5]

template<typename I>

range2d_iterator< I >::range2d_iterator | ( | const range2d_iterator< I > & | other | ) |

copy constructore

References range2d_iterator.

## range2d_iterator() [5/5]

template<typename I>
template<typename AI>

range2d_iterator< I >::range2d_iterator | ( | const range2d_iterator< AI > & | other | ) |

Constructor to construct the iterator from one that is based on another iterator type. The usual idea is that a iterator may be converted into it's const variant.

Template Parameters

  AI | the other iterator type. Iterator type I must be copy-constructable from type AI

Parameters

  other |

Definition at line 342 of file 2d/iterator.hh.

References range2d_iterator.

## Member Function Documentation

## get_point()

template<typename I>

internal_iterator range2d_iterator< I >::get_point | ( |  | ) |

Return the internal iterator

## operator*()

template<typename I>

reference range2d_iterator< I >::operator* | ( |  | ) | const

Returns
  current value the iterator points to

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

template<typename I>

range2d_iterator< I > & range2d_iterator< I >::operator++ | ( |  | ) |

prefix increment

References range2d_iterator.

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

template<typename I>

range2d_iterator< I > range2d_iterator< I >::operator++ | ( | int |  | ) |

postfix increment

References range2d_iterator.

## operator->()

template<typename I>

pointer range2d_iterator< I >::operator-> | ( |  | ) | const

Returns
  pointer to the current value the iterator points to

## operator=() [1/2]

template<typename I>
template<typename AI>

range2d_iterator< I > & range2d_iterator< I >::operator= | ( | const range2d_iterator< AI > & | other | ) |

Assignment operator from another type of iterator

Template Parameters

  AI | other iterator type. The assignment I b = a; with a of type AI must be defined.

Parameters

  other |

Definition at line 329 of file 2d/iterator.hh.

References range2d_iterator.

## operator=() [2/2]

template<typename I>

range2d_iterator< I > & range2d_iterator< I >::operator= | ( | const range2d_iterator< I > & | other | ) |

assignment operator

References range2d_iterator.

## operator[]()

template<typename I>

const range2d_iterator< I >::reference range2d_iterator< I >::operator[] | ( | int | i | ) | const

access elements relative to the iterator position

Definition at line 380 of file 2d/iterator.hh.

## pos()

template<typename I>

const C2DBounds & range2d_iterator< I >::pos | ( |  | ) | const

Returns
  the current position within the 2D grid with respect to the full size of the grid.

References range2d_iterator.

Referenced by range2d_iterator(), and range2d_iterator().

## with_boundary_flag()

template<typename I>

range2d_iterator_with_boundary_flag< I > range2d_iterator< I >::with_boundary_flag | ( |  | ) | const

## Friends And Related Symbol Documentation

## range2d_iterator

template<typename I>
template<typename AI>

friend class range2d_iterator

friend

friend iterator type because we may want to copy a iterator to a const_iterator.

Definition at line 256 of file 2d/iterator.hh.

References range2d_iterator.

Referenced by operator++(), operator++(), operator=(), operator=(), pos(), range2d_iterator(), range2d_iterator, and range2d_iterator().

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

- 2d/iterator.hh