3142: Provide a default implementation of center_at_() in site_relative_iterator_base.

* mln/core/dpsites_piter.hh, * mln/core/neighb.hh, * mln/win/multiple_size.hh: remove empty implementation of center_at_(). * mln/core/image/complex_neighborhood_piter.hh: add a new line. * mln/core/internal/site_relative_iterator_base.hh: add default implementation of center_at_(). --- milena/ChangeLog | 14 ++++++++++ milena/mln/core/dpsites_piter.hh | 28 +------------------ .../mln/core/image/complex_neighborhood_piter.hh | 4 ++- .../core/internal/site_relative_iterator_base.hh | 16 ++++++++++- milena/mln/core/neighb.hh | 28 +------------------ milena/mln/win/multiple_size.hh | 15 +--------- 6 files changed, 38 insertions(+), 67 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 4696e60..61a8e60 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,17 @@ +2009-01-09 Guillaume Lazzara <z@lrde.epita.fr> + + Provide a default implementation of center_at_() in + site_relative_iterator_base. + + * mln/core/dpsites_piter.hh, + * mln/core/neighb.hh, + * mln/win/multiple_size.hh: remove empty implementation of center_at_(). + + * mln/core/image/complex_neighborhood_piter.hh: add a new line. + + * mln/core/internal/site_relative_iterator_base.hh: add default + implementation of center_at_(). + 2009-01-08 Thierry Geraud <thierry.geraud@lrde.epita.fr> Cleanup level approx median. diff --git a/milena/mln/core/dpsites_piter.hh b/milena/mln/core/dpsites_piter.hh index 91709d7..b2cd978 100644 --- a/milena/mln/core/dpsites_piter.hh +++ b/milena/mln/core/dpsites_piter.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -74,10 +74,6 @@ namespace mln /// Go to the next point. void do_next_(); - /// Set the reference psite. - template <typename Pref> - void center_at_(const Pref&); - /// Compute the current psite. mln_psite(V) compute_p_() const; @@ -120,10 +116,6 @@ namespace mln /// Go to the next point. void do_next_(); - /// Do some work while setting the reference site. - template <typename Pref> - void center_at_(const Pref&); - /// Compute the current psite. mln_psite(V) compute_p_() const; @@ -187,14 +179,6 @@ namespace mln } template <typename V> - template <typename Pref> - inline - void - dpsites_fwd_piter<V>::center_at_(const Pref&) - { - } - - template <typename V> inline mln_psite(V) dpsites_fwd_piter<V>::compute_p_() const @@ -253,14 +237,6 @@ namespace mln } template <typename V> - template <typename Pref> - inline - void - dpsites_bkd_piter<V>::center_at_(const Pref&) - { - } - - template <typename V> inline mln_psite(V) dpsites_bkd_piter<V>::compute_p_() const diff --git a/milena/mln/core/image/complex_neighborhood_piter.hh b/milena/mln/core/image/complex_neighborhood_piter.hh index 0a91f30..32beda6 100644 --- a/milena/mln/core/image/complex_neighborhood_piter.hh +++ b/milena/mln/core/image/complex_neighborhood_piter.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -90,6 +91,7 @@ namespace mln /// Set the reference psite. template <typename Pref> void center_at_(const Pref& c); + /// Compute the current psite. psite compute_p_() const; /// \} diff --git a/milena/mln/core/internal/site_relative_iterator_base.hh b/milena/mln/core/internal/site_relative_iterator_base.hh index 7a662b6..ffa5c33 100644 --- a/milena/mln/core/internal/site_relative_iterator_base.hh +++ b/milena/mln/core/internal/site_relative_iterator_base.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -112,6 +113,11 @@ namespace mln private: + // Allows inherited classes to do extra work while centering. + // Default implementation. + template <typename P> + void center_at_(const P& c); + /// The psite designated by this iterator. mln_psite(S) p_; }; @@ -228,6 +234,14 @@ namespace mln return exact(*this); } + template <typename S, typename E> + template <typename P> + inline + void + site_relative_iterator_base<S,E>::center_at_(const P& c) + { + } + # endif // ! MLN_INCLUDE_ONLY } // end of namespace mln::internal diff --git a/milena/mln/core/neighb.hh b/milena/mln/core/neighb.hh index d509af0..d5f0e83 100644 --- a/milena/mln/core/neighb.hh +++ b/milena/mln/core/neighb.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -140,10 +140,6 @@ namespace mln /// Go to the next point. void do_next_(); - /// Do some work while centering the iterator. - template <typename Pref> - void center_at_(const Pref&); - /// Compute the current psite. mln_psite(W) compute_p_() const; @@ -182,10 +178,6 @@ public: /// Go to the next point. void do_next_(); - /// Do some work while centering the iterator. - template <typename Pref> - void center_at_(const Pref&); - /// Compute the current psite. mln_psite(W) compute_p_() const; @@ -318,14 +310,6 @@ protected: } template <typename W> - template <typename Pref> - inline - void - neighb_fwd_niter<W>::center_at_(const Pref&) - { - } - - template <typename W> inline mln_psite(W) neighb_fwd_niter<W>::compute_p_() const @@ -386,14 +370,6 @@ protected: } template <typename W> - template <typename Pref> - inline - void - neighb_bkd_niter<W>::center_at_(const Pref&) - { - } - - template <typename W> inline mln_psite(W) neighb_bkd_niter<W>::compute_p_() const diff --git a/milena/mln/win/multiple_size.hh b/milena/mln/win/multiple_size.hh index 86ccaed..8760b9c 100644 --- a/milena/mln/win/multiple_size.hh +++ b/milena/mln/win/multiple_size.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -155,10 +156,6 @@ namespace mln /// Go to the next point. void do_next_(); - /// Do some work while setting the reference site. - template <typename Pref> - void center_at_(const Pref&); - /// Compute the current psite. mln_psite(W) compute_p_() const; @@ -353,14 +350,6 @@ namespace mln } template <unsigned n, typename W, typename F> - template <typename Pref> - inline - void - multiple_size_qiter<n,W,F>::center_at_(const Pref&) - { - } - - template <unsigned n, typename W, typename F> inline mln_psite(W) multiple_size_qiter<n,W,F>::compute_p_() const -- 1.5.6.5
participants (1)
-
Guillaume Lazzara