Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/index-iter.hpp"
Subscript-index based access to a container, packaged as iterator.
This is a copyable and assignable value object (handle), referring to some data container maintained elsewhere. The container must provide an operator[]
. This handle can be used as »Lumiera Forward Iterator«, but with the additional capability to retrieve and re-set the current index position.
CON | a container with operator[] and a function size() |
PTR | how to refer to this container; can be defined as smart-ptr, additionally allowing to manage this container automatically. |
Definition at line 112 of file index-iter.hpp.
Public Member Functions | |
IndexIter (CON &container) | |
IndexIter (PTR pContainer) | |
size_t | getIDX () const |
void | setIDX (size_t newIDX) |
Public Member Functions inherited from IterStateWrapper< ST, T > | |
IterStateWrapper (ST &&initialState) | |
IterStateWrapper (ST const &initialState) | |
bool | empty () const |
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterStateWrapper) | |
bool | isValid () const |
operator bool () const | |
T | operator* () const |
IterStateWrapper & | operator++ () |
pointer | operator-> () const |
Private Types | |
using | _Cor = iter::IndexAccessCore< PTR > |
using | _Par = typename _Cor::IterWrapper |
Additional Inherited Members | |
Public Types inherited from IterStateWrapper< ST, T > | |
using | pointer = typename meta::RefTraits< T >::Pointer |
using | reference = typename meta::RefTraits< T >::Reference |
using | value_type = typename meta::RefTraits< T >::Value |
Protected Member Functions inherited from IterStateWrapper< ST, T > | |
void | __throw_if_empty () const |
ST & | stateCore () |
allow derived classes to access state representation | |
ST const & | stateCore () const |