$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::internal::site_relative_iterator_base< S, E, C > Class Template Reference

#include <mln/core/internal/site_relative_iterator_base.hh>

Public Member Functions

 site_relative_iterator_base ()
const C & center () const
template<typename P >
void center_at (const P &c)
void change_target (const S &s)
void invalidate ()
bool is_valid () const
void next ()
void next_ ()
const S::psite & p_hook_ () const
const S & site_set () const
void start ()
void start_ ()
const S::psite & subj_ ()
const S *& target_ ()
const S::site & to_site () const
E & update ()

Protected Attributes

const C * c_
const S * s_

Public Types

typedef Site_Proxy< void > category
typedef E exact_t
typedef S::site site
typedef S target

Detailed Description

template<typename S, typename E, typename C = typename S ::psite>
class mln::internal::site_relative_iterator_base< S, E, C >

A generic iterator on points of windows and of neighborhoods.

Parameter S is the targeted "site set definition" type. It can be either a Window, or a Neighborhood.

IMPORTANT: Sub-classes have to define center_at_, do_start_, do_next_, is_valid_, invalidate_ and compute_p_. They shall define NEITHER start_ NOR next_.

Definition at line 62 of file site_relative_iterator_base.hh.

Constructor & Destructor Documentation

template<typename S, typename E, typename C = typename S ::psite>
mln::internal::site_relative_iterator_base< S, E, C >::site_relative_iterator_base ( )

Constructor witout argument.

Member Function Documentation

template<typename S, typename E, typename C = typename S ::psite>
const C& mln::internal::site_relative_iterator_base< S, E, C >::center ( ) const

The psite around which this iterator moves.

template<typename S, typename E, typename C = typename S ::psite>
template<typename P >
void mln::internal::site_relative_iterator_base< S, E, C >::center_at ( const P &  c)
template<typename S, typename E, typename C = typename S ::psite>
void mln::internal::site_relative_iterator_base< S, E, C >::change_target ( const S &  s)

Change the site set targeted by this iterator.

template<typename E>
void mln::Site_Iterator< E >::invalidate ( )
inherited
template<typename E>
bool mln::Site_Iterator< E >::is_valid ( ) const
inherited
template<typename E>
void mln::Site_Iterator< E >::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 E, typename C = typename S ::psite>
void mln::internal::site_relative_iterator_base< S, E, C >::next_ ( )

Go to the next point.

template<typename S, typename E, typename C = typename S ::psite>
const S ::psite& mln::internal::site_relative_iterator_base< S, E, C >::p_hook_ ( ) const

Hook to the current location.

template<typename S, typename E, typename C = typename S ::psite>
const S& mln::internal::site_relative_iterator_base< S, E, C >::site_set ( ) const

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

template<typename E>
void mln::Site_Iterator< E >::start ( )
inherited

Reimplemented in mln::hexa_fwd_piter_< S >.

template<typename S, typename E, typename C = typename S ::psite>
void mln::internal::site_relative_iterator_base< S, E, C >::start_ ( )

INTERNAL_API Start an iteration.

template<typename S, typename E, typename C = typename S ::psite>
const S ::psite& mln::internal::site_relative_iterator_base< S, E, C >::subj_ ( )

INTERNAL_API 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< S, E >.

template<typename S, typename E>
const S*& mln::internal::site_iterator_base< S, E >::target_ ( )
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
inherited

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

template<typename S, typename E, typename C = typename S ::psite>
E& mln::internal::site_relative_iterator_base< S, E, C >::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.

Member Data Documentation

template<typename S, typename E, typename C = typename S ::psite>
const C* mln::internal::site_relative_iterator_base< S, E, C >::c_
protected

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

Definition at line 113 of file site_relative_iterator_base.hh.

template<typename S, typename E>
const S* mln::internal::site_iterator_base< S, E >::s_
protectedinherited

The target.

Definition at line 91 of file site_iterator_base.hh.

Member Typedef Documentation

template<typename E>
typedef Site_Proxy<void> mln::Site_Proxy< E >::category
inherited

Definition at line 68 of file site_proxy.hh.

template<typename E>
typedef E mln::Object< E >::exact_t
inherited

Definition at line 105 of file object.hh.

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).

Definition at line 64 of file site_iterator_base.hh.

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

The associated target type.

Definition at line 61 of file site_iterator_base.hh.