
Damien Thivolle <damien@lrde.epita.fr> writes:
Index: olena/ChangeLog from Damien Thivolle <damien@lrde.epita.fr>
* olena/oln/core/abstract/image.hh: Add macros. * olena/oln/morpher/generic_morpher.hh: generic_morpher implementation.
Index: olena/oln/core/abstract/image.hh --- olena/oln/core/abstract/image.hh Mon, 15 Mar 2004 19:40:09 +0100 odou_s (oln/t/25_image.hh 1.27 640) +++ olena/oln/core/abstract/image.hh Thu, 25 Mar 2004 20:08:16 +0100 thivol_d (oln/t/25_image.hh 1.27 640) @@ -125,7 +125,7 @@ ** at \a p in the current image. */
- const value_type& + const value_type operator[](const abstract::point<point_type>& p) const { return this->exact().at(p.exact()); @@ -343,11 +343,36 @@ # define oln_concrete_type(ImgType) \ typename mute<ImgType>::ret
+# define oln_exact_type(ImgType) \ +mlc_exact_type(ImgType)::exact_type +# define oln_exact_type_(ImgType) \ +mlc_exact_type_(ImgType)::exact_type
Si on etend les macros et les templates, on obtient quelque chose du genre ImgType::exact_type::exact_type, d'ou l'inutilite selon moi du '::exact_type'. De plus c'est une macro generale a toute hierarchie statique, je ne vois donc pas pourquoi en faire une version oln.
+ /// Return the value stored at \a p in the decorated image. + const value_type + at(const point_type& p) const + { + return this->Ima_.exact().at(p); + } toto.exact() doit s'ecrire to_exact(toto) + + /// Return a reference to the value stored at \a p in the decorated image. + value_type& + at(const point_type& p) + { + return this->Ima_.exact().at(p); + } idem
+ + /// Return a pointer to the value container of the decorated image. + const impl_type* + impl() const + { + return this->Ima_.exact().impl(); + } idem
+ + /// Return a pointer to the value container of the decorated image. + impl_type* + impl() + { + return this->Ima_.exact().impl(); + } idem
+ + /// Return a copy of the decorated image. + image_type + clone_() const + { + return this->Ima_.exact().clone_(); + } idem
+ + /// Return the size of the decorated image. + size_t + npoints_() + { + return this->Ima_.exact().npoints_(); + } + idem
+ /// Assign \a rhs to the decorated image. + image_type& + assign(deco_type& rhs) + { + return this->Ima_.exact().assign(rhs); + } + idem
+ /// Assign the decorated image to \a r + deco_type& + operator=(const oln::io::internal::anything& r) + { + return r.assign(this->Ima_); + } + + /*! \brief Set the border width of the decorated image to + ** \a min_border. + */ + void + border_set_width(oln::coord min_border, + bool copy_border = false) const + { + return this->Ima_.exact().border_set_width(min_border, copy_border); + }
Y'a-t-il une raison a tout ces this ? -- Giovanni Palma EPITA - promo 2005 - membre d'EpX - LRDE Mob. : +33 (0)6 60 97 31 74