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

mln::internal::site_iterator_base< S, E > Struct Template Reference

A base class for site iterators. More...

#include <site_iterator_base.hh>

Inherits mln::Site_Iterator< E >, and internal::proxy_impl< const S::psite &, E >.

Inherited by mln::internal::piter_adaptor_< Pi, S, E >, mln::internal::site_relative_iterator_base< S, E, C >, and mln::internal::site_set_iterator_base< S, E >.

List of all members.

Public Types

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

Public Member Functions

void invalidate ()
bool is_valid () const
void next ()
 Go to the next element.
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).

Protected Member Functions

 site_iterator_base ()

Protected Attributes

const S * s_
 The target.

Private Types

typedef proxy_impl< const
typename S::psite &, E > 
super_

Detailed Description

template<typename S, typename E>
struct mln::internal::site_iterator_base< S, E >

A base class for site iterators.

NEVER DIRECTLY DERIVE FROM THIS CLASS.

Instead derive EITHER from site_set_iterator_base OR from site_relative_iterator_base OR from piter_adaptor_.

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

Definition at line 57 of file site_iterator_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.

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

The associated site type (as a Site_Proxy).

Definition at line 64 of file site_iterator_base.hh.

template<typename S, typename E>
typedef proxy_impl< const typename S ::psite&, E> mln::internal::site_iterator_base< S, E >::super_ [private]

Reimplemented in mln::box_runend_piter< P >, mln::box_runstart_piter< P >, mln::complex_neighborhood_fwd_piter< I, G, N >, mln::complex_neighborhood_bkd_piter< I, G, N >, mln::complex_window_fwd_piter< I, G, W >, mln::complex_window_bkd_piter< I, G, W >, mln::hexa_fwd_piter_< S >, mln::internal::p_complex_piter_base_< I, S, P, E >, mln::internal::piter_identity_< Pi, E >, mln::p_complex_faces_fwd_piter_< N, D, P >, mln::p_complex_faces_bkd_piter_< N, D, P >, mln::p_faces_fwd_piter_< N, D, P >, mln::p_faces_bkd_piter_< N, D, P >, mln::box_fwd_piter_< P >, mln::box_bkd_piter_< P >, mln::p_centered_piter< W >, mln::p_complex_fwd_piter_< D, G >, mln::p_complex_bkd_piter_< D, G >, mln::p_double_piter< S, I1, I2 >, mln::p_graph_piter< S, I >, mln::p_if_piter_< Pi, S, F >, mln::p_n_faces_fwd_piter< D, G >, mln::p_n_faces_bkd_piter< D, G >, mln::p_run_fwd_piter_< P >, mln::p_run_bkd_piter_< P >, mln::p_transformed_piter< Pi, S, F >, mln::morpho::tree::up_site_piter< T >, mln::morpho::tree::dn_site_piter< T >, mln::morpho::tree::up_node_piter< T >, mln::morpho::tree::dn_node_piter< T >, mln::morpho::tree::up_leaf_piter< T >, mln::morpho::tree::dn_leaf_piter< T >, mln::morpho::tree::depth1st_piter< T >, mln::win::multiple_qiter< W, F >, mln::win::multiple_size_qiter< n, W, F >, mln::internal::p_complex_piter_base_< topo::face_bkd_iter< D >, p_complex< D, G >, G::site, p_complex_bkd_piter_< D, G > >, mln::internal::p_complex_piter_base_< topo::faces_fwd_iter_< N, D >, p_faces< N, D, P >, P, p_faces_fwd_piter_< N, D, P > >, mln::internal::p_complex_piter_base_< topo::n_face_fwd_iter< D >, p_complex< D, G >, G::site, p_n_faces_fwd_piter< D, G > >, mln::internal::p_complex_piter_base_< topo::faces_bkd_iter_< N, D >, p_faces< N, D, P >, P, p_faces_bkd_piter_< N, D, P > >, mln::internal::p_complex_piter_base_< topo::faces_fwd_iter_< N, D >, p_complex< D, P >, P, p_complex_faces_fwd_piter_< N, D, P > >, mln::internal::p_complex_piter_base_< topo::n_face_bkd_iter< D >, p_complex< D, G >, G::site, p_n_faces_bkd_piter< D, G > >, mln::internal::p_complex_piter_base_< topo::face_fwd_iter< D >, p_complex< D, G >, G::site, p_complex_fwd_piter_< D, G > >, mln::internal::p_complex_piter_base_< topo::faces_bkd_iter_< N, D >, p_complex< D, P >, P, p_complex_faces_bkd_piter_< N, D, P > >, mln::internal::piter_identity_< T::leaves_t::bkd_piter, dn_leaf_piter< T > >, mln::internal::piter_identity_< T::sites_t::bkd_piter, up_site_piter< T > >, mln::internal::piter_identity_< T::nodes_t::fwd_piter, up_node_piter< T > >, mln::internal::piter_identity_< T::nodes_t::bkd_piter, dn_node_piter< T > >, mln::internal::piter_identity_< T::sites_t::fwd_piter, dn_site_piter< T > >, and mln::internal::piter_identity_< T::leaves_t::fwd_piter, up_leaf_piter< T > >.

Definition at line 94 of file site_iterator_base.hh.

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

The associated target type.

Definition at line 61 of file site_iterator_base.hh.


Constructor & Destructor Documentation

template<typename S , typename E >
mln::internal::site_iterator_base< S, E >::site_iterator_base (  )  [inline, protected]

Definition at line 102 of file site_iterator_base.hh.


Member Function Documentation

template<typename E >
void mln::Site_Iterator< E >::invalidate (  )  [inline, inherited]
template<typename E >
bool mln::Site_Iterator< E >::is_valid (  )  const [inline, inherited]
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().

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

Definition at line 123 of file site_iterator.hh.

References mln::exact().

template<typename S , typename E >
const S::psite & mln::internal::site_iterator_base< S, E >::subj_ (  )  [inline]

Give the subject (required by the Proxy interface).

Reimplemented in mln::internal::site_relative_iterator_base< S, E, C >, mln::internal::site_relative_iterator_base< mixed_neighb< W >, neighb_bkd_niter< W >, mixed_neighb< W >::psite >, mln::internal::site_relative_iterator_base< W, graph_window_piter< S, W, I >, W::center_t >, mln::internal::site_relative_iterator_base< neighb< W >, neighb_bkd_niter< W >, neighb< W >::psite >, mln::internal::site_relative_iterator_base< multiple< W, F >, multiple_qiter< W, F > >, mln::internal::site_relative_iterator_base< V, dpsites_bkd_piter< V > >, mln::internal::site_relative_iterator_base< neighb< W >, neighb_fwd_niter< W >, neighb< W >::psite >, mln::internal::site_relative_iterator_base< W, graph_window_if_piter< S, W, I > >, mln::internal::site_relative_iterator_base< mixed_neighb< W >, neighb_fwd_niter< W >, mixed_neighb< W >::psite >, mln::internal::site_relative_iterator_base< W, complex_window_fwd_piter< I, G, W > >, mln::internal::site_relative_iterator_base< W, complex_window_bkd_piter< I, G, W > >, mln::internal::site_relative_iterator_base< N, E, N::psite >, mln::internal::site_relative_iterator_base< multiple_size< n, W, F >, multiple_size_qiter< n, W, F > >, mln::internal::site_relative_iterator_base< N, complex_neighborhood_bkd_piter< I, G, N > >, mln::internal::site_relative_iterator_base< N, complex_neighborhood_fwd_piter< I, G, N > >, and mln::internal::site_relative_iterator_base< V, dpsites_fwd_piter< V > >.

Definition at line 119 of file site_iterator_base.hh.

References mln::exact().

template<typename S , typename E >
const S *& mln::internal::site_iterator_base< S, E >::target_ (  )  [inline]

Give the target address. It might be 0.

Definition at line 127 of file site_iterator_base.hh.

template<typename S , typename E >
const S::site & mln::internal::site_iterator_base< S, E >::to_site (  )  const [inline]

Member Data Documentation

template<typename S, typename E>
const S* mln::internal::site_iterator_base< S, E >::s_ [protected]