A generic forward iterator on points of windows and of neighborhoods. More...
#include <dpsites_piter.hh>
Public Types | |
typedef Site_Proxy< void > | category |
typedef dpsites_fwd_piter< V > | exact_t |
typedef V::site | site |
The associated site type (as a Site_Proxy). | |
typedef V | target |
The associated target type. | |
Public Member Functions | |
const V::psite & | center () const |
The psite around which this iterator moves. | |
void | center_at (const P &c) |
void | change_target (const V &s) |
Change the site set targeted by this iterator. | |
V::psite | compute_p_ () const |
Compute the current psite. | |
void | do_next_ () |
Go to the next point. | |
void | do_start_ () |
Start an iteration. | |
template<typename P > | |
dpsites_fwd_piter (const V &v, const P &c) | |
Constructor. | |
dpsites_fwd_piter () | |
Constructor without argument. | |
void | invalidate () |
void | invalidate_ () |
Invalidate the iterator. | |
bool | is_valid () const |
bool | is_valid_ () const |
Test the iterator validity. | |
void | next () |
Go to the next element. | |
void | next_ () |
Go to the next point. | |
const V::psite & | p_hook_ () const |
Hook to the current location. | |
const V & | site_set () const |
Give the site set (neighborhood or window) that this iterator browses. | |
void | start () |
void | start_ () |
Start an iteration. | |
const V::psite & | subj_ () |
This overriding is very useful: it adds a test to prevent getting an invalid iterator when its center has moved. | |
const V *& | target_ () |
Give the target address. It might be 0. | |
const V::site & | to_site () const |
Return the site it points to (as a Site_Proxy). | |
dpsites_fwd_piter< V > & | 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 V::psite * | c_ |
A pointer to the center psite around which this iterator moves. | |
unsigned | i_ |
const V * | s_ |
The target. |
A generic forward iterator on points of windows and of neighborhoods.
The parameter V
is the type of std::vector enclosing structure.
typedef Site_Proxy<void> mln::Site_Proxy< dpsites_fwd_piter< V > >::category [inherited] |
Reimplemented from mln::Proxy< dpsites_fwd_piter< V > >.
typedef dpsites_fwd_piter< V > mln::Object< dpsites_fwd_piter< V > >::exact_t [inherited] |
typedef V ::site mln::internal::site_iterator_base< V , dpsites_fwd_piter< V > >::site [inherited] |
The associated site type (as a Site_Proxy).
typedef V mln::internal::site_iterator_base< V , dpsites_fwd_piter< V > >::target [inherited] |
The associated target type.
mln::dpsites_fwd_piter< V >::dpsites_fwd_piter | ( | const V & | v, | |
const P & | c | |||
) | [inline] |
Constructor.
[in] | v | Object that can provide an array of delta-points. |
[in] | c | Center point to iterate around. |
References mln::internal::site_relative_iterator_base< V, dpsites_fwd_piter< V > >::center_at(), and mln::internal::site_relative_iterator_base< V, dpsites_fwd_piter< V > >::change_target().
mln::dpsites_fwd_piter< V >::dpsites_fwd_piter | ( | ) | [inline] |
Constructor without argument.
const V ::psite& mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::center | ( | ) | const [inherited] |
The psite around which this iterator moves.
void mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::center_at | ( | const P & | c | ) | [inherited] |
Referenced by mln::dpsites_fwd_piter< V >::dpsites_fwd_piter().
void mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::change_target | ( | const V & | s | ) | [inherited] |
Change the site set targeted by this iterator.
Referenced by mln::dpsites_fwd_piter< V >::dpsites_fwd_piter().
V::psite mln::dpsites_fwd_piter< V >::compute_p_ | ( | ) | const [inline] |
Compute the current psite.
void mln::dpsites_fwd_piter< V >::do_next_ | ( | ) | [inline] |
Go to the next point.
References mln::dpsites_fwd_piter< V >::i_.
void mln::dpsites_fwd_piter< V >::do_start_ | ( | ) | [inline] |
Start an iteration.
References mln::dpsites_fwd_piter< V >::i_.
void mln::Site_Iterator< dpsites_fwd_piter< V > >::invalidate | ( | ) | [inherited] |
void mln::dpsites_fwd_piter< V >::invalidate_ | ( | ) | [inline] |
Invalidate the iterator.
References mln::dpsites_fwd_piter< V >::i_, and mln::internal::site_iterator_base< V, dpsites_fwd_piter< V > >::s_.
bool mln::Site_Iterator< dpsites_fwd_piter< V > >::is_valid | ( | ) | const [inherited] |
bool mln::dpsites_fwd_piter< V >::is_valid_ | ( | ) | const [inline] |
Test the iterator validity.
References mln::dpsites_fwd_piter< V >::i_, and mln::internal::site_iterator_base< V, dpsites_fwd_piter< V > >::s_.
void mln::Site_Iterator< dpsites_fwd_piter< V > >::next | ( | ) | [inherited] |
Go to the next element.
void mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::next_ | ( | ) | [inherited] |
Go to the next point.
const V ::psite& mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::p_hook_ | ( | ) | const [inherited] |
Hook to the current location.
const V & mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::site_set | ( | ) | const [inherited] |
Give the site set (neighborhood or window) that this iterator browses.
void mln::Site_Iterator< dpsites_fwd_piter< V > >::start | ( | ) | [inherited] |
void mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::start_ | ( | ) | [inherited] |
Start an iteration.
const V ::psite& mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::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< V, dpsites_fwd_piter< V > >.
const V *& mln::internal::site_iterator_base< V , dpsites_fwd_piter< V > >::target_ | ( | ) | [inherited] |
Give the target address. It might be 0.
const V ::site& mln::internal::site_iterator_base< V , dpsites_fwd_piter< V > >::to_site | ( | ) | const [inherited] |
Return the site it points to (as a Site_Proxy).
dpsites_fwd_piter< V > & mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::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.
const V ::psite* mln::internal::site_relative_iterator_base< V , dpsites_fwd_piter< V > >::c_ [protected, inherited] |
A pointer to the center psite around which this iterator moves.
unsigned mln::dpsites_fwd_piter< V >::i_ [protected] |
const V * mln::internal::site_iterator_base< V , dpsites_fwd_piter< V > >::s_ [protected, inherited] |
The target.
Referenced by mln::dpsites_fwd_piter< V >::invalidate_(), and mln::dpsites_fwd_piter< V >::is_valid_().