#include <RangeForWrapper.h>
Classes | |
struct | Comparer |
Visitor to compare iterators (returns whether they differ). More... | |
struct | Decrementer |
Visitor to decrement an iterator. More... | |
struct | Dereferencer |
Visitor to dereference an iterator. More... | |
struct | Difference |
Visitor to compare iterators (returns whether they differ). More... | |
struct | Incrementer |
Visitor to increment an iterator. More... | |
struct | IndexAccessor |
Visitor to access element by index. More... | |
struct | MemberAccessor |
Visitor to access a data member of the pointed class. More... | |
Public Types | |
using | begin_t = BeginIter |
Type of begin iterator we can store. More... | |
using | end_t = EndIter |
Type of end iterator we can store. More... | |
using | this_t = RangeForWrapperIterator< begin_t, end_t > |
This class. More... | |
using | difference_type = typename traits_t::difference_type |
Iterator traits, imported from the wrapped begin iterator. More... | |
using | value_type = typename traits_t::value_type |
using | pointer = typename traits_t::pointer |
using | reference = typename traits_t::reference |
using | iterator_category = std::conditional_t< std::is_base_of< std::bidirectional_iterator_tag, typename traits_t::iterator_category >::value, std::bidirectional_iterator_tag, typename traits_t::iterator_category > |
Public Member Functions | |
RangeForWrapperIterator () | |
Constructor: initializes with a end-type default-constructed iterator. More... | |
RangeForWrapperIterator (begin_t &&begin) | |
Constructor: initializes with a begin-type iterator. More... | |
RangeForWrapperIterator (end_t &&end) | |
Constructor: initializes with a end-type iterator. More... | |
reference | operator* () const |
Returns the pointed value (just like the original iterator). More... | |
pointer | operator-> () const |
Returns the pointed value (just like the original iterator). More... | |
this_t & | operator++ () |
Increments the iterator (prefix operator). More... | |
this_t & | operator-- () |
Decrements the iterator (prefix operator). More... | |
this_t | operator++ (int) |
Increments the iterator (postfix operator). More... | |
this_t | operator-- (int) |
Decrements the iterator (postfix operator). More... | |
bool | operator!= (this_t const &other) const |
Returns whether the other iterator is not equal to this one. More... | |
bool | operator== (this_t const &other) const |
Returns whether the other iterator is equal to this one. More... | |
reference | operator[] (difference_type offset) const |
difference_type | operator- (this_t const &other) const |
Private Types | |
using | traits_t = std::iterator_traits< BeginIter > |
Private Attributes | |
boost::variant< begin_t, end_t > | fIter |
The actual iterator we store. More... | |
Iterator wrapping one of two types of iterators.
Definition at line 31 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::begin_t = BeginIter |
Type of begin iterator we can store.
Definition at line 36 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::difference_type = typename traits_t::difference_type |
Iterator traits, imported from the wrapped begin iterator.
Definition at line 42 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::end_t = EndIter |
Type of end iterator we can store.
Definition at line 37 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::iterator_category = std::conditional_t< std::is_base_of<std::bidirectional_iterator_tag, typename traits_t::iterator_category>::value, std::bidirectional_iterator_tag, typename traits_t::iterator_category > |
Definition at line 57 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::pointer = typename traits_t::pointer |
Definition at line 44 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::reference = typename traits_t::reference |
Definition at line 45 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::this_t = RangeForWrapperIterator<begin_t, end_t> |
This class.
Definition at line 38 of file RangeForWrapper.h.
|
private |
Definition at line 33 of file RangeForWrapper.h.
using util::details::RangeForWrapperIterator< BeginIter, EndIter >::value_type = typename traits_t::value_type |
Definition at line 43 of file RangeForWrapper.h.
|
inlineexplicit |
Constructor: initializes with a end-type default-constructed iterator.
Definition at line 61 of file RangeForWrapper.h.
|
inlineexplicit |
Constructor: initializes with a begin-type iterator.
Definition at line 66 of file RangeForWrapper.h.
|
inlineexplicit |
Constructor: initializes with a end-type iterator.
Definition at line 71 of file RangeForWrapper.h.
|
inline |
Returns whether the other iterator is not equal to this one.
Definition at line 100 of file RangeForWrapper.h.
|
inline |
Returns the pointed value (just like the original iterator).
Definition at line 76 of file RangeForWrapper.h.
|
inline |
Increments the iterator (prefix operator).
Definition at line 84 of file RangeForWrapper.h.
|
inline |
Increments the iterator (postfix operator).
Definition at line 92 of file RangeForWrapper.h.
|
inline |
Definition at line 111 of file RangeForWrapper.h.
|
inline |
Decrements the iterator (prefix operator).
Definition at line 88 of file RangeForWrapper.h.
|
inline |
Decrements the iterator (postfix operator).
Definition at line 96 of file RangeForWrapper.h.
|
inline |
Returns the pointed value (just like the original iterator).
Definition at line 80 of file RangeForWrapper.h.
|
inline |
Returns whether the other iterator is equal to this one.
Definition at line 104 of file RangeForWrapper.h.
|
inline |
Definition at line 108 of file RangeForWrapper.h.
|
private |
The actual iterator we store.
Definition at line 117 of file RangeForWrapper.h.