#include <vctFixedStrideVectorIterator.h>
Inheritance diagram for vctFixedStrideVectorConstIterator< _elementType, _stride >:


We first define a const iterator, which only allows to read the referenced object. The non-const iterator hass all the functionality of a const_iterator, plus the mutability of the objects. We therefore derive vctFixedStrideVectorIterator from vctFixedStrideVectorConstIterator (as done with std::list iterators).
In the current version, we do not define operator=, and rely on explicit declarations of objects and the default operator= and copy constructor.
| _stride | the stride between elements of the vector being iterated over. | |
| _elementType | the type of the element that the iterator refers to. |
Definition at line 63 of file vctFixedStrideVectorIterator.h.
| typedef vctFixedStrideVectorConstIterator<_elementType, _stride> vctFixedStrideVectorConstIterator< _elementType, _stride >::ThisType |
This of the iterator itself.
Reimplemented in vctFixedStrideVectorIterator< _elementType, _stride >.
Definition at line 71 of file vctFixedStrideVectorIterator.h.
| typedef std::iterator<std::random_access_iterator_tag, _elementType> vctFixedStrideVectorConstIterator< _elementType, _stride >::BaseType |
Base type for this iterator, i.e. std::iterator.
Reimplemented in vctFixedStrideVectorIterator< _elementType, _stride >.
Definition at line 74 of file vctFixedStrideVectorIterator.h.
| typedef BaseType::iterator_category vctFixedStrideVectorConstIterator< _elementType, _stride >::iterator_category |
Type (i.e. category) of iterator, i.e. std::random_access_iterator_tag.
Definition at line 78 of file vctFixedStrideVectorIterator.h.
| vctFixedStrideVectorConstIterator< _elementType, _stride >::vctFixedStrideVectorConstIterator | ( | ) | [inline] |
Default constructor: create an uninitialized object.
Definition at line 94 of file vctFixedStrideVectorIterator.h.
| vctFixedStrideVectorConstIterator< _elementType, _stride >::vctFixedStrideVectorConstIterator | ( | value_type * | dataPtr | ) | [inline, explicit] |
Constructor taking a non-const element pointer. Note that only read operations will be performed!
Definition at line 100 of file vctFixedStrideVectorIterator.h.
| vctFixedStrideVectorConstIterator< _elementType, _stride >::vctFixedStrideVectorConstIterator | ( | const value_type * | dataPtr | ) | [inline, explicit] |
Constructor taking a const element pointer. We need it in order to deal with const containers being refered by this iterator. We have to perform const_cast to convert back to the stored non-const member pointer of this iterator. However, the non-const iterator class completely shadows the constructors of the const-iterator base class, and so we don't have to worry about creating a non-const iterator over a const container.
Definition at line 113 of file vctFixedStrideVectorIterator.h.
| ThisType& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator++ | ( | ) | [inline] |
Pre-increment.
Definition at line 119 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| ThisType vctFixedStrideVectorConstIterator< _elementType, _stride >::operator++ | ( | int | ) | [inline] |
Post increment.
Definition at line 126 of file vctFixedStrideVectorIterator.h.
| ThisType& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator-- | ( | ) | [inline] |
Pre-decrement.
Definition at line 134 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| ThisType vctFixedStrideVectorConstIterator< _elementType, _stride >::operator-- | ( | int | ) | [inline] |
Post decrement.
Definition at line 141 of file vctFixedStrideVectorIterator.h.
| ThisType& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator+= | ( | difference_type | difference | ) | [inline] |
Increase by given difference.
Definition at line 149 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| ThisType& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator-= | ( | difference_type | difference | ) | [inline] |
Decrease by given difference.
Definition at line 156 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| difference_type vctFixedStrideVectorConstIterator< _elementType, _stride >::operator- | ( | const ThisType & | other | ) | const [inline] |
Find difference between iterators. This method does not test for reachability, and may return invalid values if the two iterators are not reachable. It is the user's responsibility to ensure the correctness.
Definition at line 167 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| const value_type& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator[] | ( | difference_type | index | ) | const [inline] |
Random access (return const reference).
Definition at line 173 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| const value_type& vctFixedStrideVectorConstIterator< _elementType, _stride >::operator * | ( | ) | const [inline] |
Dereference (const)
Definition at line 179 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| bool vctFixedStrideVectorConstIterator< _elementType, _stride >::operator< | ( | const ThisType & | other | ) | const [inline] |
Order relation between iterators, required by STL.
Definition at line 189 of file vctFixedStrideVectorIterator.h.
| bool vctFixedStrideVectorConstIterator< _elementType, _stride >::operator== | ( | const ThisType & | other | ) | const [inline] |
Equality of iterators, required by STL
Definition at line 195 of file vctFixedStrideVectorIterator.h.
References vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr.
| bool vctFixedStrideVectorConstIterator< _elementType, _stride >::operator> | ( | const ThisType & | other | ) | const [inline] |
Complementary operation to operator <
Definition at line 201 of file vctFixedStrideVectorIterator.h.
| bool vctFixedStrideVectorConstIterator< _elementType, _stride >::operator!= | ( | const ThisType & | other | ) | const [inline] |
Complementary operation to operator ==
Definition at line 207 of file vctFixedStrideVectorIterator.h.
value_type* vctFixedStrideVectorConstIterator< _elementType, _stride >::DataPtr [protected] |
The data member points to the object being refered by this iterator. It is not declared const, so we will be able to use it in the non-const iterator class. But all the methods in vctFixedStrideVectorConstIterator are declared const to protect the data from writing.
Definition at line 90 of file vctFixedStrideVectorIterator.h.
Referenced by vctFixedStrideVectorIterator< _elementType, _stride >::operator *(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator *(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator++(), vctFixedStrideVectorIterator< _elementType, _stride >::operator++(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator+=(), vctFixedStrideVectorIterator< _elementType, _stride >::operator+=(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator-(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator--(), vctFixedStrideVectorIterator< _elementType, _stride >::operator--(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator-=(), vctFixedStrideVectorIterator< _elementType, _stride >::operator-=(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator==(), vctFixedStrideVectorConstIterator< _elementType, _stride >::operator[](), and vctFixedStrideVectorIterator< _elementType, _stride >::operator[]().