The random access iterator for the RWMathVec collection class.
More...
#include <rw/math/mathvec.h>
template<class T>
class RWMathVecIterator< T >
Class RWMathVecIterator is the random access iterator for the RWMathVec collection class. The RWMathVecIterator class behaves like a pointer to type T
and is used to increment through elements of an RWMathVec.
- Note
- This class should be accessed through RWMathVec::iterator.
- Example
#include <rw/math/mathvec.h>
int main() {
for (int j = 0; i != stop; ++i, ++j) {
*i = j;
}
}
The random access iterator for the RWMathVec collection class.
Definition mathvec.h:252
A templatized vector class.
Definition mathvec.h:667
◆ RWMathVecIterator() [1/2]
Constructs an RWMathVecIterator that is in an uninitialized state. The iterator must be initialized before it is dereferenced.
◆ RWMathVecIterator() [2/2]
◆ operator*()
Returns a reference to the element pointed to by self.
◆ operator++() [1/2]
◆ operator++() [2/2]
◆ operator+=()
Moves the iterator forward or backward d elements in the RWMathVec. No error condition is set if the iterator goes past the bounds of the vector. Incrementing by d and then decrementing by d returns the iterator to its original position, even if doing so takes it past the bounds of the vector.
◆ operator-() [1/2]
If the return value is positive, moves the iterator that many elements past the iterator i. If the return value is negative, moves the iterator that many elements before the iterator i.
◆ operator-() [2/2]
Returns an iterator that is d elements past (or before) self.
◆ operator--() [1/2]
◆ operator--() [2/2]
◆ operator->()
For iterator a, and identifier m, a->m is equivalent to (*a).m.
◆ operator=()
◆ operator[]()
Returns a reference to the element n elements after self if n is positive, or n elements before self if n is negative.