RobWorkProject  24.5.15-
Public Types | Public Member Functions | Friends | List of all members
VectorIterator< T > Class Template Reference

Forward iterator for vectors of pointers to T. More...

#include <VectorIterator.hpp>

Public Types

typedef I::iterator_category iterator_category
 
typedef T value_type
 
typedef T * pointer
 
typedef T & reference
 
typedef I::difference_type difference_type
 

Public Member Functions

 VectorIterator (I pos)
 Iterator for the element at pos.
 
T & operator* () const
 Reference to the T element.
 
T * operator-> () const
 Pointer to the T element.
 
VectorIteratoroperator++ ()
 Increments the position of the iterator. More...
 
VectorIterator operator++ (int)
 Increments the position of the iterator. More...
 
bool operator== (const VectorIterator &other) const
 Tests whether the positions of two iterators are equal. More...
 
bool operator!= (const VectorIterator &other) const
 Tests whether the positions of two iterators are unequal. More...
 

Friends

class ConstVectorIterator< T >
 

Detailed Description

template<typename T>
class rw::common::VectorIterator< T >

Forward iterator for vectors of pointers to T.

Member Typedef Documentation

◆ difference_type

typedef I::difference_type difference_type

Difference type.

◆ iterator_category

typedef I::iterator_category iterator_category

Iterator category.

◆ pointer

typedef T* pointer

Pointer type.

◆ reference

typedef T& reference

Reference type.

◆ value_type

typedef T value_type

Value type.

Member Function Documentation

◆ operator!=()

bool operator!= ( const VectorIterator< T > &  other) const
inline

Tests whether the positions of two iterators are unequal.

Parameters
other[in] VectorIterator to compare with
Returns
true if unequal

◆ operator++() [1/2]

VectorIterator& operator++ ( )
inline

Increments the position of the iterator.

Returns
Reference to the incremented iterator

◆ operator++() [2/2]

VectorIterator operator++ ( int  )
inline

Increments the position of the iterator.

Returns
the VectorIterator with the value before the incrementation

◆ operator==()

bool operator== ( const VectorIterator< T > &  other) const
inline

Tests whether the positions of two iterators are equal.

Parameters
other[in] VectorIterator to compare with
Returns
true if equal

The documentation for this class was generated from the following file: