An index iterator. More...
#include <IndexIterator.h>
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. | |
IndexIterator & | operator= (const IndexIterator &other) |
Assignment operator. | |
~IndexIterator () | |
Destructor. | |
Forward iterator requirements | |
Reference | operator* () const |
Dereference. | |
Pointer | operator-> () const |
Pointer dereference. | |
IndexIterator & | operator++ () |
Pre-increment. | |
IndexIterator | operator++ (int) |
Post-increment. | |
Bidirectional iterator requirements | |
IndexIterator & | operator-- () |
Pre-decrement. | |
IndexIterator | operator-- (int) |
Post-decrement. | |
Accessors. | |
Reference | index () const |
Return a const reference to the index. | |
const IndexRange & | index_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. |
An index iterator.
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.
IndexIterator IndexIterator< N, T >::operator++ | ( | int | ) | [inline] |
Post-increment.
IndexIterator IndexIterator< N, T >::operator-- | ( | int | ) | [inline] |
Post-decrement.
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>
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().