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

mln::complex_neighborhood_fwd_piter< I, G, N > Class Template Reference

Forward iterator on complex neighborhood. More...

#include <complex_neighborhood_piter.hh>

Inheritance diagram for mln::complex_neighborhood_fwd_piter< I, G, N >:
Inheritance graph

List of all members.

Public Types

typedef Site_Proxy< void > category
typedef
complex_neighborhood_fwd_piter
< I, G, N > 
exact_t
typedef N::complex_fwd_iter iter_type
 The type of the underlying complex iterator.
typedef N::psite psite
 The Pseudo_Site type.
typedef N::site site
 The associated site type (as a Site_Proxy).
typedef N target
 The associated target type.

Public Member Functions

const typename N::psite & center () const
 The psite around which this iterator moves.
void center_at (const P &c)
void change_target (const N &s)
 Change the site set targeted by this iterator.
template<typename Pref >
void init_ (const Neighborhood< N > &nbh, const Pref &p_ref)
 Delayed initialization.
void invalidate ()
bool is_valid () const
void next ()
 Go to the next element.
void next_ ()
 Go to the next point.
const N::psite & p_hook_ () const
 Hook to the current location.
const N & site_set () const
 Give the site set (neighborhood or window) that this iterator browses.
void start ()
void start_ ()
 Start an iteration.
const N::psite & subj_ ()
 This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved.
const N *& target_ ()
 Give the target address. It might be 0.
const N::site & to_site () const
 Return the site it points to (as a Site_Proxy).
complex_neighborhood_fwd_piter
< I, G, N > & 
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.

 complex_neighborhood_fwd_piter ()
 Construction.
template<typename Pref >
 complex_neighborhood_fwd_piter (const Neighborhood< N > &nbh, 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 site.
template<typename Pref >
void center_at_ (const Pref &c)
 Additional work while setting the reference site.
psite compute_p_ () const
 Compute the current psite.

const iter_typeiter () const
 Accessors.
iter_typeiter ()

Protected Attributes

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

Private Types

typedef
complex_neighborhood_fwd_piter
< I, G, N > 
self_
typedef
internal::site_relative_iterator_base
< N, self_
super_

Private Attributes

iter_type iter_
 The underlying complex iterator.

Detailed Description

template<typename I, typename G, typename N>
class mln::complex_neighborhood_fwd_piter< I, G, N >

Forward iterator on complex neighborhood.

Definition at line 53 of file complex_neighborhood_piter.hh.


Member Typedef Documentation

typedef Site_Proxy<void> mln::Site_Proxy< complex_neighborhood_fwd_piter< I, G, N > >::category [inherited]

Reimplemented from mln::Proxy< complex_neighborhood_fwd_piter< I, G, N > >.

Definition at line 63 of file site_proxy.hh.

Definition at line 173 of file object.hh.

template<typename I, typename G, typename N>
typedef N::complex_fwd_iter mln::complex_neighborhood_fwd_piter< I, G, N >::iter_type

The type of the underlying complex iterator.

Definition at line 64 of file complex_neighborhood_piter.hh.

template<typename I, typename G, typename N>
typedef N ::psite mln::complex_neighborhood_fwd_piter< I, G, N >::psite

The Pseudo_Site type.

Definition at line 62 of file complex_neighborhood_piter.hh.

template<typename I, typename G, typename N>
typedef complex_neighborhood_fwd_piter<I, G, N> mln::complex_neighborhood_fwd_piter< I, G, N >::self_ [private]

Definition at line 57 of file complex_neighborhood_piter.hh.

typedef N ::site mln::internal::site_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > >::site [inherited]

The associated site type (as a Site_Proxy).

Definition at line 64 of file site_iterator_base.hh.

template<typename I, typename G, typename N>
typedef internal::site_relative_iterator_base< N, self_ > mln::complex_neighborhood_fwd_piter< I, G, N >::super_ [private]

The associated target type.

Definition at line 61 of file site_iterator_base.hh.


Constructor & Destructor Documentation

template<typename I , typename G , typename N >
mln::complex_neighborhood_fwd_piter< I, G, N >::complex_neighborhood_fwd_piter (  )  [inline]

Construction.

Definition at line 198 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
template<typename Pref >
mln::complex_neighborhood_fwd_piter< I, G, N >::complex_neighborhood_fwd_piter ( const Neighborhood< N > &  nbh,
const Pref &  p_ref 
) [inline]

Member Function Documentation

const typename N ::psite & mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::center (  )  const [inherited]

The psite around which this iterator moves.

Referenced by mln::complex_neighborhood_fwd_piter< I, G, N >::center_at_().

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

Additional work while setting the reference site.

Definition at line 259 of file complex_neighborhood_piter.hh.

References mln::internal::site_relative_iterator_base< N, complex_neighborhood_fwd_piter< I, G, N > >::center().

void mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::change_target ( const N &  s  )  [inherited]

Change the site set targeted by this iterator.

Referenced by mln::complex_neighborhood_fwd_piter< I, G, N >::init_().

template<typename I , typename G , typename N >
N::psite mln::complex_neighborhood_fwd_piter< I, G, N >::compute_p_ (  )  const [inline]

Compute the current psite.

Definition at line 267 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
void mln::complex_neighborhood_fwd_piter< I, G, N >::do_next_ (  )  [inline]

Go to the next site.

Definition at line 250 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
void mln::complex_neighborhood_fwd_piter< I, G, N >::do_start_ (  )  [inline]

Start an iteration.

Definition at line 242 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
template<typename Pref >
void mln::complex_neighborhood_fwd_piter< I, G, N >::init_ ( const Neighborhood< N > &  nbh,
const Pref &  p_ref 
) [inline]
void mln::Site_Iterator< complex_neighborhood_fwd_piter< I, G, N > >::invalidate (  )  [inherited]
template<typename I , typename G , typename N >
void mln::complex_neighborhood_fwd_piter< I, G, N >::invalidate_ (  )  [inline]

Invalidate the iterator.

Definition at line 234 of file complex_neighborhood_piter.hh.

bool mln::Site_Iterator< complex_neighborhood_fwd_piter< I, G, N > >::is_valid (  )  const [inherited]
template<typename I , typename G , typename N >
bool mln::complex_neighborhood_fwd_piter< I, G, N >::is_valid_ (  )  const [inline]

Manipulation.

Test if the iterator is valid.

Definition at line 226 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
const N::complex_fwd_iter & mln::complex_neighborhood_fwd_piter< I, G, N >::iter (  )  const [inline]

Accessors.

Definition at line 275 of file complex_neighborhood_piter.hh.

template<typename I , typename G , typename N >
N::complex_fwd_iter & mln::complex_neighborhood_fwd_piter< I, G, N >::iter (  )  [inline]

Definition at line 283 of file complex_neighborhood_piter.hh.

void mln::Site_Iterator< complex_neighborhood_fwd_piter< I, G, N > >::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< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::next_ (  )  [inherited]

Go to the next point.

const N ::psite& mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::p_hook_ (  )  const [inherited]

Hook to the current location.

const N & mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::site_set (  )  const [inherited]

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

void mln::Site_Iterator< complex_neighborhood_fwd_piter< I, G, N > >::start (  )  [inherited]
void mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::psite >::start_ (  )  [inherited]

Start an iteration.

const N ::psite& mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::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< N, complex_neighborhood_fwd_piter< I, G, N > >.

const N *& mln::internal::site_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > >::target_ (  )  [inherited]

Give the target address. It might be 0.

const N ::site& mln::internal::site_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > >::to_site (  )  const [inherited]

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

complex_neighborhood_fwd_piter< I, G, N > & mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::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 N ::psite * mln::internal::site_relative_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > , typename N ::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.

template<typename I, typename G, typename N>
iter_type mln::complex_neighborhood_fwd_piter< I, G, N >::iter_ [private]

The underlying complex iterator.

Definition at line 107 of file complex_neighborhood_piter.hh.

const N * mln::internal::site_iterator_base< N , complex_neighborhood_fwd_piter< I, G, N > >::s_ [protected, inherited]

The target.

Definition at line 90 of file site_iterator_base.hh.