Calico
|
An RandomAccessIterator
that stores an integer value of type T
. The dereferenced value of the iterator is the integer itself.
More...
#include <iterator.hpp>
Public Types | |
typedef value_type | difference_type |
Difference_type. | |
typedef std::random_access_iterator_tag | iterator_category |
Iterator category. | |
typedef const value_type * | pointer |
Pointer type. | |
typedef const value_type & | reference |
Reference type. | |
typedef T | value_type |
Value type. | |
Public Member Functions | |
integer_iterator (value_type i=value_type()) | |
Constructs an iterator with the given value. | |
bool | operator!= (const integer_iterator &other) const |
Compares the value of the iterators. | |
reference | operator* () const |
Returns the integer value of the iterator. | |
integer_iterator & | operator++ () |
Pre-increments the value of the iterator. | |
integer_iterator | operator++ (int) |
Post-increments the value of the iterator. | |
integer_iterator & | operator+= (const difference_type &n) |
Increases the value of the iterator. | |
integer_iterator & | operator-- () |
Pre-decrements the value of the iterator. | |
integer_iterator | operator-- (int) |
Post-decrements the value of the iterator. | |
integer_iterator & | operator-= (const difference_type &n) |
Decreases the value of the iterator. | |
pointer | operator-> () const |
Member access of the object pointed to by the iterator. | |
bool | operator< (const integer_iterator &other) const |
Compares the value of the iterators. | |
bool | operator<= (const integer_iterator &other) const |
Compares the value of the iterators. | |
bool | operator== (const integer_iterator &other) const |
Compares the value of the iterators. | |
bool | operator> (const integer_iterator &other) const |
Compares the value of the iterators. | |
bool | operator>= (const integer_iterator &other) const |
Compares the value of the iterators. | |
reference | operator[] (const difference_type &n) const |
Returns an iterator with value equal to the current value plus an integer. | |
Friends | |
integer_iterator | operator+ (const integer_iterator &i, const difference_type &j) |
Adds an integer to the value of the iterator. | |
integer_iterator | operator+ (const difference_type &i, const integer_iterator &j) |
Adds an integer to the value of the iterator. | |
integer_iterator | operator- (const integer_iterator &i, const difference_type &j) |
Subtracts an integer from the value of the iterator. | |
integer_iterator | operator- (const difference_type &i, const integer_iterator &j) |
Subtracts an integer from the value of the iterator. | |
difference_type | operator- (const integer_iterator &i, const integer_iterator &j) |
Subtracts the values of the two iterators. | |
An RandomAccessIterator
that stores an integer value of type T
. The dereferenced value of the iterator is the integer itself.
T | An integer type to be wrapped. |
Tag | An arbitrary tag used to distinguish between specializations of this template. |