
https://svn.lrde.epita.fr/svn/oln/trunk/olena Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Have more tests pass with scoop-alt, and clean up a bit. Despite the new proxy-deferred mechanism in scoop-alt, a lot of tests still fail to compile. A real deferring mechanism (as in standard scoop) is required. * oln/core/2d/image2d.hh (super_trait_< image2d<T> >): Move this class above vtypes< image2d<T> >. * oln/core/internal/box.hh (vtypes< box_fwd_piter_<B> >::point) (vtypes< box_bkd_piter_<B> >::point): Use stc_deduce_typename instead of a bare B::point. (box_fwd_piter_, box_bkd_piter_) [OLENA_USE_SCOOP_ALT]: Don't check static assertions (mlc_is_a(B, Point_Set)), since scoop-alt doesn't handle it yet. * oln/core/internal/f_ch_value.hh (oln_ch_value_, oln_ch_value) (oln_plain_value) [OLENA_USE_SCOOP_ALT]: Rely on stc_find_type_in instead of stc_type_in since scoop-alt doesn't handle it yet. * oln/core/internal/image_base.hh, * oln/core/internal/encoded_image.hh, * oln/core/gen/rle_image.hh, * oln/core/gen/sparse_image.hh, * oln/core/internal/dpoint_base.hh, * oln/core/internal/point_base.hh, * oln/core/internal/iterator_on_points_base.hh, * oln/core/internal/piter_adaptor.hh * oln/core/internal/neighborhood_base.hh, [OLENA_USE_SCOOP_ALT]: Handle deferred vtypes � la scoop-alt. * oln/core/internal/point_set_base.hh: Likewise. (super_trait_< internal::point_set_base_<Exact> >::ret): Set to mlc::none. (point_set_base_): Adjust super class: inherit from internal::point_set_selector_< stc_type(Exact, box)*, Exact >. instead of super_trait_< point_set_base_<Exact> >::ret. * oln/core/internal/dpoint_base.hh (super_trait_< internal::dpoint_base_<Exact> >::ret) * oln/core/internal/point_base.hh (super_trait_< internal::point_base_<Exact> >::ret): * oln/core/internal/iterator_on_points_base.hh Set to mlc::none. * oln/core/internal/category_of.hh: Rewrite the category retrieval, so that super_traits_ relationships not ending with mlc::none are caught. (get_category_of_): Remove. Replaced by... (get_category_as_a_typedef_, get_category_as_a_vtype_): ...these (new) classes. (category_of_): Adjust. * oln/core/internal/encoded_image_pset.hh (vtypes< internal::enc_image_pset_<P> >::std_container): New typedef. (enc_image_pset_::std_container): New typedef. Use it to define... (enc_image_pset_piter_::con_): ...this member. (enc_image_pset_fwd_piter_, enc_image_pset_bkd_piter_): Use stc_using to retrieve the vtype std_container. Use it to define... (enc_image_pset_fwd_piter_::it_, enc_image_pset_bkd_piter_::it_): ...these members. * tests/core/box2d.cc: New test. * tests/core/Makefile.am (check_PROGRAMS): Add box2d. (box2d_SOURCES): New. * oln/Makefile.am (nobase_oln_HEADERS): Remove dead files. Add value/gray_level.hh. oln/Makefile.am | 26 +-------------- oln/core/2d/image2d.hh | 18 +++++----- oln/core/equipment.hh | 2 - oln/core/gen/rle_image.hh | 20 ++++++++++- oln/core/gen/sparse_image.hh | 21 +++++++++++- oln/core/internal/box.hh | 20 ++++++++--- oln/core/internal/category_of.hh | 46 +++++++++++++++++++++------ oln/core/internal/dpoint_base.hh | 13 ++++++- oln/core/internal/encoded_image.hh | 15 ++++++++ oln/core/internal/encoded_image_pset.hh | 19 +++++++---- oln/core/internal/f_ch_value.hh | 20 ++++++++++- oln/core/internal/image_base.hh | 8 ++++ oln/core/internal/image_selectors.hh | 2 - oln/core/internal/iterator_on_points_base.hh | 20 ++++++++++- oln/core/internal/neighborhood_base.hh | 5 ++ oln/core/internal/piter_adaptor.hh | 4 ++ oln/core/internal/point_base.hh | 9 ++++- oln/core/internal/point_set_base.hh | 12 +++++-- tests/core/Makefile.am | 2 + tests/core/box2d.cc | 37 +++++++++++++++++++++ 20 files changed, 251 insertions(+), 68 deletions(-) Index: tests/core/box2d.cc --- tests/core/box2d.cc (revision 0) +++ tests/core/box2d.cc (revision 0) @@ -0,0 +1,37 @@ +// Copyright (C) 2007 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. + +#include <oln/core/2d/box2d.hh> + + +int +main() +{ + typedef oln::box2d box_t; + mlc::assert_< mlc_is_a_( box_t, oln::Point_Set ) >::check(); + mlc::assert_< mlc_is_a_( box_t, oln::Box ) >::check(); +} Index: tests/core/Makefile.am --- tests/core/Makefile.am (revision 1017) +++ tests/core/Makefile.am (working copy) @@ -21,6 +21,7 @@ check_PROGRAMS = \ apply \ at \ + box2d \ dpoint2d \ grid \ image1d \ @@ -51,6 +52,7 @@ # Images and auxiliary structures. dpoint2d_SOURCES = dpoint2d.cc +box2d_SOURCES = box2d.cc grid_SOURCES = grid.cc image1d_SOURCES = image1d.cc image2d_SOURCES = image2d.cc Index: oln/core/2d/image2d.hh --- oln/core/2d/image2d.hh (revision 1017) +++ oln/core/2d/image2d.hh (working copy) @@ -43,6 +43,15 @@ template <typename T> class image2d; + /// Super type. + template <typename T> + struct super_trait_< image2d<T> > + { + typedef image2d<T> current; + typedef internal::plain_primitive_image_<current> ret; + }; + + // Virtual types. template <typename T> struct vtypes< image2d<T> > @@ -66,15 +75,6 @@ }; - /// Super type. - template <typename T> - struct super_trait_< image2d<T> > - { - typedef image2d<T> current; - typedef internal::plain_primitive_image_<current> ret; - }; - - /// General 2D image class. template <typename T> Index: oln/core/equipment.hh --- oln/core/equipment.hh (revision 1017) +++ oln/core/equipment.hh (working copy) @@ -170,8 +170,8 @@ -/// \{ /// FIXME: Bad! +/// \{ # include <oln/core/init.hh> Index: oln/core/gen/rle_image.hh --- oln/core/gen/rle_image.hh (revision 1017) +++ oln/core/gen/rle_image.hh (working copy) @@ -59,10 +59,26 @@ typedef P point; typedef typename P::coord coord; - typedef typename vtypes< internal::encoded_image_< rle_image<P, T> > >::pset pset__; +#ifndef OLENA_USE_SCOOP_ALT + private: + typedef rle_image<P, T> self__; + public: + typedef std::pair< stc_deferred_type(self__, pset), + std::vector< value > > data; +#endif + }; - typedef std::pair< pset__, std::vector< value > > data; +#ifdef OLENA_USE_SCOOP_ALT + template <typename P, typename T> + struct single_vtype< rle_image<P, T>, typedef_::data > + { + private: + typedef rle_image<P, T> self__; + typedef T value__; + public: + typedef std::pair< stc_type(self__, pset), std::vector< value__ > > ret; }; +#endif // rle_image Index: oln/core/gen/sparse_image.hh --- oln/core/gen/sparse_image.hh (revision 1017) +++ oln/core/gen/sparse_image.hh (working copy) @@ -61,10 +61,27 @@ typedef P point; typedef typename P::coord coord; - typedef typename vtypes< internal::encoded_image_< sparse_image<P, T> > >::pset pset__; +#ifndef OLENA_USE_SCOOP_ALT + private: + typedef sparse_image<P, T> self__; + public: + typedef std::pair< stc_deferred_type(self__, pset), + std::vector <std::vector<value> > > data; +#endif + }; - typedef std::pair< pset__, std::vector <std::vector<value> > > data; +#ifdef OLENA_USE_SCOOP_ALT + template <typename P, typename T> + struct single_vtype< sparse_image<P, T>, typedef_::data > + { + private: + typedef sparse_image<P, T> self__; + typedef T value__; + public: + typedef std::pair< stc_type(self__, pset), + std::vector< std::vector<value__> > > ret; }; +#endif // sparse_image class template < typename P, typename T> Index: oln/core/internal/dpoint_base.hh --- oln/core/internal/dpoint_base.hh (revision 1017) +++ oln/core/internal/dpoint_base.hh (working copy) @@ -45,7 +45,9 @@ template <typename Exact> struct super_trait_< internal::dpoint_base_<Exact> > { - typedef Dpoint<Exact> ret; + // super_trait_ set to mlc::none, since Point is a concept + // (interface). + typedef mlc::none ret; }; template <typename Exact> @@ -54,7 +56,13 @@ typedef stc::abstract grid; typedef stc_deferred(grid) grid__; + + // FIXME: Improve scoop-alt to get rid of this difference. +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_dim(grid__) > dim; +# else + typedef stc::final< stc_deferred_from(grid__, dim) > dim; +# endif typedef stc::abstract coord; typedef stc::abstract point; // FIXME: Just like in point_base.hh @@ -66,7 +74,8 @@ namespace internal { - // FIXME: Factor code for classes defined over vectors (dpoint_base_ and point_base_). + // FIXME: Factor code for classes defined over vectors + // (dpoint_base_ and point_base_). template <typename Exact> class dpoint_base_ : public Dpoint<Exact> Index: oln/core/internal/box.hh --- oln/core/internal/box.hh (revision 1017) +++ oln/core/internal/box.hh (working copy) @@ -133,21 +133,25 @@ template <typename B> struct vtypes< box_fwd_piter_<B> > { - typedef typename B::point point; + stc_deduce_typename(B, point); }; template <typename B> struct vtypes< box_bkd_piter_<B> > { - typedef typename B::point point; + stc_deduce_typename(B, point); }; /// Class box_fwd_piter_<P>. template <typename B> - class box_fwd_piter_ : public internal::iterator_on_points_base_< box_fwd_piter_<B> >, - private mlc::assert_< mlc_is_a(B, Point_Set) > + class box_fwd_piter_ : public internal::iterator_on_points_base_< box_fwd_piter_<B> > + // FIXME: It seems we cannot check this assertion using while using + // scoop-alt. Investigate. +# ifndef OLENA_USE_SCOOP_ALT + , private mlc::assert_< mlc_is_a(B, Point_Set) > +# endif { typedef box_fwd_piter_<B> current; typedef internal::iterator_on_points_base_<current> super; @@ -172,8 +176,12 @@ /// Class box_bkd_piter_<B>. template <typename B> - class box_bkd_piter_ : public internal::iterator_on_points_base_< box_bkd_piter_<B> >, - private mlc::assert_< mlc_is_a(B, Point_Set) > + class box_bkd_piter_ : public internal::iterator_on_points_base_< box_bkd_piter_<B> > + // FIXME: It seems we cannot check this assertion using while using + // scoop-alt. Investigate. +# ifndef OLENA_USE_SCOOP_ALT + , private mlc::assert_< mlc_is_a(B, Point_Set) > +# endif { typedef box_bkd_piter_<B> current; typedef internal::iterator_on_points_base_<current> super; Index: oln/core/internal/f_ch_value.hh --- oln/core/internal/f_ch_value.hh (revision 1017) +++ oln/core/internal/f_ch_value.hh (working copy) @@ -30,16 +30,32 @@ # include <oln/core/internal/image_base.hh> - +// FIXME: scoop-alt is not robust to vtype checks (is_defined). +# ifndef OLENA_USE_SCOOP_ALT #define oln_ch_value_(I, T) \ oln::internal::f_ch_value_< stc_type_in_(oln, I, skeleton), T >::ret #define oln_ch_value(I, T) \ typename oln::internal::f_ch_value_< stc_type_in(oln, I, skeleton), T >::ret +# define oln_plain_value(I, T) \ + typename oln::internal::f_ch_value_< \ + stc_type_in(oln, oln_plain(I), skeleton), T \ + >::ret +# else +# define oln_ch_value_(I, T) \ + oln::internal::f_ch_value_< stc_find_type_in_(oln, I, skeleton), T >::ret + +# define oln_ch_value(I, T) \ + typename oln::internal::f_ch_value_< \ + stc_find_type_in(oln, I, skeleton), T \ + >::ret # define oln_plain_value(I, T) \ -typename oln::internal::f_ch_value_< stc_type_in(oln, oln_plain(I), skeleton), T >::ret + typename oln::internal::f_ch_value_< \ + stc_find_type_in(oln, oln_plain(I), skeleton), T \ + >::ret +# endif Index: oln/core/internal/point_set_base.hh --- oln/core/internal/point_set_base.hh (revision 1017) +++ oln/core/internal/point_set_base.hh (working copy) @@ -60,7 +60,9 @@ template <typename Exact> struct super_trait_< internal::point_set_base_<Exact> > { - typedef internal::point_set_selector_< stc_deferred(box)*, Exact > ret; + // Set to mlc::none, since Point_Set and Box (the super classes of + // point_set_selector) are both concepts. + typedef mlc::none ret; }; @@ -77,7 +79,12 @@ typedef stc_deferred(fwd_piter) fwd_piter__; typedef stc::final< stc::is<Point_Set> > category; + // FIXME: Improve scoop-alt to get rid of this difference. +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_grid(point__) > grid; +# else + typedef stc::final< stc_deferred_from(point__, grid) > grid; +# endif // typedef stc::final< oln_coord(point__) > coord; typedef stc::final< fwd_piter__ > piter; }; @@ -89,7 +96,8 @@ /// Base class for point sets. template <typename Exact> - struct point_set_base_ : public super_trait_< point_set_base_<Exact> >::ret + struct point_set_base_ : + public internal::point_set_selector_< stc_type(Exact, box)*, Exact > { protected: point_set_base_(); Index: oln/core/internal/encoded_image.hh --- oln/core/internal/encoded_image.hh (revision 1017) +++ oln/core/internal/encoded_image.hh (working copy) @@ -50,12 +50,27 @@ template <typename Exact> struct vtypes< internal::encoded_image_<Exact> > { +# ifndef OLENA_USE_SCOOP_ALT typedef stc_deferred(point) point__; typedef internal::enc_image_psite_<point__> psite; typedef internal::enc_image_pset_<point__> pset; +# endif typedef mlc::none plain; }; +# ifdef OLENA_USE_SCOOP_ALT + template <typename Exact> + struct single_vtype< internal::encoded_image_<Exact>, typedef_::psite > + { + typedef internal::enc_image_psite_< stc_type(Exact, point) > ret; + }; + + template <typename Exact> + struct single_vtype< internal::encoded_image_<Exact>, typedef_::pset > + { + typedef internal::enc_image_pset_< stc_type(Exact, point) > ret; + }; +# endif namespace internal { Index: oln/core/internal/image_selectors.hh --- oln/core/internal/image_selectors.hh (revision 1017) +++ oln/core/internal/image_selectors.hh (working copy) @@ -59,7 +59,7 @@ }; - // FIXME: don't work + // FIXME: doesn't work template <typename Exact> struct case_< Image_mutability, Exact, 2 > : Index: oln/core/internal/image_base.hh --- oln/core/internal/image_base.hh (revision 1017) +++ oln/core/internal/image_base.hh (working copy) @@ -159,11 +159,19 @@ // Final. typedef stc::final< stc::is<Image> > category; +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_box(pset__) > box; typedef stc::final< oln_grid(point__) > grid; typedef stc::final< oln_dpoint(point__) > dpoint; typedef stc::final< oln_fwd_piter(pset__) > fwd_piter; typedef stc::final< oln_bkd_piter(pset__) > bkd_piter; +# else + typedef stc::final< stc_deferred_from(pset__, box) > box; + typedef stc::final< stc_deferred_from(point__, grid) > grid; + typedef stc::final< stc_deferred_from(point__, dpoint) > dpoint; + typedef stc::final< stc_deferred_from(pset__, fwd_piter) > fwd_piter; + typedef stc::final< stc_deferred_from(pset__, bkd_piter) > bkd_piter; +# endif typedef fwd_piter piter; }; Index: oln/core/internal/point_base.hh --- oln/core/internal/point_base.hh (revision 1017) +++ oln/core/internal/point_base.hh (working copy) @@ -44,7 +44,9 @@ template <typename Exact> struct super_trait_< internal::point_base_<Exact> > { - typedef Point<Exact> ret; + // super_trait_ set to mlc::none, since Point is a concept + // (interface). + typedef mlc::none ret; }; template <typename Exact> @@ -57,7 +59,12 @@ typedef stc_deferred(grid) grid__; // Final: + // FIXME: Improve scoop-alt to get rid of this difference. +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_dim(grid__) > dim; +# else + typedef stc::final< stc_deferred_from(grid__, dim) > dim; +# endif typedef stc::final< stc::is<Point> > category; }; Index: oln/core/internal/piter_adaptor.hh --- oln/core/internal/piter_adaptor.hh (revision 1017) +++ oln/core/internal/piter_adaptor.hh (working copy) @@ -54,7 +54,11 @@ typedef stc::abstract adapted; typedef stc_deferred(adapted) adapted__; +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_point(adapted__) > point; +# else + typedef stc::final< stc_deferred_from (adapted__, point) > point; +# endif }; Index: oln/core/internal/encoded_image_pset.hh --- oln/core/internal/encoded_image_pset.hh (revision 1017) +++ oln/core/internal/encoded_image_pset.hh (working copy) @@ -65,6 +65,7 @@ typedef typename oln::internal::f_point_to_box_< P >::ret box; typedef internal::enc_image_pset_fwd_piter_<P> fwd_piter; typedef internal::enc_image_pset_bkd_piter_<P> bkd_piter; + typedef std::vector<std::pair<point, unsigned> > std_container; }; namespace internal @@ -81,7 +82,7 @@ stc_using(point); stc_using(box); - typedef std::vector<std::pair<point, unsigned> > std_container; + typedef stc_type(current, std_container) std_container; enc_image_pset_(); @@ -216,6 +217,7 @@ public: stc_using(point); typedef enc_image_psite_<point> psite; + typedef stc_type(enc_image_pset_<point>, std_container) std_container; const enc_image_psite_<point>& impl_to_psite() const; const enc_image_psite_<point>* impl_psite_adr() const; @@ -225,7 +227,7 @@ protected: enc_image_pset_piter_(const enc_image_pset_<point>& con); - const typename enc_image_pset_<point>::std_container& con_; + const std_container& con_; point p_; enc_image_psite_<point> ps_; @@ -294,12 +296,14 @@ { // class enc_image_pset__fwd_iterator_ template <typename P> - class enc_image_pset_fwd_piter_ : public enc_image_pset_piter_<enc_image_pset_fwd_piter_<P> > + class enc_image_pset_fwd_piter_ : + public enc_image_pset_piter_<enc_image_pset_fwd_piter_<P> > { typedef enc_image_pset_piter_< enc_image_pset_fwd_piter_<P> > super; typedef enc_image_pset_fwd_piter_<P> current; public: stc_using(point); + stc_using(std_container); enc_image_pset_fwd_piter_(const enc_image_pset_<P>& con); @@ -309,7 +313,7 @@ bool impl_is_valid() const; protected: - typename enc_image_pset_<point>::std_container::const_iterator it_; + typename std_container::const_iterator it_; }; # ifndef OLN_INCLUDE_ONLY @@ -395,12 +399,14 @@ { // enc_image_pset_bkd_piter_ template <typename P> - class enc_image_pset_bkd_piter_ : public enc_image_pset_piter_<enc_image_pset_bkd_piter_<P> > + class enc_image_pset_bkd_piter_ : + public enc_image_pset_piter_<enc_image_pset_bkd_piter_<P> > { typedef enc_image_pset_piter_< enc_image_pset_bkd_piter_<P> > super; typedef enc_image_pset_bkd_piter_<P> current; public: stc_using(point); + stc_using(std_container); enc_image_pset_bkd_piter_(const enc_image_pset_<P>& con); @@ -410,7 +416,8 @@ bool impl_is_valid() const; protected: - typename enc_image_pset_<point>::std_container::const_reverse_iterator it_; +// typename enc_image_pset_<point>::std_container::const_reverse_iterator it_; + typename std_container::const_reverse_iterator it_; }; # ifndef OLN_INCLUDE_ONLY Index: oln/core/internal/category_of.hh --- oln/core/internal/category_of.hh (revision 1017) +++ oln/core/internal/category_of.hh (working copy) @@ -43,24 +43,53 @@ namespace internal { - template <typename T1, typename T2> - struct get_category_of_ - : private mlc::abort_< pair<T1,T2> > // FIXME: Add error msg. + // get_category_as_a_vtype_ + + namespace ERROR + { + struct ILL_DEFINED_CATEGORY_IN_TYPEDEF; + struct CATEGORY_NOT_FOUND_AS_A_TYPEDEF_NOR_AS_A_VTYPE; + } + + // Default case: error. + template <typename T> + struct get_category_as_a_vtype_ : + private mlc::abort_ + <T, ERROR::CATEGORY_NOT_FOUND_AS_A_TYPEDEF_NOR_AS_A_VTYPE> { }; + // Default case: error. template <template <class> class C> - struct get_category_of_< C<void>, mlc::not_found > + struct get_category_as_a_vtype_< stc::is<C> > { typedef stc::is<C> ret; }; - template <template <class> class C> - struct get_category_of_< mlc::not_found, stc::is<C> > + + // get_category_as_a_typedef_ + + // Default case: error. + template <typename T, typename U> + struct get_category_as_a_typedef_ + : private mlc::abort_<T, ERROR::ILL_DEFINED_CATEGORY_IN_TYPEDEF> + { + }; + + template <typename T, template <class> class C> + struct get_category_as_a_typedef_< T, C<void> > { typedef stc::is<C> ret; }; + template <typename T> + struct get_category_as_a_typedef_< T, mlc::not_found > + { + typedef stc_find_type(T, category) cat_vtype; + // Try to get the category from the vtypes of T. + typedef typename get_category_as_a_vtype_<cat_vtype>::ret ret; + }; + // category_of_ @@ -68,9 +97,8 @@ struct category_of_ { typedef mlc_basic(T) T__; - typedef mlc_typedef(T__, category) ret_1; - typedef stc_find_type(T__, category) ret_2; - typedef typename get_category_of_<ret_1, ret_2>::ret ret; + typedef mlc_typedef(T__, category) cat_typedef; + typedef typename get_category_as_a_typedef_<T__, cat_typedef>::ret ret; }; Index: oln/core/internal/neighborhood_base.hh --- oln/core/internal/neighborhood_base.hh (revision 1017) +++ oln/core/internal/neighborhood_base.hh (working copy) @@ -55,7 +55,12 @@ typedef stc::abstract point; typedef stc_deferred(point) point__; + // FIXME: Improve scoop-alt to get rid of this difference. +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_grid(point__) > grid; +# else + typedef stc::final< stc_deferred_from(point__, grid) > grid; +# endif typedef stc::final< stc::is<Neighborhood> > category; }; Index: oln/core/internal/iterator_on_points_base.hh --- oln/core/internal/iterator_on_points_base.hh (revision 1017) +++ oln/core/internal/iterator_on_points_base.hh (working copy) @@ -42,7 +42,9 @@ template <typename Exact> struct super_trait_< internal::iterator_on_points_base_<Exact> > { - typedef Iterator_on_Points<Exact> ret; + // super_trait_ set to mlc::none, since Iterator_on_Points is a + // concept (interface). + typedef mlc::none ret; }; // Virtual types @@ -54,10 +56,18 @@ typedef stc::abstract point; typedef stc_deferred(point) point__; + // FIXME: Improve scoop-alt to get rid of this difference. +# ifndef OLENA_USE_SCOOP_ALT typedef stc::final< oln_grid(point__) > grid; typedef stc::final< oln_coord(point__) > coord; typedef stc::final< oln_dim(point__) > dim; typedef stc::final< oln_dpoint(point__) > dpoint; +# else + typedef stc::final< stc_deferred_from(point__, grid ) > grid; + typedef stc::final< stc_deferred_from(point__, coord ) > coord; + typedef stc::final< stc_deferred_from(point__, dim ) > dim; + typedef stc::final< stc_deferred_from(point__, dpoint) > dpoint; +# endif }; @@ -67,7 +77,13 @@ template <typename Exact> class iterator_on_points_base_ : public Iterator_on_Points<Exact>, - public internal::iterator_on_points_impl_<mlc_value(stc_deferred(dim)), Exact> +# ifndef OLENA_USE_SCOOP_ALT + public internal::iterator_on_points_impl_<mlc_value(stc_deferred(dim)), + Exact> +# else + public internal::iterator_on_points_impl_<mlc_value(stc_type(Exact, dim)), + Exact> +# endif { public: // Disambiguate. Index: oln/Makefile.am --- oln/Makefile.am (revision 1017) +++ oln/Makefile.am (working copy) @@ -26,20 +26,14 @@ \ core/gen/bkd_viter_lut.hh \ core/gen/fwd_viter_lut.hh \ - core/gen/piter_isubset.hh \ - core/gen/piter_isubset.hh \ core/gen/mapimage.hh \ core/gen/neighb.hh \ core/gen/pw_value.hh \ core/gen/window.hh \ \ - core/internal/dpoint_nd.hh \ core/internal/tracked_ptr.hh \ \ - core/case.hh \ core/lookup_table.hh \ - core/traits.hh \ - core/traits_id.hh \ \ debug/print.hh \ debug/track.hh \ @@ -52,22 +46,11 @@ level/clone.hh \ level/fill.hh \ \ - morpher/internal/image_extension.hh \ - morpher/internal/image_value_morpher.hh \ - \ - morpher/add_neighborhood.hh \ - morpher/count_rw.hh \ morpher/fwd_decls.hh \ - morpher/identity.hh \ - morpher/tags.hh \ morpher/slice.hh \ - morpher/stack.hh \ - morpher/stack_rw.hh \ - morpher/thru_fun.hh \ morpher/thru_mfun.hh \ morpher/two_way.hh \ morpher/two_way_rw.hh \ - morpher/value_cast.hh \ morpher/with_lut.hh \ \ value/color/rgb.hh \ @@ -76,14 +59,11 @@ value/all.hh \ value/bin.hh \ value/default.hh \ - value/greylevel.hh \ + value/graylevel.hh \ + value/gray_level.hh \ value/lut_value_proxy.hh \ value/proxy.hh \ value/rw_counter.hh \ value/tags.hh \ value/two_way.hh \ - value/two_way.hxx \ - \ - basics1d.hh \ - basics2d.hh \ - basics3d.hh + value/two_way.hxx