tool::valued_iterator< Bottom > Struct Template Reference

Iterator which embeds its value. More...

#include <wipal/tool/valued_iterator.hh>

Inheritance diagram for tool::valued_iterator< Bottom >:

tool::iterator< Bottom > tool::static_base< Bottom > pcapxx::internals::frame_iterator< Bottom > wifi::frame::filter::internals::uniquely_identifiable_iterator< U, I, H, B, Bottom >

List of all members.

Public Types

Static hierarchies related types
typedef HIDDEN exact_type
typedef iterator< exact_typesuper_type
typedef HIDDEN value_type
Iterator types.
typedef ssize_t difference_type
typedef value_type * pointer
typedef value_type & reference
typedef std::input_iterator_tag iterator_category

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 ()
Equality checks
bool operator== (const exact_type &) const
bool operator!= (const exact_type &) const
Increment operators
const exact_typeoperator++ ()
exact_type operator++ (int)
Indirections
const value_type & operator* () const
const value_type * operator-> () const
Downcast methods
const exact_typeexact () const
exact_typeexact ()
const exact_typeexact_ptr () const
exact_typeexact_ptr ()

Protected Types

typedef boost::optional
< value_type > 
optional_value

Protected Member Functions

 ~valued_iterator ()
Access to the iterator's embedded value
const optional_valuevalue () const
optional_valuevalue ()


Detailed Description

template<class Bottom>
struct tool::valued_iterator< Bottom >

Iterator which embeds its 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 .

See also:
iterator

Member Typedef Documentation

template<class Bottom>
typedef HIDDEN tool::valued_iterator< Bottom >::exact_type

template<class Bottom>
typedef boost::optional<value_type> tool::valued_iterator< Bottom >::optional_value [protected]

Type of the embedded value.


Constructor & Destructor Documentation

template<class B>
tool::valued_iterator< B >::~valued_iterator (  )  [inline, protected]

Protected destructor: valued_iterator is abstract.


Member Function Documentation

template<class Bottom>
const static_base< Bottom >::exact_type & tool::static_base< Bottom >::exact (  )  const [inline, inherited]

template<class Bottom>
static_base< Bottom >::exact_type & tool::static_base< Bottom >::exact (  )  [inline, inherited]

Safely downcast to the exact type as a non-const reference.

template<class Bottom>
const static_base< Bottom >::exact_type * tool::static_base< Bottom >::exact_ptr (  )  const [inline, inherited]

Safely downcast to the exact type as a const pointer.

template<class Bottom>
static_base< Bottom >::exact_type * tool::static_base< Bottom >::exact_ptr (  )  [inline, inherited]

Safely downcast to the exact type as a non-const pointer.


The documentation for this struct was generated from the following files:

Generated on Thu Feb 21 18:54:22 2008 for wipal by  doxygen 1.5.5