
#include <Image/CheckedIterator.H>
Collaboration diagram for CheckedIterator< T >:

A CheckedIterator<T> object exposes essentially the same interface as a T*, but stores a start/stop range that should bound the iterator. This range is checked with a call to ck_range() every time the iterator is derefenced, by either operator*() or operator->().
Definition at line 63 of file CheckedIterator.H.
Public Types | |
| typedef T | value_type |
| This typedef is used by STL functions. | |
| typedef T * | pointer |
| This typedef is used by STL functions. | |
| typedef T & | reference |
| This typedef is used by STL functions. | |
| typedef ptrdiff_t | difference_type |
| This typedef is used by STL functions. | |
| typedef std::random_access_iterator_tag | iterator_category |
| This typedef is used by STL functions. | |
Public Member Functions | |
| CheckedIterator () | |
| Default constructor. | |
| CheckedIterator (T *p, T *a, T *b) | |
| Constructor. | |
| template<class UU> | |
| CheckedIterator (const CheckedIterator< UU > &other) | |
| Constructor. | |
| void | ck_range (const diff_t offset) const |
Pointer arithmetic operators | |
| CheckedIterator< T > & | operator++ () |
| Pre-increment operator. | |
| CheckedIterator< T > | operator++ (int) |
| Post-increment operator. | |
| CheckedIterator< T > & | operator-- () |
| Pre-decrement operator. | |
| CheckedIterator< T > | operator-- (int) |
| Post-decrement operator. | |
| void | operator+= (diff_t d) |
| void | operator-= (diff_t d) |
| CheckedIterator< T > | operator+ (diff_t d) const |
| CheckedIterator< T > | operator- (diff_t d) const |
| diff_t | operator- (CheckedIterator< T > other) const |
Comparison operators | |
| template<class U> | |
| bool | operator== (const CheckedIterator< U > &other) const |
| template<class U> | |
| bool | operator!= (const CheckedIterator< U > &other) const |
| template<class U> | |
| bool | operator< (const CheckedIterator< U > &other) const |
| template<class U> | |
| bool | operator> (const CheckedIterator< U > &other) const |
| template<class U> | |
| bool | operator<= (const CheckedIterator< U > &other) const |
| template<class U> | |
| bool | operator>= (const CheckedIterator< U > &other) const |
Dereferencing operators | |
| T * | operator-> () const |
| T & | operator * () const |
| T & | operator[] (diff_t d) const |
Public Attributes | |
| T * | ptr |
| Pointer to the data. | |
| T * | start |
| Pointer to the first element we can iterate on. | |
| T * | stop |
| Pointer to the last element we can iterete on. | |
|
|||||
|
This typedef is used by STL functions.
Definition at line 76 of file CheckedIterator.H. |
|
|||||
|
This typedef is used by STL functions.
Definition at line 79 of file CheckedIterator.H. |
|
|||||
|
This typedef is used by STL functions.
Definition at line 70 of file CheckedIterator.H. |
|
|||||
|
This typedef is used by STL functions.
Definition at line 73 of file CheckedIterator.H. |
|
|||||
|
This typedef is used by STL functions.
Definition at line 67 of file CheckedIterator.H. |
|
|||||||||
|
Default constructor. This builds an iterator with an empty valid range, so a new value must be assigned to the iterator before it can be dereferenced. However, providing a default constructor helps keep source compatibility with non-debug iterators (i.e., raw pointers). Definition at line 163 of file CheckedIterator.H. Referenced by CheckedIterator< T >::operator+(), CheckedIterator< T >::operator++(), CheckedIterator< T >::operator-(), and CheckedIterator< T >::operator--(). |
|
||||||||||||||||||||
|
Constructor.
Definition at line 169 of file CheckedIterator.H. |
|
||||||||||||||
|
Constructor.
Definition at line 175 of file CheckedIterator.H. |
|
||||||||||
|
Post-increment operator.
Definition at line 186 of file CheckedIterator.H. References CheckedIterator< T >::CheckedIterator(), CheckedIterator< T >::ptr, CheckedIterator< T >::start, and CheckedIterator< T >::stop. |
|
|||||||||
|
Pre-increment operator.
Definition at line 181 of file CheckedIterator.H. References CheckedIterator< T >::ptr. |
|
||||||||||
|
Post-decrement operator.
Definition at line 196 of file CheckedIterator.H. References CheckedIterator< T >::CheckedIterator(), CheckedIterator< T >::ptr, CheckedIterator< T >::start, and CheckedIterator< T >::stop. |
|
|||||||||
|
Pre-decrement operator.
Definition at line 191 of file CheckedIterator.H. References CheckedIterator< T >::ptr. |
|
|||||
|
|||||
|
Pointer to the first element we can iterate on.
Definition at line 151 of file CheckedIterator.H. Referenced by CheckedIterator< T >::ck_range(), CheckedIterator< T >::operator+(), CheckedIterator< T >::operator++(), CheckedIterator< T >::operator-(), and CheckedIterator< T >::operator--(). |
|
|||||
|
Pointer to the last element we can iterete on.
Definition at line 154 of file CheckedIterator.H. Referenced by CheckedIterator< T >::ck_range(), CheckedIterator< T >::operator+(), CheckedIterator< T >::operator++(), CheckedIterator< T >::operator-(), and CheckedIterator< T >::operator--(). |
1.4.4