Public Types | Public Member Functions | Protected Attributes

mln::internal::piter_adaptor_< Pi, S, E > Class Template Reference

A base class for point iterator adaptors. More...

#include <piter_adaptor.hh>

Inheritance diagram for mln::internal::piter_adaptor_< Pi, S, E >:
Inheritance graph

List of all members.

Public Types

typedef Site_Proxy< void > category
typedef E exact_t
typedef S::site site
 The associated site type (as a Site_Proxy).
typedef S target
 The associated target type.

Public Member Functions

void change_target (const S &s)
 Change the site set targeted by this iterator.
void invalidate ()
void invalidate_ ()
 Invalidate the iterator.
bool is_valid () const
bool is_valid_ () const
 Test the iterator validity.
void next ()
 Go to the next element.
void next_ ()
 Go to the next point.
const S::psite & p_hook_ () const
 Hook to the current location.
void pi_change_target_ (const S &s)
 Change the site set targeted by pi_.
 piter_adaptor_ ()
 Constructor without argument.
 piter_adaptor_ (const Pi &piter)
 Constructor from a point iterator piter.
void start ()
void start_ ()
 Start an iteration.
const S::psite & subj_ ()
 Give the subject (required by the Proxy interface).
const S *& target_ ()
 Give the target address. It might be 0.
const S::site & to_site () const
 Return the site it points to (as a Site_Proxy).

Protected Attributes

Pi pi_
 The adaptee site iterator.
const S * s_
 The target.

Detailed Description

template<typename Pi, typename S, typename E>
class mln::internal::piter_adaptor_< Pi, S, E >

A base class for point iterator adaptors.

Parameter Pi is the type of the point iterator adaptee; parameter E is the exact type.


Member Typedef Documentation

template<typename E>
typedef Site_Proxy<void> mln::Site_Proxy< E >::category [inherited]
template<typename E>
typedef E mln::Object< E >::exact_t [inherited]
template<typename S, typename E>
typedef S ::site mln::internal::site_iterator_base< S, E >::site [inherited]

The associated site type (as a Site_Proxy).

template<typename S, typename E>
typedef S mln::internal::site_iterator_base< S, E >::target [inherited]

The associated target type.


Constructor & Destructor Documentation

template<typename Pi , typename S , typename E >
mln::internal::piter_adaptor_< Pi, S, E >::piter_adaptor_ (  )  [inline]

Constructor without argument.

template<typename Pi, typename S , typename E >
mln::internal::piter_adaptor_< Pi, S, E >::piter_adaptor_ ( const Pi &  piter  )  [inline]

Constructor from a point iterator piter.

References mln::internal::piter_adaptor_< Pi, S, E >::invalidate_().


Member Function Documentation

template<typename Pi , typename S, typename E >
void mln::internal::piter_adaptor_< Pi, S, E >::change_target ( const S &  s  )  [inline]
template<typename E >
void mln::Site_Iterator< E >::invalidate (  )  [inline, inherited]
template<typename Pi , typename S , typename E >
void mln::internal::piter_adaptor_< Pi, S, E >::invalidate_ (  )  [inline]
template<typename E >
bool mln::Site_Iterator< E >::is_valid (  )  const [inline, inherited]
template<typename Pi , typename S , typename E >
bool mln::internal::piter_adaptor_< Pi, S, E >::is_valid_ (  )  const [inline]

Test the iterator validity.

References mln::internal::piter_adaptor_< Pi, S, E >::pi_.

template<typename E >
void mln::Site_Iterator< E >::next (  )  [inline, 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.

References mln::exact(), and mln::Site_Iterator< E >::is_valid().

template<typename Pi , typename S , typename E >
void mln::internal::piter_adaptor_< Pi, S, E >::next_ (  )  [inline]
template<typename Pi , typename S , typename E >
const S::psite & mln::internal::piter_adaptor_< Pi, S, E >::p_hook_ (  )  const [inline]

Hook to the current location.

References mln::internal::piter_adaptor_< Pi, S, E >::pi_.

template<typename Pi , typename S, typename E >
void mln::internal::piter_adaptor_< Pi, S, E >::pi_change_target_ ( const S &  s  )  [inline]

Change the site set targeted by pi_.

This default impl is a no-op. This method might be overridden.

References mln::internal::piter_adaptor_< Pi, S, E >::pi_.

template<typename E >
void mln::Site_Iterator< E >::start (  )  [inline, inherited]

References mln::exact().

template<typename Pi , typename S , typename E >
void mln::internal::piter_adaptor_< Pi, S, E >::start_ (  )  [inline]

Start an iteration.

Reimplemented in mln::p_if_piter_< Pi, S, F >.

References mln::internal::piter_adaptor_< Pi, S, E >::pi_.

template<typename S , typename E >
const S::psite & mln::internal::site_iterator_base< S, E >::subj_ (  )  [inline, inherited]
template<typename S , typename E >
const S *& mln::internal::site_iterator_base< S, E >::target_ (  )  [inline, inherited]

Give the target address. It might be 0.

template<typename S , typename E >
const S::site & mln::internal::site_iterator_base< S, E >::to_site (  )  const [inline, inherited]

Return the site it points to (as a Site_Proxy).

References mln::exact().


Member Data Documentation

template<typename Pi, typename S, typename E>
Pi mln::internal::piter_adaptor_< Pi, S, E >::pi_ [protected]
template<typename S, typename E>
const S* mln::internal::site_iterator_base< S, E >::s_ [protected, inherited]