This is an iterator class that extends an existing iterator by overriding dereference. More...
#include <iterator.hpp>
Public Types | |
typedef Container::iterator | base_iter_type |
typedef Value | value_type |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef base_iter_type::difference_type | difference_type |
typedef base_iter_type::iterator_category | iterator_category |
Private Attributes | |
base_iter_type | iter_ |
The underlying base iterator. More... | |
This is an iterator class that extends an existing iterator by overriding dereference.
Access to the underlying iterator is controlled, promoting a black-box approach.
The expected use of this class is as a typedef. If used in conjunction with a typedef of const_iterator_extend (with the same template parameters), you get conversion to your const iterator.
Value = Intended value_type (result of dereferencing). Container = The container whose iterator is being extended. Deref = A class whose member static const Value& eval(const Container::const_iterator &) can be used for dereferencing. (The const's might seem odd, but they allow the same class to be used for const_iterator_extend.) A const_cast will be used to convert the return value to Value&. Key = A class that unlocks the underlying iterator. (This way the underlying iterator is not exposed to everyone.) If Key is accessible, then the underlying iterator can be obtained via get(const Key &).
Definition at line 49 of file iterator.hpp.
typedef Container::iterator util::iterator_extend< Value, Container, Deref, Key >::base_iter_type |
Definition at line 53 of file iterator.hpp.
typedef base_iter_type::difference_type util::iterator_extend< Value, Container, Deref, Key >::difference_type |
Definition at line 59 of file iterator.hpp.
typedef base_iter_type::iterator_category util::iterator_extend< Value, Container, Deref, Key >::iterator_category |
Definition at line 60 of file iterator.hpp.
typedef value_type* util::iterator_extend< Value, Container, Deref, Key >::pointer |
Definition at line 57 of file iterator.hpp.
typedef value_type& util::iterator_extend< Value, Container, Deref, Key >::reference |
Definition at line 58 of file iterator.hpp.
typedef Value util::iterator_extend< Value, Container, Deref, Key >::value_type |
Definition at line 56 of file iterator.hpp.
|
inline |
Default constructor.
Definition at line 63 of file iterator.hpp.
Referenced by util::iterator_extend< Value, Container, Deref, Key >::operator+(), util::iterator_extend< Value, Container, Deref, Key >::operator++(), util::iterator_extend< Value, Container, Deref, Key >::operator-(), and util::iterator_extend< Value, Container, Deref, Key >::operator--().
|
inlineexplicit |
Initialized constructor.
Definition at line 65 of file iterator.hpp.
|
inline |
Definition at line 97 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 70 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 78 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 89 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_, and util::iterator_extend< Value, Container, Deref, Key >::iterator_extend().
|
inline |
Definition at line 82 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 84 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_, and util::iterator_extend< Value, Container, Deref, Key >::iterator_extend().
|
inline |
Definition at line 87 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 90 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_, and util::iterator_extend< Value, Container, Deref, Key >::iterator_extend().
|
inline |
Definition at line 91 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 92 of file iterator.hpp.
|
inline |
Definition at line 83 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 85 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_, and util::iterator_extend< Value, Container, Deref, Key >::iterator_extend().
|
inline |
Definition at line 88 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 79 of file iterator.hpp.
|
inline |
Definition at line 72 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 74 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 69 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 73 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 75 of file iterator.hpp.
References util::iterator_extend< Value, Container, Deref, Key >::iter_.
|
inline |
Definition at line 94 of file iterator.hpp.
|
private |
The underlying base iterator.
Definition at line 101 of file iterator.hpp.
Referenced by util::iterator_extend< Value, Container, Deref, Key >::get(), util::iterator_extend< Value, Container, Deref, Key >::operator!=(), util::iterator_extend< Value, Container, Deref, Key >::operator*(), util::iterator_extend< Value, Container, Deref, Key >::operator+(), util::iterator_extend< Value, Container, Deref, Key >::operator++(), util::iterator_extend< Value, Container, Deref, Key >::operator+=(), util::iterator_extend< Value, Container, Deref, Key >::operator-(), util::iterator_extend< Value, Container, Deref, Key >::operator--(), util::iterator_extend< Value, Container, Deref, Key >::operator-=(), util::iterator_extend< Value, Container, Deref, Key >::operator<(), util::iterator_extend< Value, Container, Deref, Key >::operator<=(), util::iterator_extend< Value, Container, Deref, Key >::operator==(), util::iterator_extend< Value, Container, Deref, Key >::operator>(), and util::iterator_extend< Value, Container, Deref, Key >::operator>=().