#include <wipal/tool/valued_iterator.hh>
Static hierarchies related types | |
typedef iterator< exact_type > | super_type |
typedef | wp_get_exact (Bottom, valued_iterator< Bottom >) exact_type |
typedef | wp_type (value_type, exact_type) value_type |
Public Member Functions | |
Indirection as a reference | |
const value_type & | get () const |
value_type & | get () |
Indirection as a pointer | |
const value_type * | get_ptr () const |
value_type * | get_ptr () |
Protected Types | |
typedef boost::optional < value_type > | optional_value |
Protected Member Functions | |
~valued_iterator () | |
Access to the iterator's embedded value | |
const optional_value & | value () const |
optional_value & | value () |
valued_iterator represents an iterator that embeds its value inside a boost::optional<value_type>
attribute. Subclasses access this value using value(). valued_iterator implements the get() and get_ptr() methods which are required by iterator. These methods return the embeded value (with undefined results if the value is boost::none_t
). Implement the increment()
and equal()
methods to subclass it. increment()
should either store the next element into value(), either store boost::none_t to indicate end of iteration.
Subclasses must also declare the value_type virtual type .
typedef boost::optional<value_type> tool::valued_iterator< Bottom >::optional_value [protected] |
Type of the embedded value.
tool::valued_iterator< B >::~valued_iterator | ( | ) | [inline, protected] |
Protected destructor: valued_iterator is abstract.