
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Remove the final '_' in image_morpher. * mln/core/internal/image_morpher.hh (image_morpher_): Rename as... (image_morpher): ...this. * mln/trait/images.hh, * mln/core/translate_image.hh, * mln/core/internal/image_if_base.hh, * mln/core/internal/image_identity.hh, * mln/core/internal/image_domain_morpher.hh, * mln/core/internal/image_value_morpher.hh, * mln/core/cast_image.hh, * mln/core/sub_image.hh, * mln/core/t_image.hh, * mln/core/image_if.hh, * mln/core/hexa.hh, * mln/neighb/image.hh, * mln/value/stack.hh, * mln/border/find.hh, * sandbox/duhamel/translate_image.hh, * sandbox/jardonnet/subsampling/sub_sampled_image.hh, * sandbox/garrigues/image_identity/image_domain_morpher.hh, * sandbox/garrigues/image_identity/image_value_morpher.hh: Propagate renaming. * mln/core/internal/image_base.hh (data): Move into... * mln/core/internal/data.hh: ...this new file. mln/border/find.hh | 2 mln/core/cast_image.hh | 2 mln/core/hexa.hh | 2 mln/core/image_if.hh | 2 mln/core/internal/data.hh | 54 +++++++++++++++ mln/core/internal/image_base.hh | 17 ---- mln/core/internal/image_domain_morpher.hh | 2 mln/core/internal/image_identity.hh | 2 mln/core/internal/image_if_base.hh | 2 mln/core/internal/image_morpher.hh | 20 ++--- mln/core/internal/image_value_morpher.hh | 2 mln/core/sub_image.hh | 2 mln/core/t_image.hh | 4 - mln/core/translate_image.hh | 4 - mln/neighb/image.hh | 2 mln/trait/images.hh | 2 mln/value/stack.hh | 2 sandbox/duhamel/translate_image.hh | 4 - sandbox/garrigues/image_identity/image_domain_morpher.hh | 2 sandbox/garrigues/image_identity/image_value_morpher.hh | 2 sandbox/jardonnet/subsampling/sub_sampled_image.hh | 4 - 21 files changed, 88 insertions(+), 47 deletions(-) Index: mln/trait/images.hh --- mln/trait/images.hh (revision 2060) +++ mln/trait/images.hh (working copy) @@ -175,7 +175,7 @@ template <typename D, typename T, typename I> - struct default_image_morpher_ : default_image_<T, I> + struct default_image_morpher : default_image_<T, I> { // misc => delegation except for 'category' typedef typename image_<D>::size size; Index: mln/core/translate_image.hh --- mln/core/translate_image.hh (revision 2060) +++ mln/core/translate_image.hh (working copy) @@ -72,7 +72,7 @@ { template <typename I> - struct image_< translate_image<I> > : default_image_morpher_< I, mln_value(I), + struct image_< translate_image<I> > : default_image_morpher< I, mln_value(I), translate_image<I> > { typedef trait::image::category::domain_morpher category; @@ -101,7 +101,7 @@ struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> > { - typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_; + typedef mln::internal::image_morpher< I, mln_pset(I), translate_image<I> > super_; typedef line_piter_<mln_psite(I)> line_piter; /// Return type of read-write access. Index: mln/core/internal/image_if_base.hh --- mln/core/internal/image_if_base.hh (revision 2060) +++ mln/core/internal/image_if_base.hh (working copy) @@ -68,7 +68,7 @@ { template <typename I, typename F, typename E> - struct image_< mln::internal::image_if_base_<I,F,E> > : default_image_morpher_< I, mln_value(I), E > + struct image_< mln::internal::image_if_base_<I,F,E> > : default_image_morpher< I, mln_value(I), E > { private: typedef mln_trait_image_data(I) I_data_; Index: mln/core/internal/data.hh --- mln/core/internal/data.hh (revision 0) +++ mln/core/internal/data.hh (revision 0) @@ -0,0 +1,54 @@ +// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library without restriction. Specifically, if other files +// instantiate templates or use macros or inline functions from this +// file, or you compile this file and link it with other files to +// produce an executable, this file does not by itself cause the +// resulting executable to be covered by the GNU General Public +// License. This exception does not however invalidate any other +// reasons why the executable file might be covered by the GNU General +// Public License. + +#ifndef MLN_CORE_INTERNAL_DATA_HH +# define MLN_CORE_INTERNAL_DATA_HH + +/*! \file mln/core/internal/data.hh + * + * \brief Declaration of the type of image data. + */ + + +namespace mln +{ + + namespace internal + { + + /// \internal Class of image internal data. + /// It has to be specialized for every image type. + + template <typename I> + struct data; + + } // end of namespace mln::internal + +} // end of namespace mln + + +#endif // ! MLN_CORE_INTERNAL_DATA_HH Index: mln/core/internal/image_base.hh --- mln/core/internal/image_base.hh (revision 2060) +++ mln/core/internal/image_base.hh (working copy) @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -37,6 +37,7 @@ # include <mln/core/grids.hh> # include <mln/core/trait/qlf_value.hh> # include <mln/core/internal/check/image_all.hh> +# include <mln/core/internal/data.hh> # include <mln/util/tracked_ptr.hh> @@ -56,20 +57,6 @@ namespace mln { - - namespace internal - { - - /// \internal Class of image internal data. - /// FIXME: Say more about it! - - template <typename I> - struct data; - - } // end of namespace mln::internal - - - namespace internal { Index: mln/core/internal/image_morpher.hh --- mln/core/internal/image_morpher.hh (revision 2060) +++ mln/core/internal/image_morpher.hh (working copy) @@ -49,7 +49,7 @@ * */ template <typename I, typename S, typename E> - class image_morpher_ : public image_base<S, E> + class image_morpher : public image_base<S, E> { public: @@ -72,7 +72,7 @@ operator I() const; // FIXME: Very dangerous? Remove? protected: - image_morpher_(); + image_morpher(); }; } // end of namespace mln::internal @@ -87,7 +87,7 @@ // template <typename Subject, typename T, // typename I, typename S, typename E> // void init_(Subject s, T& target, -// const internal::image_morpher_<I,S,E>& model); +// const internal::image_morpher<I,S,E>& model); // FIXME: Lines above have been inactivated because they are either // prioritary or ambiguous. @@ -108,14 +108,14 @@ template <typename I, typename S, typename E> inline - image_morpher_<I,S,E>::image_morpher_() + image_morpher<I,S,E>::image_morpher() { } template <typename I, typename S, typename E> inline mlc_const(I)* - image_morpher_<I,S,E>::delegatee_() const + image_morpher<I,S,E>::delegatee_() const { return this->data_ == 0 ? 0 : & this->data_->ima_; } @@ -123,14 +123,14 @@ template <typename I, typename S, typename E> inline I* - image_morpher_<I,S,E>::delegatee_() + image_morpher<I,S,E>::delegatee_() { return this->data_ == 0 ? 0 : & this->data_->ima_; } template <typename I, typename S, typename E> inline - image_morpher_<I,S,E>::operator I() const + image_morpher<I,S,E>::operator I() const { mln_precondition(exact(this)->has_data()); return * this->delegatee_(); @@ -139,7 +139,7 @@ template <typename I, typename S, typename E> inline bool - image_morpher_<I,S,E>::has_data() const + image_morpher<I,S,E>::has_data() const { return this->data_ != 0 && @@ -154,7 +154,7 @@ // template <typename Subject, typename T, // typename I, typename S, typename E> // void init_(Subject s, T& target, -// const internal::image_morpher_<I,S,E>& model) +// const internal::image_morpher<I,S,E>& model) // { // std::cout << "deleg... "; // // FIXME: Precondition. @@ -167,7 +167,7 @@ void init_(Subject s, T& target, const Image<J>& model_) { // FIXME: Precondition. - // FIXME: Properly check that J is an internal::image_morpher_. + // FIXME: Properly check that J is an internal::image_morpher. const J& model = exact(model_); init_(s, target, * model.delegatee_()); } Index: mln/core/internal/image_identity.hh --- mln/core/internal/image_identity.hh (revision 2060) +++ mln/core/internal/image_identity.hh (working copy) @@ -48,7 +48,7 @@ * */ template <typename I, typename S, typename E> - class image_identity : public image_morpher_<I, S, E> + class image_identity : public image_morpher<I, S, E> { public: Index: mln/core/internal/image_domain_morpher.hh --- mln/core/internal/image_domain_morpher.hh (revision 2060) +++ mln/core/internal/image_domain_morpher.hh (working copy) @@ -48,7 +48,7 @@ * */ template <typename I, typename S, typename E> - class image_domain_morpher : public image_morpher_<I, S, E> + class image_domain_morpher : public image_morpher<I, S, E> { public: Index: mln/core/internal/image_value_morpher.hh --- mln/core/internal/image_value_morpher.hh (revision 2060) +++ mln/core/internal/image_value_morpher.hh (working copy) @@ -51,7 +51,7 @@ * */ template <typename I, typename E> - class image_value_morpher : public image_morpher_<I, mln_pset(I), E> + class image_value_morpher : public image_morpher<I, mln_pset(I), E> { public: Index: mln/core/cast_image.hh --- mln/core/cast_image.hh (revision 2060) +++ mln/core/cast_image.hh (working copy) @@ -66,7 +66,7 @@ { template <typename T, typename I> - struct image_< cast_image_<T,I> > : default_image_morpher_< I, T, cast_image_<T,I> > + struct image_< cast_image_<T,I> > : default_image_morpher< I, T, cast_image_<T,I> > { typedef trait::image::io::read_only io; }; Index: mln/core/sub_image.hh --- mln/core/sub_image.hh (revision 2060) +++ mln/core/sub_image.hh (working copy) @@ -67,7 +67,7 @@ { template <typename I, typename S> - struct image_< sub_image<I,S> > : default_image_morpher_< I, + struct image_< sub_image<I,S> > : default_image_morpher< I, mln_value(I), sub_image<I,S> > { Index: mln/core/t_image.hh --- mln/core/t_image.hh (revision 2060) +++ mln/core/t_image.hh (working copy) @@ -81,12 +81,12 @@ */ template <typename I> class t_image - : public internal::image_morpher_< I, mln_pset(I), t_image<I> > + : public internal::image_morpher< I, mln_pset(I), t_image<I> > { public: /// Super type. typedef - internal::image_morpher_< I, mln_pset(I), t_image<I> > super_; + internal::image_morpher< I, mln_pset(I), t_image<I> > super_; /// Point_Site associated type. typedef mln_psite(I) psite; Index: mln/core/image_if.hh --- mln/core/image_if.hh (revision 2060) +++ mln/core/image_if.hh (working copy) @@ -68,7 +68,7 @@ { template <typename I, typename F> - struct image_< image_if<I,F> > : default_image_morpher_< I, + struct image_< image_if<I,F> > : default_image_morpher< I, mln_value(I), image_if<I,F> > { Index: mln/core/hexa.hh --- mln/core/hexa.hh (revision 2060) +++ mln/core/hexa.hh (working copy) @@ -67,7 +67,7 @@ { template <typename I> - struct image_< hexa<I> > : default_image_morpher_< I, mln_value(I), + struct image_< hexa<I> > : default_image_morpher< I, mln_value(I), hexa<I> > { // private: Index: mln/neighb/image.hh --- mln/neighb/image.hh (revision 2060) +++ mln/neighb/image.hh (working copy) @@ -71,7 +71,7 @@ template <typename I, typename N> struct image_< neighb::image<I, N> > - : public default_image_morpher_< I, mln_value(I), neighb::image<I, N> > + : public default_image_morpher< I, mln_value(I), neighb::image<I, N> > { typedef trait::image::category::morpher category; Index: mln/value/stack.hh --- mln/value/stack.hh (revision 2060) +++ mln/value/stack.hh (working copy) @@ -101,7 +101,7 @@ template <unsigned n, typename I> struct image_< mln::value::stack_image<n, I> > - : default_image_morpher_< I, + : default_image_morpher< I, algebra::vec<n, mln_value(I)>, mln::value::stack_image<n, I> > { Index: mln/border/find.hh --- mln/border/find.hh (revision 2060) +++ mln/border/find.hh (working copy) @@ -61,7 +61,7 @@ template <typename I, typename S, typename E> inline - unsigned find__(const mln::internal::image_morpher_<I,S,E>& ima) + unsigned find__(const mln::internal::image_morpher<I,S,E>& ima) { return border::find(*ima.delegatee_()); } Index: sandbox/duhamel/translate_image.hh --- sandbox/duhamel/translate_image.hh (revision 2060) +++ sandbox/duhamel/translate_image.hh (working copy) @@ -66,7 +66,7 @@ { template <typename I> - struct image_< translate_image<I> > : default_image_morpher_< I, mln_value(I), + struct image_< translate_image<I> > : default_image_morpher< I, mln_value(I), translate_image<I> > { @@ -89,7 +89,7 @@ struct translate_image : public mln::internal::image_identity< I, mln_pset(I), translate_image<I> > { - typedef mln::internal::image_morpher_< I, mln_pset(I), translate_image<I> > super_; + typedef mln::internal::image_morpher< I, mln_pset(I), translate_image<I> > super_; /// Return type of read-write access. typedef typename internal::morpher_lvalue_<I>::ret lvalue; Index: sandbox/jardonnet/subsampling/sub_sampled_image.hh --- sandbox/jardonnet/subsampling/sub_sampled_image.hh (revision 2060) +++ sandbox/jardonnet/subsampling/sub_sampled_image.hh (working copy) @@ -68,12 +68,12 @@ template <typename I> class sub_sampled_image - : public internal::image_morpher_< I, mln_pset(I), sub_sampled_image<I> > + : public internal::image_morpher< I, mln_pset(I), sub_sampled_image<I> > { public: /// Super type. typedef - internal::image_morpher_< I, mln_pset(I), sub_sampled_image<I> > super_; + internal::image_morpher< I, mln_pset(I), sub_sampled_image<I> > super_; /// Point_Site associated type. typedef mln_psite(I) psite; Index: sandbox/garrigues/image_identity/image_domain_morpher.hh --- sandbox/garrigues/image_identity/image_domain_morpher.hh (revision 2060) +++ sandbox/garrigues/image_identity/image_domain_morpher.hh (working copy) @@ -50,7 +50,7 @@ * \internal */ template <typename I, typename S, typename E> - class image_domain_morpher : public virtual image_morpher_<I, S, E> + class image_domain_morpher : public virtual image_morpher<I, S, E> { public: Index: sandbox/garrigues/image_identity/image_value_morpher.hh --- sandbox/garrigues/image_identity/image_value_morpher.hh (revision 2060) +++ sandbox/garrigues/image_identity/image_value_morpher.hh (working copy) @@ -50,7 +50,7 @@ * \internal */ template <typename I, typename E> - class image_value_morpher : public virtual image_morpher_<I, mln_pset(I), E> + class image_value_morpher : public virtual image_morpher<I, mln_pset(I), E> { public: