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

mln::graph_window_if_piter< S, W, I > Class Template Reference

Forward iterator on line graph window. More...

#include <graph_window_if_piter.hh>

Inheritance diagram for mln::graph_window_if_piter< S, W, I >:
Inheritance graph

List of all members.

Public Types

typedef Site_Proxy< void > category
typedef graph_window_if_piter
< S, W, I > 
exact_t
typedef W::site site
 The associated site type (as a Site_Proxy).
typedef W target
 The associated target type.

typedef S::fun_t::result P
 Associated types.

Public Member Functions

const typename W::psite & center () const
 The psite around which this iterator moves.
void center_at (const P &c)
void change_target (const W &s)
 Change the site set targeted by this iterator.
template<typename Pref >
void init_ (const Window< W > &win, const Pref &p_ref)
 Delayed initialization.
void invalidate ()
bool is_masked (const typename S::graph_element &center, const typename S::graph_element &element) const
 Return wheter a graph element must be masked by this window.
bool is_valid () const
void next ()
 Go to the next element.
void next_ ()
 Go to the next point.
const W::psite & p_hook_ () const
 Hook to the current location.
const W & site_set () const
 Give the site set (neighborhood or window) that this iterator browses.
void start ()
void start_ ()
 Start an iteration.
const W::psite & subj_ ()
 This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved.
const W *& target_ ()
 Give the target address. It might be 0.
const W::site & to_site () const
 Return the site it points to (as a Site_Proxy).
graph_window_if_piter< S, W, I > & update ()
 Warning: this method is an advanced tool provided for very special occasions; if you are a regular user, you should never use it! Calling this method forces this relative iterator to synchronize with its center when it has just moved and when the relative iterator still makes sense.

 graph_window_if_piter ()
 Construction.
template<typename Pref >
 graph_window_if_piter (const Window< W > &win, const Pref &p_ref)

bool is_valid_ () const
 Manipulation.
void invalidate_ ()
 Invalidate the iterator.
void do_start_ ()
 Start an iteration.
void do_next_ ()
 Go to the next point.
template<typename Pref >
void center_at_ (const Pref &c)
 Do some work while setting the reference site.
template<typename I2 >
void center_at_ (const p_graph_piter< S, I2 > &c)
 Do some work while setting the reference site.
const S::graph_element & element () const
 Return the graph element pointed by this iterator.
W::psite compute_p_ () const
 Compute the current psite.
unsigned id () const
 Return the graph element id.

Protected Attributes

const typename W::psite * c_
 A pointer to the center psite around which this iterator moves.
const W * s_
 The target.

Private Types

typedef graph_window_if_piter
< S, W, I > 
self_
typedef
internal::site_relative_iterator_base
< W, self_
super_

Private Attributes

iter_

Detailed Description

template<typename S, typename W, typename I>
class mln::graph_window_if_piter< S, W, I >

Forward iterator on line graph window.

Definition at line 47 of file graph_window_if_piter.hh.


Member Typedef Documentation

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

Reimplemented from mln::Proxy< graph_window_if_piter< S, W, I > >.

Definition at line 63 of file site_proxy.hh.

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

Definition at line 173 of file object.hh.

template<typename S , typename W , typename I >
typedef S::fun_t ::result mln::graph_window_if_piter< S, W, I >::P

Associated types.

Definition at line 60 of file graph_window_if_piter.hh.

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

Definition at line 54 of file graph_window_if_piter.hh.

typedef W ::site mln::internal::site_iterator_base< W , graph_window_if_piter< S, W, 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 W , typename I >
typedef internal::site_relative_iterator_base<W,self_> mln::graph_window_if_piter< S, W, I >::super_ [private]

Definition at line 55 of file graph_window_if_piter.hh.

typedef W mln::internal::site_iterator_base< W , graph_window_if_piter< S, W, I > >::target [inherited]

The associated target type.

Definition at line 61 of file site_iterator_base.hh.


Constructor & Destructor Documentation

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

Construction.

Definition at line 122 of file graph_window_if_piter.hh.

template<typename S , typename W , typename I >
template<typename Pref >
mln::graph_window_if_piter< S, W, I >::graph_window_if_piter ( const Window< W > &  win,
const Pref &  p_ref 
) [inline]

Member Function Documentation

const typename W ::psite & mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::center (  )  const [inherited]

The psite around which this iterator moves.

void mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::center_at ( const P &  c  )  [inherited]
template<typename S , typename W , typename I >
template<typename Pref >
void mln::graph_window_if_piter< S, W, I >::center_at_ ( const Pref &  c  )  [inline]

Do some work while setting the reference site.

Definition at line 188 of file graph_window_if_piter.hh.

template<typename S , typename W , typename I >
template<typename I2 >
void mln::graph_window_if_piter< S, W, I >::center_at_ ( const p_graph_piter< S, I2 > &  c  )  [inline]

Do some work while setting the reference site.

Definition at line 197 of file graph_window_if_piter.hh.

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

void mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::change_target ( const W &  s  )  [inherited]

Change the site set targeted by this iterator.

Referenced by mln::graph_window_if_piter< S, W, I >::init_().

template<typename S , typename W , typename I >
W::psite mln::graph_window_if_piter< S, W, I >::compute_p_ (  )  const [inline]

Compute the current psite.

Definition at line 205 of file graph_window_if_piter.hh.

template<typename S , typename W , typename I >
void mln::graph_window_if_piter< S, W, I >::do_next_ (  )  [inline]
template<typename S , typename W , typename I >
void mln::graph_window_if_piter< S, W, I >::do_start_ (  )  [inline]
template<typename S , typename W , typename I >
const S::graph_element & mln::graph_window_if_piter< S, W, I >::element (  )  const [inline]

Return the graph element pointed by this iterator.

Definition at line 213 of file graph_window_if_piter.hh.

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

Return the graph element id.

FIXME: we do not want to have this member since there is an automatic conversion to the graph element. C++ does not seem to use this conversion operator.

Definition at line 221 of file graph_window_if_piter.hh.

template<typename S , typename W , typename I >
template<typename Pref >
void mln::graph_window_if_piter< S, W, I >::init_ ( const Window< W > &  win,
const Pref &  p_ref 
) [inline]
void mln::Site_Iterator< graph_window_if_piter< S, W, I > >::invalidate (  )  [inherited]
template<typename S , typename W , typename I >
void mln::graph_window_if_piter< S, W, I >::invalidate_ (  )  [inline]

Invalidate the iterator.

Definition at line 159 of file graph_window_if_piter.hh.

bool mln::internal::is_masked_impl_selector< S, W::mask_t::domain_t , graph_window_if_piter< S, W, I > >::is_masked ( const typename S::graph_element &  center,
const typename S::graph_element &  element 
) const [inherited]

Return wheter a graph element must be masked by this window.

Referenced by mln::graph_window_if_piter< S, W, I >::do_next_(), and mln::graph_window_if_piter< S, W, I >::do_start_().

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

Manipulation.

Test if the iterator is valid.

Definition at line 151 of file graph_window_if_piter.hh.

void mln::Site_Iterator< graph_window_if_piter< S, W, 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.
void mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::next_ (  )  [inherited]

Go to the next point.

const W ::psite& mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::p_hook_ (  )  const [inherited]

Hook to the current location.

const W & mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::site_set (  )  const [inherited]

Give the site set (neighborhood or window) that this iterator browses.

void mln::Site_Iterator< graph_window_if_piter< S, W, I > >::start (  )  [inherited]
void mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::start_ (  )  [inherited]

Start an iteration.

const W ::psite& mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::subj_ (  )  [inherited]

This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved.

Some sub-classes provide an update() method for the client to say that she really want to read the iterator just after the center has changed.

Reimplemented from mln::internal::site_iterator_base< W, graph_window_if_piter< S, W, I > >.

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

Give the target address. It might be 0.

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

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

graph_window_if_piter< S, W, I > & mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::update (  )  [inherited]

Warning: this method is an advanced tool provided for very special occasions; if you are a regular user, you should never use it! Calling this method forces this relative iterator to synchronize with its center when it has just moved and when the relative iterator still makes sense.


Member Data Documentation

const typename W ::psite * mln::internal::site_relative_iterator_base< W , graph_window_if_piter< S, W, I > , typename W ::psite >::c_ [protected, inherited]

A pointer to the center psite around which this iterator moves.

Definition at line 108 of file site_relative_iterator_base.hh.

Referenced by mln::graph_window_if_piter< S, W, I >::do_next_(), and mln::graph_window_if_piter< S, W, I >::do_start_().

template<typename S , typename W , typename I >
I mln::graph_window_if_piter< S, W, I >::iter_ [private]

Definition at line 109 of file graph_window_if_piter.hh.

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

The target.

Definition at line 90 of file site_iterator_base.hh.