PLaSK library
|
Template to create iterators which using method having index argument. More...
#include <plask/utils/iterators.hpp>
Public Member Functions | |
MethodIterator () | |
Construct uninitialized iterator. Don't use it before initialization. | |
MethodIterator (ContainerType *container, std::size_t index) | |
Construct iterator which point to given index in given container. | |
std::size_t | getIndex () const |
Get current iterator position (index). | |
Public Attributes | |
ContainerType * | container |
Pointer to container over which we iterate. | |
std::size_t | index |
Current iterator position (index). | |
Friends | |
class | boost::iterator_core_access |
template<typename _ContainerType , typename _ReturnedType , _ReturnedType(_ContainerType::*)(std::size_t) _Method, typename _Reference , typename _Value > | |
struct | MethodIterator |
Template to create iterators which using method having index argument.
ContainerType | type of container (can be const or non-const) |
ReturnedType | exact type returned by container method Method |
Method | method used to get value |
Reference | iterator reference type, should be the same type which return functor operator() |
Value | iterator value type, should be the same type which return container operator[] but without reference |
Definition at line 383 of file iterators.hpp.
|
inline |
Construct uninitialized iterator. Don't use it before initialization.
Definition at line 392 of file iterators.hpp.
|
inline |
Construct iterator which point to given index in given container.
container | container to iterate over |
index | index in container |
Definition at line 399 of file iterators.hpp.
|
inline |
Get current iterator position (index).
Definition at line 405 of file iterators.hpp.
|
friend |
Definition at line 408 of file iterators.hpp.
|
friend |
Definition at line 415 of file iterators.hpp.
ContainerType* plask::MethodIterator< ContainerType, ReturnedType, Method, Reference, Value >::container |
Pointer to container over which we iterate.
Definition at line 386 of file iterators.hpp.
std::size_t plask::MethodIterator< ContainerType, ReturnedType, Method, Reference, Value >::index |
Current iterator position (index).
Definition at line 389 of file iterators.hpp.