An iterator that performs two dereferences in operator*()
.
More...
#include <IndirectIterator.h>
Public Types | |
typedef Base::Iterator | Iterator |
The base iterator type. | |
typedef Base::iterator_category | iterator_category |
The iterator category. | |
typedef Base::value_type | value_type |
The type "pointed to" by the iterator. | |
typedef Base::difference_type | difference_type |
Distance between iterators is represented as this type. | |
typedef Base::pointer | pointer |
This type represents a pointer-to-value_type. | |
typedef Base::reference | reference |
This type represents a reference-to-value_type. | |
Public Member Functions | |
Constructors etc. | |
IndirectIterator () | |
Default constructor. | |
IndirectIterator (const IndirectIterator &other) | |
Copy constructor. | |
IndirectIterator & | operator= (const IndirectIterator &other) |
Assignment operator. | |
IndirectIterator (const Iterator &i) | |
Construct from an iterator. | |
IndirectIterator & | operator= (const Iterator &i) |
Assignment from an iterator. | |
Accessors. | |
const Iterator & | base () const |
Return the base iterator. | |
Iterator Functionality. | |
reference | operator* () const |
Double dereference of the base iterator. | |
pointer | operator-> () const |
Single dereference of the base iterator. | |
IndirectIterator & | operator++ () |
Pre-increment. | |
IndirectIterator | operator++ (int) |
Post-increment. Warning: This is not as efficient as the pre-increment. | |
IndirectIterator & | operator-- () |
Pre-decrement. | |
IndirectIterator | operator-- (int) |
Post-decrement. Warning: This is not as efficient as the pre-decrement. | |
value_type | operator[] (const difference_type &n) const |
Sub-scripting. | |
IndirectIterator & | operator+= (const difference_type &n) |
Addition assignment. | |
IndirectIterator | operator+ (const difference_type &n) const |
Addition. | |
IndirectIterator & | operator-= (const difference_type &n) |
Subtraction assignment. | |
IndirectIterator | operator- (const difference_type &n) const |
Subtraction. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename _Iterator > | |
IndirectIterator< _Iterator > | operator+ (typename IndirectIterator< _Iterator >::difference_type n, const IndirectIterator< _Iterator > &x) |
Offset from an iterator. | |
template<typename _Iterator > | |
IndirectIterator< _Iterator > | constructIndirectIterator () |
Convenience function for instantiating a IndirectIterator. | |
template<typename _Iterator > | |
IndirectIterator< _Iterator > | constructIndirectIterator (const _Iterator &i) |
Convenience function for instantiating a IndirectIterator. |
An iterator that performs two dereferences in operator*()
.
This is a double-dereferencing iterator. This is useful when you have an array of pointers to widgets that you would like to treat as an array of widgets.