|
dune-common
2.11
|
Generic class for stl-conforming iterators for container classes with operator[]. More...
#include <dune/common/genericiterator.hh>

Public Types | |
| typedef C | Container |
| The type of container we are an iterator for. More... | |
| typedef T | Value |
| The value type of the iterator. More... | |
| typedef D | DifferenceType |
| The type of the difference between two positions. More... | |
| typedef R | Reference |
| The type of the reference to the values accessed. More... | |
| using | iterator_category = T |
| using | value_type = typename std::remove_const< R >::type |
| using | reference = D |
| using | pointer = R * |
| using | difference_type = std::ptrdiff_t |
| using | Pointer = pointer |
Public Member Functions | |
| GenericIterator () | |
| GenericIterator (Container &cont, DifferenceType pos) | |
| Constructor. More... | |
| GenericIterator (const MutableIterator &other) | |
| Copy constructor. More... | |
| GenericIterator (const ConstIterator &other) | |
| Copy constructor. More... | |
| bool | equals (const MutableIterator &other) const |
| bool | equals (const ConstIterator &other) const |
| Reference | dereference () const |
| void | increment () |
| void | decrement () |
| Reference | elementAt (DifferenceType i) const |
| void | advance (DifferenceType n) |
| DifferenceType | distanceTo (const MutableIterator &other) const |
| DifferenceType | distanceTo (const ConstIterator &other) const |
| decltype(auto) constexpr | operator* () const |
| Dereferencing operator. More... | |
| constexpr pointer | operator-> () const |
| Arrow access to members of referenced value. More... | |
| decltype(auto) constexpr | operator++ () |
| Preincrement operator. More... | |
| constexpr DerivedIterator | operator++ (int) |
| Postincrement operator. More... | |
| decltype(auto) constexpr | operator-- () |
| Predecrement operator. More... | |
| constexpr DerivedIterator | operator-- (int) |
| Postdecrement operator. More... | |
| constexpr reference | operator[] (difference_type n) const |
| Dereference element with given offset form this iterator. More... | |
| decltype(auto) constexpr | operator+= (difference_type n) |
| Increment iterator by given value. More... | |
| constexpr DerivedIterator | operator+ (difference_type n) const |
| Create iterator incremented by given value. More... | |
| constexpr DerivedIterator & | operator-= (difference_type n) |
| Decrement iterator by given value. More... | |
| constexpr DerivedIterator | operator- (difference_type n) const |
| Create iterator decremented by given value. More... | |
Protected Types | |
| using | DerivedIterator = GenericIterator< C, T, R, D, IteratorFacade > |
| The derived iterator type. More... | |
Protected Member Functions | |
| constexpr const DerivedIterator & | derived () const |
Cast of *this to const DerivedIterator type. More... | |
| constexpr DerivedIterator & | derived () |
Cast of *this to DerivedIterator type. More... | |
Generic class for stl-conforming iterators for container classes with operator[].
If template parameter C has a const qualifier we are a const iterator, otherwise we are a mutable iterator.
| typedef C Dune::GenericIterator< C, T, R, D, IteratorFacade >::Container |
The type of container we are an iterator for.
The container type must provide an operator[] method.
If C has a const qualifier we are a const iterator, otherwise we are a mutable iterator.
|
protectedinherited |
The derived iterator type.
|
inherited |
| typedef D Dune::GenericIterator< C, T, R, D, IteratorFacade >::DifferenceType |
The type of the difference between two positions.
|
inherited |
|
inherited |
|
inherited |
| typedef R Dune::GenericIterator< C, T, R, D, IteratorFacade >::Reference |
The type of the reference to the values accessed.
|
inherited |
| typedef T Dune::GenericIterator< C, T, R, D, IteratorFacade >::Value |
The value type of the iterator.
This is the return type when dereferencing the iterator.
|
inherited |
|
inline |
|
inline |
Constructor.
| cont | Reference to the container we are an iterator for |
| pos | The position the iterator will be positioned to (e.g. 0 for an iterator returned by Container::begin() or the size of the container for an iterator returned by Container::end() |
|
inline |
Copy constructor.
This is somehow hard to understand, therefore play with the cases:
|
inline |
Copy constructor.
This is somehow hard to understand, therefore play with the cases:
|
inline |
|
inline |
|
inline |
|
inlineprotectedinherited |
Cast of *this to const DerivedIterator type.
|
inlineprotectedinherited |
Cast of *this to DerivedIterator type.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Dereferencing operator.
|
inlineinherited |
Create iterator incremented by given value.
Only enabled for random-access iterators.
|
inlineinherited |
Preincrement operator.
|
inlineinherited |
Postincrement operator.
|
inlineinherited |
Increment iterator by given value.
Only enabled for random-access iterators.
|
inlineinherited |
Create iterator decremented by given value.
Only enabled for random-access iterators.
|
inlineinherited |
Predecrement operator.
Only enabled for bidirectional and random-access iterators.
|
inlineinherited |
Postdecrement operator.
Only enabled for bidirectional and random-access iterators.
|
inlineinherited |
Decrement iterator by given value.
Only enabled for random-access iterators.
|
inlineinherited |
Arrow access to members of referenced value.
|
inlineinherited |
Dereference element with given offset form this iterator.
| n | The distance to the element. |
Only enabled for random-access iterators.
|
friend |
|
friend |
1.8.14