IndexIterator< N, T > Class Template Reference

An index iterator. More...

#include <IndexIterator.h>

List of all members.

Public Types

typedef Base::iterator_category iterator_category
 Iterator category.
typedef Base::value_type value_type
 Value type.
typedef Base::difference_type difference_type
 Pointer difference type.
typedef Base::pointer pointer
 Pointer to the value type.
typedef Base::reference reference
 Reference to the value type.
typedef iterator_category IteratorCategory
 Iterator category.
typedef value_type Value
 Value type.
typedef difference_type Difference
 Pointer difference type.
typedef pointer Pointer
 Pointer to the value type.
typedef reference Reference
 Reference to the value type.
typedef ads::IndexRange< N, T > IndexRange
 Index range.

Public Member Functions

Constructors etc.

 IndexIterator (const IndexRange &index_range)
 Construct an index iterator for an index range.
 IndexIterator (const IndexIterator &x)
 Copy constructor.
IndexIteratoroperator= (const IndexIterator &other)
 Assignment operator.
 ~IndexIterator ()
 Destructor.
Forward iterator requirements

Reference operator* () const
 Dereference.
Pointer operator-> () const
 Pointer dereference.
IndexIteratoroperator++ ()
 Pre-increment.
IndexIterator operator++ (int)
 Post-increment.
Bidirectional iterator requirements

IndexIteratoroperator-- ()
 Pre-decrement.
IndexIterator operator-- (int)
 Post-decrement.
Accessors.

Reference index () const
 Return a const reference to the index.
const IndexRangeindex_range () const
 Return a const reference to the index range.
Manipulators.

void set_begin ()
 Set the iterator to the beginning of the index range.
void set_end ()
 Set the iterator to the end of the index range.

Related Functions

(Note that these are not member functions.)



template<int N, typename T >
bool operator== (const IndexIterator< N, T > &x, const IndexIterator< N, T > &y)
 Return true if the iterators have a handle to the same index.
template<int N, typename T >
bool operator!= (const IndexIterator< N, T > &x, const IndexIterator< N, T > &y)
 Return true if the iterators do not have a handle to the same index.

Detailed Description

template<int N, typename T = int>
class IndexIterator< N, T >

An index iterator.


Constructor & Destructor Documentation

template<int N, typename T = int>
IndexIterator< N, T >::IndexIterator ( const IndexRange index_range  )  [inline]

Construct an index iterator for an index range.

Set the iterator to the beginning of the index range.


Member Function Documentation

template<int N, typename T = int>
IndexIterator IndexIterator< N, T >::operator++ ( int   )  [inline]

Post-increment.

Note:
This is not efficient. If possible, use the pre-increment operator instead.
template<int N, typename T = int>
IndexIterator IndexIterator< N, T >::operator-- ( int   )  [inline]

Post-decrement.

Note:
This is not efficient. If possible, use the pre-decrement operator instead.

Friends And Related Function Documentation

template<int N, typename T >
bool operator!= ( const IndexIterator< N, T > &  x,
const IndexIterator< N, T > &  y 
) [related]

Return true if the iterators do not have a handle to the same index.

<N,T>

template<int N, typename T >
bool operator== ( const IndexIterator< N, T > &  x,
const IndexIterator< N, T > &  y 
) [related]

Return true if the iterators have a handle to the same index.

<N,T>

References IndexIterator< N, T >::index(), and IndexIterator< N, T >::index_range().


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