Public Types | Public Member Functions | Private Attributes

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

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

#include <viter.hh>

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

List of all members.

Public Types

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

Public Member Functions

 bkd_viter_ ()
 Constructor without argument.
 bkd_viter_ (const Value_Set< S > &s)
 Constructor.
void change_target (const S &s)
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::bkd_viter_< S >

FIXME: Backward iterator on a set of values.

The parameter S is the type of value set.

Definition at line 97 of file viter.hh.


Member Typedef Documentation

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

Definition at line 174 of file object.hh.

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

Definition at line 173 of file object.hh.

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

Value associated type.

Definition at line 100 of file viter.hh.


Constructor & Destructor Documentation

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

Constructor without argument.

Definition at line 217 of file viter.hh.

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

Constructor.

Definition at line 224 of file viter.hh.

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


Member Function Documentation

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

Give the current index.

Definition at line 286 of file viter.hh.

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

Invalidate the iterator.

Definition at line 249 of file viter.hh.

Referenced by mln::value::bkd_viter_< S >::change_target(), and mln::value::bkd_viter_< S >::next_().

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

Test if the iterator is valid.

Definition at line 241 of file viter.hh.

void mln::Iterator< bkd_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::bkd_viter_< S >::next_ (  )  [inline]

Go to the next value.

Definition at line 265 of file viter.hh.

References mln::value::bkd_viter_< S >::invalidate().

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

Conversion into a value.

Definition at line 277 of file viter.hh.

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

Start an iteration.

Definition at line 257 of file viter.hh.


Member Data Documentation

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

Definition at line 131 of file viter.hh.

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

Definition at line 130 of file viter.hh.