Base class for dereferencing iterators. More...
#include <DereferenceIterator.h>
Classes | |
| struct | initialize_tag |
| Tag used for initialization. More... | |
Public Types | |
Type definitions for standard iterators | |
| using | difference_type = typename iterator_t::difference_type |
| using | value_type = Value |
| using | pointer = std::add_pointer_t< value_type > |
| using | reference = std::add_lvalue_reference_t< value_type > |
| using | iterator_category = typename iterator_t::iterator_category |
Public Member Functions | |
| DereferenceIteratorBase ()=default | |
| Default constructor. More... | |
| DereferenceIteratorBase (Iter const &iter, initialize_tag) | |
| Constructor: copies the specified iterator in. More... | |
| DereferenceIteratorBase (Iter &&iter, initialize_tag) | |
| Constructor: acquires the specified iterator. More... | |
| template<typename OtherIter , typename OtherValue > | |
| DereferenceIteratorBase (DereferenceIteratorBase< iterator_t, OtherValue > const &other) | |
| Generic copy constructor. More... | |
| template<typename OtherIter , typename OtherValue > | |
| DereferenceIteratorBase (DereferenceIteratorBase< iterator_t, OtherValue > &&other) | |
| Generic move constructor. More... | |
| reference | operator* () const |
| Returns a reference to the data pointed by the original iterator. More... | |
| pointer | operator-> () const |
| Returns a reference to the data pointed by the original iterator. More... | |
| reference | operator[] (difference_type i) const |
| Returns a reference to the i-th element after the pointed one. More... | |
| this_t & | operator++ () |
| Prefix increment operator. More... | |
| this_t & | operator-- () |
| Prefix decrement operator. More... | |
| this_t | operator++ (int) |
| Postfix increment operator. More... | |
| this_t | operator-- (int) |
| Postfix decrement operator. More... | |
| difference_type | operator- (this_t const &other) const |
| Returns the difference from another iterator. More... | |
| bool | is_null () const |
| Bonus: returns true if the pointer is not dereferentiable. More... | |
| this_t | operator+ (difference_type offset) const |
| this_t | operator- (difference_type offset) const |
| this_t & | operator+= (difference_type offset) |
| this_t & | operator-= (difference_type offset) |
Comparison operators between iterators | |
| bool | operator== (this_t const &other) const |
| bool | operator!= (this_t const &other) const |
| bool | operator<= (this_t const &other) const |
| bool | operator>= (this_t const &other) const |
| bool | operator< (this_t const &other) const |
| bool | operator> (this_t const &other) const |
Private Types | |
| using | iterator_t = Iter |
| wrapped iterator type More... | |
| using | this_t = DereferenceIteratorBase< Iter, Value > |
| this type More... | |
Private Attributes | |
| iterator_t | iter |
| wrapper iterator More... | |
Base class for dereferencing iterators.
Definition at line 63 of file DereferenceIterator.h.
| using lar::util::detail::DereferenceIteratorBase< Iter, Value >::difference_type = typename iterator_t::difference_type |
Definition at line 76 of file DereferenceIterator.h.
| using lar::util::detail::DereferenceIteratorBase< Iter, Value >::iterator_category = typename iterator_t::iterator_category |
Definition at line 80 of file DereferenceIterator.h.
|
private |
wrapped iterator type
Definition at line 64 of file DereferenceIterator.h.
| using lar::util::detail::DereferenceIteratorBase< Iter, Value >::pointer = std::add_pointer_t<value_type> |
Definition at line 78 of file DereferenceIterator.h.
| using lar::util::detail::DereferenceIteratorBase< Iter, Value >::reference = std::add_lvalue_reference_t<value_type> |
Definition at line 79 of file DereferenceIterator.h.
|
private |
this type
Definition at line 65 of file DereferenceIterator.h.
| using lar::util::detail::DereferenceIteratorBase< Iter, Value >::value_type = Value |
Definition at line 77 of file DereferenceIterator.h.
|
default |
Default constructor.
|
inline |
Constructor: copies the specified iterator in.
Definition at line 89 of file DereferenceIterator.h.
|
inline |
Constructor: acquires the specified iterator.
Definition at line 93 of file DereferenceIterator.h.
|
inline |
Generic copy constructor.
| OtherIter | base iterator: must be assignable to iterator_t |
| OtherValue | value type: must be convertible into value_type |
Definition at line 101 of file DereferenceIterator.h.
|
inline |
Generic move constructor.
| OtherIter | base iterator: must be assignable to iterator_t |
| OtherValue | value type: must be convertible into value_type |
Definition at line 114 of file DereferenceIterator.h.
|
inline |
Bonus: returns true if the pointer is not dereferentiable.
Definition at line 163 of file DereferenceIterator.h.
|
inline |
Definition at line 170 of file DereferenceIterator.h.
|
inline |
Returns a reference to the data pointed by the original iterator.
Definition at line 124 of file DereferenceIterator.h.
|
inline |
Arithmetic operators (symmetric)
Definition at line 146 of file DereferenceIterator.h.
|
inline |
Prefix increment operator.
Definition at line 133 of file DereferenceIterator.h.
|
inline |
Postfix increment operator.
Definition at line 139 of file DereferenceIterator.h.
|
inline |
Definition at line 151 of file DereferenceIterator.h.
|
inline |
Definition at line 148 of file DereferenceIterator.h.
|
inline |
Returns the difference from another iterator.
Definition at line 159 of file DereferenceIterator.h.
|
inline |
Prefix decrement operator.
Definition at line 136 of file DereferenceIterator.h.
|
inline |
Postfix decrement operator.
Definition at line 142 of file DereferenceIterator.h.
|
inline |
Definition at line 153 of file DereferenceIterator.h.
|
inline |
Returns a reference to the data pointed by the original iterator.
Definition at line 127 of file DereferenceIterator.h.
|
inline |
Definition at line 176 of file DereferenceIterator.h.
|
inline |
Definition at line 172 of file DereferenceIterator.h.
|
inline |
Definition at line 168 of file DereferenceIterator.h.
|
inline |
Definition at line 178 of file DereferenceIterator.h.
|
inline |
Definition at line 174 of file DereferenceIterator.h.
|
inline |
Returns a reference to the i-th element after the pointed one.
Definition at line 130 of file DereferenceIterator.h.
|
private |
wrapper iterator
Definition at line 67 of file DereferenceIterator.h.
1.8.11