IndirectIterator< _Iterator > Class Template Reference

An iterator that performs two dereferences in operator*(). More...

#include <IndirectIterator.h>

Inheritance diagram for IndirectIterator< _Iterator >:
AdaptedIterator< _Iterator, IteratorCategory, ValueType, DifferenceType, Pointer, Reference >

List of all members.

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.
IndirectIteratoroperator= (const IndirectIterator &other)
 Assignment operator.
 IndirectIterator (const Iterator &i)
 Construct from an iterator.
IndirectIteratoroperator= (const Iterator &i)
 Assignment from an iterator.
Accessors.

const Iteratorbase () 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.
IndirectIteratoroperator++ ()
 Pre-increment.
IndirectIterator operator++ (int)
 Post-increment. Warning: This is not as efficient as the pre-increment.
IndirectIteratoroperator-- ()
 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.
IndirectIteratoroperator+= (const difference_type &n)
 Addition assignment.
IndirectIterator operator+ (const difference_type &n) const
 Addition.
IndirectIteratoroperator-= (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.

Detailed Description

template<typename _Iterator>
class IndirectIterator< _Iterator >

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.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:51 2016 for Algorithms and Data Structures Package by  doxygen 1.6.3