Base interface for iterators. More...
#include <wipal/tool/iterator.hh>
Public Types | |
| typedef HIDDEN | exact_type |
Iterator types. | |
| typedef ssize_t | difference_type |
| typedef HIDDEN | value_type |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef std::input_iterator_tag | iterator_category |
Public Member Functions | |
Equality checks | |
| bool | operator== (const exact_type &) const |
| bool | operator!= (const exact_type &) const |
Increment operators | |
| const exact_type & | operator++ () |
| exact_type | operator++ (int) |
Indirections | |
| const value_type & | operator* () const |
| const value_type * | operator-> () const |
Downcast methods | |
| const exact_type & | exact () const |
| exact_type & | exact () |
| const exact_type * | exact_ptr () const |
| exact_type * | exact_ptr () |
Protected Member Functions | |
| ~iterator () | |
Base interface for iterators.
iterator provides the standard operators one expects from iterators (== , != , ++ , * , -> ).
To subclass iterator, you must provide the following methods:
equal(const exact_type&) : Equality check.
increment() : Increment the iterator.
get() and get_ptr() : Indirection (as a reference and as a pointer).
1.6.2