RobWorkProject
23.9.11-
|
Forward iterator for the concatenation of a pair of vectors of pointers to T. More...
#include <ConcatVectorIterator.hpp>
Public Types | |
typedef std::forward_iterator_tag | iterator_category |
typedef T | value_type |
typedef T * | pointer |
typedef T & | reference |
typedef ptrdiff_t | difference_type |
Public Member Functions | |
ConcatVectorIterator (const PtrTVector *curr, I pos, const PtrTVector *next) | |
T & | operator* () const |
Reference to the T element. | |
T * | operator-> () const |
Pointer to the T element. | |
ConcatVectorIterator & | operator++ () |
Increments the position of the iterator. More... | |
ConcatVectorIterator | operator++ (int) |
Increments the position of the iterator. More... | |
bool | operator== (const ConcatVectorIterator &other) const |
Tests whether the positions of two iterators are equal. More... | |
bool | operator!= (const ConcatVectorIterator &other) const |
Tests whether the positions of two iterators are unequal. More... | |
Friends | |
class | ConstConcatVectorIterator< T > |
Forward iterator for the concatenation of a pair of vectors of pointers to T.
typedef ptrdiff_t difference_type |
Difference type.
typedef std::forward_iterator_tag iterator_category |
Iterator category.
typedef T* pointer |
Pointer type.
typedef T& reference |
Reference type.
typedef T value_type |
Value type.
|
inline |
@brief Constructor The iterator \b pos points into \b curr. When the iterator reaches the end of \b curr it then switches to the start of \b next. Given a pair of vectors \b curr and \b next, the start and end iterator for the concatenated sequence are given by
You can use ConcatVectorIterator for iterating through a single sequence by letting \b next be NULL.
|
inline |
Tests whether the positions of two iterators are unequal.
other | [in] ConcatVectorIterator to compare with |
|
inline |
Increments the position of the iterator.
|
inline |
Increments the position of the iterator.
|
inline |
Tests whether the positions of two iterators are equal.
other | [in] ConcatVectorIterator to compare with |