Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes

mln::p_graph_piter< S, I > Class Template Reference

Generic iterator on point sites of a mln::S. More...

#include <p_graph_piter.hh>

Inheritance diagram for mln::p_graph_piter< S, I >:
Inheritance graph

List of all members.

Public Types

typedef Site_Proxy< void > category
typedef p_graph_piter< S, I > exact_t
typedef S pset
 The associated site set type.
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 change_target_ (const S &s)
 Part of the change_target specific to the exact iterator type, empty by default (to be overloaded).
const S::graph_t & graph () const
 Return the graph associated to the target S.
const iterhook_elt_ () const
 Return the underlying graph element iterator.
unsigned id () const
 Return the graph element id.
void invalidate ()
bool is_valid () const
 mln_q_subject (iter) element()
 Return the underlying graph element.
void next ()
 Go to the next element.
const S::psite & p_hook_ () const
 Hook to the current location.
const S & site_set () const
 Give the site set that this iterator browses.
void start ()
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).

 p_graph_piter ()
 Constructors.
 p_graph_piter (const S &pv)

bool is_valid_ () const
 Manipulation.
void invalidate_ ()
 Invalidate the iterator.
void start_ ()
 Start an iteration.
void next_ ()
 Go to the next point.

Protected Attributes

S::psite p_
 The psite designated by this iterator.
const S * s_
 The target.

Private Types

typedef I iter
typedef p_graph_piter< S, I > self_
typedef
internal::site_set_iterator_base
< S, self_
super_

Private Member Functions

void update_ ()
 Update the psite corresponding to this iterator.

Private Attributes

iter iter_
 The underlying graph iterator.

Detailed Description

template<typename S, typename I>
class mln::p_graph_piter< S, I >

Generic iterator on point sites of a mln::S.

Definition at line 55 of file p_graph_piter.hh.


Member Typedef Documentation

typedef Site_Proxy<void> mln::Site_Proxy< p_graph_piter< S, I > >::category [inherited]

Reimplemented from mln::Proxy< p_graph_piter< S, I > >.

Definition at line 63 of file site_proxy.hh.

typedef p_graph_piter< S, I > mln::Object< p_graph_piter< S, I > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<typename S, typename I>
typedef I mln::p_graph_piter< S, I >::iter [private]

Definition at line 61 of file p_graph_piter.hh.

typedef S mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::pset [inherited]

The associated site set type.

Definition at line 57 of file site_set_iterator_base.hh.

template<typename S, typename I>
typedef p_graph_piter<S,I> mln::p_graph_piter< S, I >::self_ [private]

Definition at line 59 of file p_graph_piter.hh.

typedef S ::site mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::site [inherited]

The associated site type (as a Site_Proxy).

Definition at line 64 of file site_iterator_base.hh.

template<typename S, typename I>
typedef internal::site_set_iterator_base< S, self_ > mln::p_graph_piter< S, I >::super_ [private]
typedef S mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::target [inherited]

The associated target type.

Definition at line 61 of file site_iterator_base.hh.


Constructor & Destructor Documentation

template<typename S , typename I >
mln::p_graph_piter< S, I >::p_graph_piter (  )  [inline]

Constructors.

Definition at line 151 of file p_graph_piter.hh.

References mln::Site_Iterator< p_graph_piter< S, I > >::is_valid().

template<typename S , typename I >
mln::p_graph_piter< S, I >::p_graph_piter ( const S &  pv  )  [inline]

Member Function Documentation

void mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::change_target ( const S &  s  )  [inherited]

Change the site set targeted by this iterator.

Referenced by mln::p_graph_piter< S, I >::p_graph_piter().

void mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::change_target_ ( const S &  s  )  [inherited]

Part of the change_target specific to the exact iterator type, empty by default (to be overloaded).

template<typename S , typename I >
const S::graph_t & mln::p_graph_piter< S, I >::graph (  )  const [inline]

Return the graph associated to the target S.

Definition at line 212 of file p_graph_piter.hh.

References mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::site_set().

template<typename S , typename I >
const I & mln::p_graph_piter< S, I >::hook_elt_ (  )  const [inline]

Return the underlying graph element iterator.

Definition at line 220 of file p_graph_piter.hh.

References mln::p_graph_piter< S, I >::iter_.

Referenced by mln::graph_window_piter< S, W, I >::center_at_(), and mln::graph_window_if_piter< S, W, I >::center_at_().

template<typename S , typename I >
unsigned mln::p_graph_piter< S, I >::id (  )  const [inline]

Return the graph element id.

Definition at line 228 of file p_graph_piter.hh.

References mln::p_graph_piter< S, I >::iter_.

void mln::Site_Iterator< p_graph_piter< S, I > >::invalidate (  )  [inherited]
template<typename S , typename I >
void mln::p_graph_piter< S, I >::invalidate_ (  )  [inline]

Invalidate the iterator.

Definition at line 176 of file p_graph_piter.hh.

References mln::p_graph_piter< S, I >::iter_.

bool mln::Site_Iterator< p_graph_piter< S, I > >::is_valid (  )  const [inherited]
template<typename S , typename I >
bool mln::p_graph_piter< S, I >::is_valid_ (  )  const [inline]

Manipulation.

Test if the iterator is valid.

Definition at line 168 of file p_graph_piter.hh.

References mln::p_graph_piter< S, I >::iter_.

template<typename S, typename I>
mln::p_graph_piter< S, I >::mln_q_subject ( iter   ) 

Return the underlying graph element.

void mln::Site_Iterator< p_graph_piter< S, I > >::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 , typename I >
void mln::p_graph_piter< S, I >::next_ (  )  [inline]
const S ::psite& mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::p_hook_ (  )  const [inherited]

Hook to the current location.

const S& mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::site_set (  )  const [inherited]

Give the site set that this iterator browses.

Referenced by mln::p_graph_piter< S, I >::graph().

void mln::Site_Iterator< p_graph_piter< S, I > >::start (  )  [inherited]
template<typename S , typename I >
void mln::p_graph_piter< S, I >::start_ (  )  [inline]
const S ::psite& mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::subj_ (  )  [inherited]

Give the subject (required by the Proxy interface).

const S*& mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::target_ (  )  [inherited]

Give the target address. It might be 0.

const S ::site& mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::to_site (  )  const [inherited]

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

template<typename S , typename I >
void mln::p_graph_piter< S, I >::update_ (  )  [inline, private]

Member Data Documentation

template<typename S, typename I>
iter mln::p_graph_piter< S, I >::iter_ [private]
S ::psite mln::internal::site_set_iterator_base< S, p_graph_piter< S, I > >::p_ [protected, inherited]

The psite designated by this iterator.

Definition at line 75 of file site_set_iterator_base.hh.

Referenced by mln::p_graph_piter< S, I >::update_().

const S* mln::internal::site_iterator_base< S, p_graph_piter< S, I > >::s_ [protected, inherited]

The target.

Definition at line 90 of file site_iterator_base.hh.