PLaSK library
|
Base class for forward, polymorphic iterators implementations which allow to get index of current position. More...
#include <plask/utils/iterators.hpp>
Public Member Functions | |
virtual std::size_t | getIndex () const =0 |
Get index for current iterator state. | |
Public Member Functions inherited from plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT > | |
virtual ReferenceT | dereference () const =0 |
virtual void | increment ()=0 |
Iterate to next value. | |
virtual | ~PolymorphicForwardIteratorImpl () |
Virtual destructor, do nothing. | |
virtual bool | equal (const PolymorphicForwardIteratorImpl &other) const =0 |
Check if this is equal to other . | |
virtual std::unique_ptr< PolymorphicForwardIteratorImpl< ValueT, ReferenceT > > | clone () const =0 |
Clone this iterator. | |
Additional Inherited Members | |
Public Types inherited from plask::PolymorphicForwardIteratorImpl< ValueT, ReferenceT > | |
typedef ValueT | value_type |
Type of objects pointed by the iterator. | |
typedef ReferenceT | reference |
Type to represent a reference to an object pointed by the iterator. | |
Base class for forward, polymorphic iterators implementations which allow to get index of current position.
It is similar to PolymorphicForwardIteratorImpl but has getIndex method.
ValueT | Type to iterate over. |
ReferenceT | Type returned by dereference operation. Note that default type is not good if dereference returns temporary object. In such case const ValueT can be a better choice. |
Definition at line 87 of file iterators.hpp.
|
pure virtual |
Get index for current iterator state.