Iterator to random access collection storing a current index. More...
#include <CollectionProxy.h>
Public Types | |
| using | container_t = Cont |
| using | value_type = util::collection_value_t< container_t > |
| using | const_iterator = IndexBasedIterator |
Public Member Functions | |
| IndexBasedIterator ()=default | |
| Default constructor (required by iterator protocol): an unusable iterator. More... | |
| IndexBasedIterator (container_t const &cont, std::size_t index=0) | |
| Constructor: initializes from an iterator of the proxy main collection. More... | |
| auto | operator* () const -> decltype(auto) |
| Returns the value pointed by this iterator. More... | |
| const_iterator & | operator++ () |
| Returns the value pointed by this iterator. More... | |
| bool | operator!= (const_iterator const &other) const |
| Returns whether the iterators point to the same element. More... | |
Protected Attributes | |
| container_t const * | fCont = nullptr |
| Pointer to the original container. More... | |
| std::size_t | fIndex = std::numeric_limits<std::size_t>::max() |
| Current index in the main collection. More... | |
Iterator to random access collection storing a current index.
| Cont | type of random-access container to iterate |
Cont is a type providing a public operator[](std::size_t) method.
Definition at line 33 of file CollectionProxy.h.
| using proxy::details::IndexBasedIterator< Cont >::const_iterator = IndexBasedIterator |
Definition at line 353 of file CollectionProxy.h.
| using proxy::details::IndexBasedIterator< Cont >::container_t = Cont |
Definition at line 350 of file CollectionProxy.h.
| using proxy::details::IndexBasedIterator< Cont >::value_type = util::collection_value_t<container_t> |
Definition at line 352 of file CollectionProxy.h.
|
default |
Default constructor (required by iterator protocol): an unusable iterator.
|
inline |
Constructor: initializes from an iterator of the proxy main collection.
Definition at line 359 of file CollectionProxy.h.
|
inline |
Returns whether the iterators point to the same element.
Definition at line 370 of file CollectionProxy.h.
|
inline |
Returns the value pointed by this iterator.
Definition at line 363 of file CollectionProxy.h.
|
inline |
Returns the value pointed by this iterator.
Definition at line 367 of file CollectionProxy.h.
|
protected |
Pointer to the original container.
Definition at line 374 of file CollectionProxy.h.
|
protected |
Current index in the main collection.
Definition at line 377 of file CollectionProxy.h.
1.8.11