Public Types | Public Member Functions | Private Attributes

mln::value::fwd_viter_< S > Struct Template Reference

FIXME: Forward iterator on a set of values. More...

#include <viter.hh>

Inheritance diagram for mln::value::fwd_viter_< S >:
Inheritance graph

List of all members.

Public Types

typedef Object< void > category
typedef fwd_viter_< S > exact_t
typedef S::value value
 Value associated type.

Public Member Functions

void change_target (const S &s)
 fwd_viter_ (const Value_Set< S > &s)
 Constructor.
 fwd_viter_ ()
 Constructor without argument.
unsigned index_ () const
 Give the current index.
void invalidate ()
 Invalidate the iterator.
bool is_valid () const
 Test if the iterator is valid.
void next ()
 Go to the next element.
void next_ ()
 Go to the next value.
 operator typename S::value () const
 Conversion into a value.
void start ()
 Start an iteration.

Private Attributes

unsigned i_
const S * s_

Detailed Description

template<typename S>
struct mln::value::fwd_viter_< S >

FIXME: Forward iterator on a set of values.

The parameter S is the type of value set.

Definition at line 52 of file viter.hh.


Member Typedef Documentation

typedef Object<void> mln::Object< fwd_viter_< S > >::category [inherited]

Definition at line 174 of file object.hh.

typedef fwd_viter_< S > mln::Object< fwd_viter_< S > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename S >
typedef S ::value mln::value::fwd_viter_< S >::value

Value associated type.

Definition at line 55 of file viter.hh.


Constructor & Destructor Documentation

template<typename S >
mln::value::fwd_viter_< S >::fwd_viter_ (  )  [inline]

Constructor without argument.

Definition at line 143 of file viter.hh.

template<typename S >
mln::value::fwd_viter_< S >::fwd_viter_ ( const Value_Set< S > &  s  )  [inline]

Constructor.

Definition at line 150 of file viter.hh.

References mln::value::fwd_viter_< S >::change_target(), and mln::exact().


Member Function Documentation

template<typename S >
void mln::value::fwd_viter_< S >::change_target ( const S &  s  )  [inline]
template<typename S >
unsigned mln::value::fwd_viter_< S >::index_ (  )  const [inline]

Give the current index.

Definition at line 207 of file viter.hh.

template<typename S >
void mln::value::fwd_viter_< S >::invalidate (  )  [inline]

Invalidate the iterator.

Definition at line 175 of file viter.hh.

Referenced by mln::value::fwd_viter_< S >::change_target().

template<typename S >
bool mln::value::fwd_viter_< S >::is_valid (  )  const [inline]

Test if the iterator is valid.

Definition at line 167 of file viter.hh.

void mln::Iterator< fwd_viter_< S > >::next (  )  [inherited]

Go to the next element.

Warning:
This is a final method; iterator classes should not re-defined this method. The actual "next" operation has to be defined through the next_ method.
Precondition:
The iterator is valid.
template<typename S >
void mln::value::fwd_viter_< S >::next_ (  )  [inline]

Go to the next value.

Definition at line 191 of file viter.hh.

template<typename S >
mln::value::fwd_viter_< S >::operator typename S::value (  )  const [inline]

Conversion into a value.

Definition at line 198 of file viter.hh.

template<typename S >
void mln::value::fwd_viter_< S >::start (  )  [inline]

Start an iteration.

Definition at line 183 of file viter.hh.


Member Data Documentation

template<typename S >
unsigned mln::value::fwd_viter_< S >::i_ [private]

Definition at line 86 of file viter.hh.

template<typename S >
const S* mln::value::fwd_viter_< S >::s_ [private]

Definition at line 85 of file viter.hh.