![]() |
Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/iter-cursor.hpp"
A cursor-like iterator with the ability to switch iteration direction.
It can be built on top of any bidirectional STL iterator or similar entity, which has an --
operator. Initially, IterCursor will operate in forward direction; irrespective of the current direction, it always fulfils the iter-adapter.hppLumiera Forward Iterator"" concept, i.e. it can be iterated until exhaustion, in which case it will evaluate to bool(false).
Definition at line 157 of file iter-cursor.hpp.
Public Member Functions | |
IterCursor (IterCursor &&)=default | |
IterCursor (IterCursor const &)=default | |
template<class CON > | |
IterCursor (CON &container) | |
IterCursor (IT &&begin, IT &&end) | |
IterCursor & | operator= (IterCursor &&)=default |
IterCursor & | operator= (IterCursor const &)=default |
IterCursor & | switchBackwards () |
IterCursor & | switchDir () |
change the orientation of iteration. More... | |
IterCursor & | switchForwards () |
![]() | |
IterStateWrapper (iter::CursorGear< IT > &&initialState) | |
IterStateWrapper (iter::CursorGear< IT > const &initialState) | |
bool | empty () const |
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterStateWrapper) | |
bool | isValid () const |
operator bool () const | |
iter::CoreYield< iter::CursorGear< IT > > | operator* () const |
IterStateWrapper & | operator++ () |
pointer | operator-> () const |
Private Types | |
using | _Core = iter::CursorGear< IT > |
using | _Parent = IterStateWrapper< _Core > |
Additional Inherited Members | |
![]() | |
using | pointer = typename meta::RefTraits< iter::CoreYield< iter::CursorGear< IT > > >::Pointer |
using | reference = typename meta::RefTraits< iter::CoreYield< iter::CursorGear< IT > > >::Reference |
using | value_type = typename meta::RefTraits< iter::CoreYield< iter::CursorGear< IT > > >::Value |
![]() | |
void | __throw_if_empty () const |
iter::CursorGear< IT > & | stateCore () |
allow derived classes to access state representation | |
iter::CursorGear< IT > const & | stateCore () const |
|
inline |
change the orientation of iteration.
A forward oriented iteration will continue backwards, and vice versa. This operation can even be invoked on an already exhausted iterator, in which case it will turn back in reversed direction.
Definition at line 190 of file iter-cursor.hpp.