Public Types | Public Member Functions | Protected Attributes

mln::internal::neighb_niter_base< W, N, I, E > Class Template Reference

#include <neighb_niter_base.hh>

Inheritance diagram for mln::internal::neighb_niter_base< W, N, I, E >:
Inheritance graph

List of all members.

Public Types

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

Public Member Functions

const 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.
W::psite compute_p_ () const
 Compute the current psite.
void do_next_ ()
 Go to the next point.
void do_start_ ()
 Start an iteration.
void invalidate ()
void invalidate_ ()
 Invalidate the iterator.
bool is_valid () const
bool is_valid_ () const
 Test the iterator validity.
template<typename P >
 neighb_niter_base (const N &nbh, const P &c)
 neighb_niter_base ()
 Constructor without argument.
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).
E & 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.

Protected Attributes

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

Detailed Description

template<typename W, typename N, typename I, typename E>
class mln::internal::neighb_niter_base< W, N, I, E >

Definition at line 45 of file neighb_niter_base.hh.


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]

Definition at line 173 of file object.hh.

typedef N ::site mln::internal::site_iterator_base< N , E >::site [inherited]

The associated site type (as a Site_Proxy).

Definition at line 64 of file site_iterator_base.hh.

typedef N mln::internal::site_iterator_base< N , E >::target [inherited]

The associated target type.

Definition at line 61 of file site_iterator_base.hh.


Constructor & Destructor Documentation

template<typename W , typename N , typename I , typename E >
mln::internal::neighb_niter_base< W, N, I, E >::neighb_niter_base (  )  [inline]

Constructor without argument.

Definition at line 88 of file neighb_niter_base.hh.

template<typename W , typename N, typename I , typename E >
template<typename P >
mln::internal::neighb_niter_base< W, N, I, E >::neighb_niter_base ( const N &  nbh,
const P &  c 
) [inline]

Member Function Documentation

const N::psite & mln::internal::site_relative_iterator_base< N , E, N::psite >::center (  )  const [inherited]

The psite around which this iterator moves.

void mln::internal::site_relative_iterator_base< N , E, N::psite >::center_at ( const P &  c  )  [inherited]
void mln::internal::site_relative_iterator_base< N , E, N::psite >::change_target ( const N &  s  )  [inherited]

Change the site set targeted by this iterator.

Referenced by mln::internal::neighb_niter_base< W, N, I, E >::neighb_niter_base().

template<typename W , typename N , typename I , typename E >
W::psite mln::internal::neighb_niter_base< W, N, I, E >::compute_p_ (  )  const [inline]

Compute the current psite.

Definition at line 137 of file neighb_niter_base.hh.

template<typename W , typename N , typename I , typename E >
void mln::internal::neighb_niter_base< W, N, I, E >::do_next_ (  )  [inline]

Go to the next point.

Definition at line 129 of file neighb_niter_base.hh.

References mln::internal::neighb_niter_base< W, N, I, E >::i_.

template<typename W , typename N , typename I , typename E >
void mln::internal::neighb_niter_base< W, N, I, E >::do_start_ (  )  [inline]

Start an iteration.

Definition at line 121 of file neighb_niter_base.hh.

References mln::internal::neighb_niter_base< W, N, I, E >::i_.

template<typename E >
void mln::Site_Iterator< E >::invalidate (  )  [inline, inherited]
template<typename W , typename N , typename I , typename E >
void mln::internal::neighb_niter_base< W, N, I, E >::invalidate_ (  )  [inline]

Invalidate the iterator.

Definition at line 113 of file neighb_niter_base.hh.

References mln::internal::neighb_niter_base< W, N, I, E >::i_.

template<typename E >
bool mln::Site_Iterator< E >::is_valid (  )  const [inline, inherited]
template<typename W , typename N , typename I , typename E >
bool mln::internal::neighb_niter_base< W, N, I, E >::is_valid_ (  )  const [inline]

Test the iterator validity.

Definition at line 105 of file neighb_niter_base.hh.

References mln::internal::neighb_niter_base< W, N, I, E >::i_.

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.

Definition at line 92 of file site_iterator.hh.

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

void mln::internal::site_relative_iterator_base< N , E, N::psite >::next_ (  )  [inherited]

Go to the next point.

const N ::psite& mln::internal::site_relative_iterator_base< N , E, N::psite >::p_hook_ (  )  const [inherited]

Hook to the current location.

const N & mln::internal::site_relative_iterator_base< N , E, N::psite >::site_set (  )  const [inherited]

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

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

Definition at line 123 of file site_iterator.hh.

References mln::exact().

void mln::internal::site_relative_iterator_base< N , E, N::psite >::start_ (  )  [inherited]

Start an iteration.

const N ::psite& mln::internal::site_relative_iterator_base< N , E, 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, E >.

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

Give the target address. It might be 0.

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

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

E& mln::internal::site_relative_iterator_base< N , E, 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 N::psite * mln::internal::site_relative_iterator_base< N , E, 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 W, typename N, typename I, typename E>
I mln::internal::neighb_niter_base< W, N, I, E >::i_ [protected]
const N * mln::internal::site_iterator_base< N , E >::s_ [protected, inherited]

The target.

Definition at line 90 of file site_iterator_base.hh.