
* mln/core/image/complex_window_piter.hh (mln::complex_window_fwd_piter<I, G, W>::iter) (mln::complex_window_bkd_piter<I, G, W>::iter): Rename typedefs as... (mln::complex_window_fwd_piter<I, G, W>::iter_type) (mln::complex_window_bkd_piter<I, G, W>::iter_type): ...these. Adjust. (mln::complex_window_fwd_piter<I, G, W>::iter) (mln::complex_window_bkd_piter<I, G, W>::iter): New accessors. --- milena/ChangeLog | 16 +++++++ milena/mln/core/image/complex_window_piter.hh | 59 +++++++++++++++++++++--- 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index db0dde3..13ad8f2 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -24,6 +24,22 @@ 2008-10-22 Roland Levillain <roland@lrde.epita.fr> + Add accessors to complex piters on windows. + + * mln/core/image/complex_window_piter.hh + (mln::complex_window_fwd_piter<I, G, W>::iter) + (mln::complex_window_bkd_piter<I, G, W>::iter): + Rename typedefs as... + (mln::complex_window_fwd_piter<I, G, W>::iter_type) + (mln::complex_window_bkd_piter<I, G, W>::iter_type): + ...these. + Adjust. + (mln::complex_window_fwd_piter<I, G, W>::iter) + (mln::complex_window_bkd_piter<I, G, W>::iter): + New accessors. + +2008-10-22 Roland Levillain <roland@lrde.epita.fr> + Add accessors to complex piters on neighborhoods. * mln/core/image/complex_neighborhood_piter.hh diff --git a/milena/mln/core/image/complex_window_piter.hh b/milena/mln/core/image/complex_window_piter.hh index 085c18a..4a77fbc 100644 --- a/milena/mln/core/image/complex_window_piter.hh +++ b/milena/mln/core/image/complex_window_piter.hh @@ -33,8 +33,7 @@ # include <mln/core/internal/site_relative_iterator_base.hh> -// FIXME: These might be factor-able (notably with -// complex_neighborhood_piter.hh) +// FIXME: These might be factor-able, both between fwd/bkd and nbh/win. /* FIXME: Do we really want to inherit from internal::site_relative_iterator_base? I might duplicate things, @@ -64,6 +63,8 @@ namespace mln public: /// The Pseudo_Site type. typedef mln_psite(W) psite; + /// The type of the underlying complex iterator. + typedef typename W::complex_fwd_iter iter_type; public: /// Construction. @@ -95,11 +96,15 @@ namespace mln psite compute_p_() const; /// \} + /// \brief Accessors. + /// \{ + const iter_type& iter() const; + iter_type& iter(); + /// \} + private: - /// The type of the underlying complex iterator. - typedef typename W::complex_fwd_iter iter; /// The underlying complex iterator. - iter iter_; + iter_type iter_; }; @@ -126,6 +131,8 @@ namespace mln public: /// The Pseudo_Site type. typedef mln_psite(W) psite; + /// The type of the underlying complex iterator. + typedef typename W::complex_bkd_iter iter_type; public: /// Construction. @@ -157,11 +164,15 @@ namespace mln psite compute_p_() const; /// \} + /// \brief Accessors. + /// \{ + const iter_type& iter() const; + iter_type& iter(); + /// \} + private: - /// The type of the underlying complex iterator. - typedef typename W::complex_bkd_iter iter; /// The underlying complex iterator. - iter iter_; + iter_type iter_; }; @@ -246,6 +257,22 @@ namespace mln return psite(this->center().site_set(), iter_); } + template <typename I, typename G, typename W> + inline + const typename W::complex_fwd_iter& + complex_window_fwd_piter<I, G, W>::iter() const + { + return iter_; + } + + template <typename I, typename G, typename W> + inline + typename W::complex_fwd_iter& + complex_window_fwd_piter<I, G, W>::iter() + { + return iter_; + } + template <typename I, typename G, typename W> inline @@ -328,6 +355,22 @@ namespace mln return psite(this->center().site_set(), iter_); } + template <typename I, typename G, typename W> + inline + const typename W::complex_bkd_iter& + complex_window_bkd_piter<I, G, W>::iter() const + { + return iter_; + } + + template <typename I, typename G, typename W> + inline + typename W::complex_bkd_iter& + complex_window_bkd_piter<I, G, W>::iter() + { + return iter_; + } + template <typename I, typename G, typename W> inline -- 1.6.0.1