range3d_iterator< I > Class Template Reference

a 3D iterator that knows its position in the 3D grid ans supports iterating over sub-ranges More...

#include <mia/3d/iterator.hh>

Inherits forward_iterator_tag.

Public Types

typedef I internal_iterator
 data type for the real iterator in the background More...
 
typedef I::pointer pointer
 data type pointer More...
 
typedef I::reference reference
 data type reference More...
 
typedef I::value_type value_type
 data value type More...
 

Public Member Functions

internal_iterator get_point ()
 
reference operator* () const
 
range3d_iterator< I > & operator++ ()
 prefix increment More...
 
range3d_iterator< I > operator++ (int)
 postfix increment More...
 
pointer operator-> () const
 
range3d_iterator< I > & operator= (const range3d_iterator< I > &other)
 assignment operator More...
 
template<typename AI >
range3d_iterator< I > & operator= (const range3d_iterator< AI > &other)
 
const reference operator[] (int i) const
 
const C3DBoundspos () const
 
 range3d_iterator ()
 
 range3d_iterator (const C3DBounds &pos, const C3DBounds &size, const C3DBounds &start, const C3DBounds &end, I iterator)
 
 range3d_iterator (const C3DBounds &pos)
 
 range3d_iterator (const range3d_iterator< I > &other)
 copy constructore More...
 
template<typename AI >
 range3d_iterator (const range3d_iterator< AI > &other)
 
range3d_iterator_with_boundary_flag< I > with_boundary_flag () const
 

Friends

template<typename AI >
class range3d_iterator
 friend iterator type because we may want to copy a iterator to a const_iterator. More...
 
template<typename AI >
class range3d_iterator_with_boundary_flag
 friend iterator type because we may want to copy a iterator to a const_iterator. More...
 

Detailed Description

template<typename I>
class range3d_iterator< I >

a 3D iterator that knows its position in the 3D grid ans supports iterating over sub-ranges

Iterator to iterate over a sub-range of 3D data that is given on a grid. Two iterators are considered to be equal, if their positions are equal.

Template Parameters
theinternal iterator that is used to iterate of the original grid without skipping.

Definition at line 189 of file 3d/iterator.hh.

Member Typedef Documentation

◆ internal_iterator

template<typename I>
typedef I range3d_iterator< I >::internal_iterator

data type for the real iterator in the background

Definition at line 200 of file 3d/iterator.hh.

◆ pointer

template<typename I>
typedef I::pointer range3d_iterator< I >::pointer

data type pointer

Definition at line 194 of file 3d/iterator.hh.

◆ reference

template<typename I>
typedef I::reference range3d_iterator< I >::reference

data type reference

Definition at line 192 of file 3d/iterator.hh.

◆ value_type

template<typename I>
typedef I::value_type range3d_iterator< I >::value_type

data value type

Definition at line 197 of file 3d/iterator.hh.

Constructor & Destructor Documentation

◆ range3d_iterator() [1/5]

template<typename I>
range3d_iterator< I >::range3d_iterator ( )

standard constructor

◆ range3d_iterator() [2/5]

template<typename I>
range3d_iterator< I >::range3d_iterator ( const C3DBounds pos,
const C3DBounds size,
const C3DBounds start,
const C3DBounds end,
iterator 
)

Full constructor of the range iterator

Parameters
positerator position to initialize the iterator with
sizesize of the original data field
startstart of the iterator range
endend of the iterator range
iteratorthe iterator of the underlying 3D data structure

◆ range3d_iterator() [3/5]

template<typename I>
range3d_iterator< I >::range3d_iterator ( const C3DBounds pos)

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

Parameters
posend position to set this iterator to.

◆ range3d_iterator() [4/5]

template<typename I>
range3d_iterator< I >::range3d_iterator ( const range3d_iterator< I > &  other)

copy constructore

◆ range3d_iterator() [5/5]

template<typename I >
template<typename AI >
range3d_iterator< I >::range3d_iterator ( const range3d_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
AIthe other iterator type. Iterator type I must be copy-constructable from type AI
Parameters
other

Definition at line 327 of file 3d/iterator.hh.

Member Function Documentation

◆ get_point()

template<typename I>
internal_iterator range3d_iterator< I >::get_point ( )
Returns
the internal iterator

◆ operator*()

template<typename I>
reference range3d_iterator< I >::operator* ( ) const
Returns
current value the iterator points to

◆ operator++() [1/2]

template<typename I>
range3d_iterator<I>& range3d_iterator< I >::operator++ ( )

prefix increment

◆ operator++() [2/2]

template<typename I>
range3d_iterator<I> range3d_iterator< I >::operator++ ( int  )

postfix increment

◆ operator->()

template<typename I>
pointer range3d_iterator< I >::operator-> ( ) const
Returns
pointer to the current value the iterator points to

◆ operator=() [1/2]

template<typename I>
range3d_iterator<I>& range3d_iterator< I >::operator= ( const range3d_iterator< I > &  other)

assignment operator

◆ operator=() [2/2]

template<typename I >
template<typename AI >
range3d_iterator< I > & range3d_iterator< I >::operator= ( const range3d_iterator< AI > &  other)

Assignment operator from another type of iterator

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

Definition at line 313 of file 3d/iterator.hh.

◆ operator[]()

template<typename I >
const range3d_iterator< I >::reference range3d_iterator< I >::operator[] ( int  i) const

access elements relative to the iterator position

Definition at line 340 of file 3d/iterator.hh.

◆ pos()

template<typename I>
const C3DBounds& range3d_iterator< I >::pos ( ) const
Returns
the current position within the 3D grid with respect to the full size of the grid.

◆ with_boundary_flag()

template<typename I>
range3d_iterator_with_boundary_flag<I> range3d_iterator< I >::with_boundary_flag ( ) const
Returns
the same iterator but with boundary checks and flags.

Friends And Related Function Documentation

◆ range3d_iterator

template<typename I>
template<typename AI >
friend class range3d_iterator
friend

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

Definition at line 232 of file 3d/iterator.hh.

◆ range3d_iterator_with_boundary_flag

template<typename I>
template<typename AI >
friend class range3d_iterator_with_boundary_flag
friend

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

Definition at line 236 of file 3d/iterator.hh.


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