
https://svn.lrde.epita.fr/svn/oln/trunk/olena Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Various fixes. * oln/core/automatic/image/mutable_image1d.hh: Fix header guards, (were the same as oln/core/automatic/image/image1d.hh's). (oln::abstract::mutable_image1d): Forward-declare it. s/abstract::image1d/abstract::mutable_image1d/g. * oln/core/abstract/image/dimension/1d.hh (mutable_image1d) * oln/core/abstract/image/dimension/2d.hh (mutable_image2d) * oln/core/abstract/image/dimension/3d.hh (mutable_image3d): Fix the lookup of impl_at(). * oln/core/type_fun/slice.hh: Remove unnecessary headers. * oln/core/abstract/array.hh, oln/core/abstract/functions.hh, * oln/core/internal/point_nd.hh, oln/morpher/thru_mfun.hh: Add missing headers. * oln/morpher/thru_fun.hh (xtd/mexpr.hh): Include it. (struct case_<tag::fun_operator_1, mlc::pair_<Fun, A>, 1>): Turn into... (struct case_<tag::fun_operator_1, mlc::pair_<Fun, A>, 2>): ...this. * oln/value/proxy.hh: Fix header guards. (oln/core/typedefs.hh): Include it. * oln/Makefile.am (nobase_oln_HEADERS): Add core/abstract/image/computability/hierarchy.hh, core/abstract/image/value_wise_accessibility/hierarchy.hh, core/automatic/image/image_being_value_wise_random_accessible.hh, core/gen/topo_add_isubset.hh, core/gen/fwd_viter_lut.hh, core/internal/fwd_viter_lut.hh and value/two_way.hh. oln/Makefile.am | 14 +++++++++++++- oln/core/abstract/array.hh | 1 + oln/core/abstract/functions.hh | 1 + oln/core/abstract/image/dimension/1d.hh | 5 +++++ oln/core/abstract/image/dimension/2d.hh | 5 +++++ oln/core/abstract/image/dimension/3d.hh | 5 +++++ oln/core/automatic/image/mutable_image1d.hh | 12 ++++++------ oln/core/gen/topo_lbbox.hh | 3 --- oln/core/internal/point_nd.hh | 4 ++++ oln/core/type_fun/slice.hh | 5 ----- oln/morpher/thru_fun.hh | 7 ++++--- oln/morpher/thru_mfun.hh | 1 + oln/value/proxy.hh | 7 ++++--- tests/value/accessor.cc | 4 ++-- 14 files changed, 51 insertions(+), 23 deletions(-) Index: tests/value/accessor.cc --- tests/value/accessor.cc (revision 687) +++ tests/value/accessor.cc (working copy) @@ -28,7 +28,7 @@ /// Test oln::value::a_*. #include <iostream> -#include <oln/color/rgb.hh> +#include <oln/value/color/rgb.hh> #include <oln/basics2d.hh> #include <oln/value/accessor.hh> @@ -39,7 +39,7 @@ { using namespace oln; - typedef color::rgb_<int> rgb_t; + typedef value::color::rgb_<int> rgb_t; rgb_t c; image2d<rgb_t> ima(3,3); Index: oln/core/automatic/image/mutable_image1d.hh --- oln/core/automatic/image/mutable_image1d.hh (revision 687) +++ oln/core/automatic/image/mutable_image1d.hh (working copy) @@ -25,8 +25,8 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLN_CORE_AUTOMATIC_IMAGE_IMAGE1D_HH -# define OLN_CORE_AUTOMATIC_IMAGE_IMAGE1D_HH +#ifndef OLN_CORE_AUTOMATIC_IMAGE_MUTABLE_IMAGE1D_HH +# define OLN_CORE_AUTOMATIC_IMAGE_MUTABLE_IMAGE1D_HH # include <oln/core/automatic/impl.hh> # include <oln/morpher/tags.hh> @@ -38,7 +38,7 @@ // Forward declaration. namespace abstract { - template <typename E> class image1d; + template <typename E> class mutable_image1d; } // end of namespace oln::abstract @@ -50,7 +50,7 @@ /// Default implementation corresponding to the interface /// oln::abstract::image1d. template <typename E, typename tag> - class set_impl<abstract::image1d, tag, E> : + class set_impl<abstract::mutable_image1d, tag, E> : public virtual stc::any__simple<E> { public: @@ -66,7 +66,7 @@ template <typename E, typename tag> oln_lvalue(E) - set_impl<abstract::image1d, tag, E> + set_impl<abstract::mutable_image1d, tag, E> ::impl_at(const oln_coord(E)& index) { point1d tmp(index); @@ -79,4 +79,4 @@ } // end of namespace oln -#endif // ! OLN_CORE_AUTOMATIC_IMAGE_IMAGE1D_HH +#endif // ! OLN_CORE_AUTOMATIC_IMAGE_MUTABLE_IMAGE1D_HH Index: oln/core/type_fun/slice.hh --- oln/core/type_fun/slice.hh (revision 687) +++ oln/core/type_fun/slice.hh (working copy) @@ -30,13 +30,8 @@ # include <mlc/flags.hh> -# include <oln/core/1d/point1d.hh> # include <oln/core/1d/topo1d.hh> - -# include <oln/core/2d/point2d.hh> # include <oln/core/2d/topo2d.hh> - -# include <oln/core/3d/point3d.hh> # include <oln/core/3d/topo3d.hh> Index: oln/core/abstract/image/dimension/1d.hh --- oln/core/abstract/image/dimension/1d.hh (revision 687) +++ oln/core/abstract/image/dimension/1d.hh (working copy) @@ -65,8 +65,13 @@ public automatic::get_impl<mutable_image1d, E> { public: + // Resolve an ambiguity w.r.t. impl_at(). + // FIXME: Too hacky! + using automatic::set_impl<abstract::image1d, oln_type_of(E, morpher), E>::impl_at; + using automatic::set_impl<abstract::mutable_image1d, oln_type_of(E, morpher), E>::impl_at; using image1d<E>::at; + oln_lvalue(E) at(const oln_coord(E)& index); protected: Index: oln/core/abstract/image/dimension/2d.hh --- oln/core/abstract/image/dimension/2d.hh (revision 687) +++ oln/core/abstract/image/dimension/2d.hh (working copy) @@ -65,8 +65,13 @@ public automatic::get_impl<mutable_image2d, E> { public: + // Resolve an ambiguity w.r.t. impl_at(). + // FIXME: Too hacky! + using automatic::set_impl<abstract::image2d, oln_type_of(E, morpher), E>::impl_at; + using automatic::set_impl<abstract::mutable_image2d, oln_type_of(E, morpher), E>::impl_at; using image2d<E>::at; + oln_lvalue(E) at(const oln_coord(E)& row, const oln_coord(E)& col); protected: Index: oln/core/abstract/image/dimension/3d.hh --- oln/core/abstract/image/dimension/3d.hh (revision 687) +++ oln/core/abstract/image/dimension/3d.hh (working copy) @@ -70,8 +70,13 @@ public automatic::get_impl<mutable_image3d, E> { public: + // Resolve an ambiguity w.r.t. impl_at(). + // FIXME: Too hacky! + using automatic::set_impl<abstract::image3d, oln_type_of(E, morpher), E>::impl_at; + using automatic::set_impl<abstract::mutable_image3d, oln_type_of(E, morpher), E>::impl_at; using image3d<E>::at; + oln_lvalue(E) at(const oln_coord(E)& slice, const oln_coord(E)& row, const oln_coord(E)& col); Index: oln/core/abstract/functions.hh --- oln/core/abstract/functions.hh (revision 687) +++ oln/core/abstract/functions.hh (working copy) @@ -31,6 +31,7 @@ # include <stc/any.hh> # include <oln/core/type.hh> # include <oln/core/abstract/image.hh> +# include <oln/core/abstract/image/mutability/hierarchy.hh> namespace oln Index: oln/core/abstract/array.hh --- oln/core/abstract/array.hh (revision 687) +++ oln/core/abstract/array.hh (working copy) @@ -28,6 +28,7 @@ #ifndef OLN_CORE_ABSTRACT_ARRAY_HH # define OLN_CORE_ABSTRACT_ARRAY_HH +# include <oln/core/type.hh> # include <oln/debug/track.hh> Index: oln/core/gen/topo_lbbox.hh --- oln/core/gen/topo_lbbox.hh (revision 687) +++ oln/core/gen/topo_lbbox.hh (working copy) @@ -31,12 +31,9 @@ # include <oln/core/gen/bbox.hh> # include <oln/core/topology_entry.hh> - - namespace oln { - // Forward declarations. template <typename point> class topo_lbbox_; Index: oln/core/internal/point_nd.hh --- oln/core/internal/point_nd.hh (revision 687) +++ oln/core/internal/point_nd.hh (working copy) @@ -31,7 +31,11 @@ # include <xtd/vec.hh> # include <xtd/optraits.hh> +// FIXME: There should be a header grouping the files required to make +// the extensible traits mechanism work. # include <oln/core/traits_id.hh> +# include <oln/value/proxy.hh> +# include <oln/core/traits.hh> # include <oln/core/abstract/point.hh> # include <oln/core/internal/dpoint_nd.hh> Index: oln/Makefile.am --- oln/Makefile.am (revision 687) +++ oln/Makefile.am (working copy) @@ -37,6 +37,8 @@ \ core/abstract/image/bbox/hierarchy.hh \ \ + core/abstract/image/computability/hierarchy.hh \ + \ core/abstract/image/dimension/1d.hh \ core/abstract/image/dimension/2d.hh \ core/abstract/image/dimension/3d.hh \ @@ -56,6 +58,8 @@ core/abstract/image/type/integre.hh \ core/abstract/image/type/label.hh \ \ + core/abstract/image/value_wise_accessibility/hierarchy.hh \ + \ core/abstract/image/all.hh \ core/abstract/image/hierarchies.hh \ \ @@ -104,12 +108,15 @@ core/automatic/image/image_being_random_accessible.hh \ core/automatic/image/image_having_neighborhood.hh \ core/automatic/image/image_having_neighborhood.hh \ - core/automatic/impl.hh \ + core/automatic/image/image_being_value_wise_random_accessible.hh \ + \ core/automatic/topology/topology_being_random_accessible.hh \ core/automatic/topology/topology_having_bbox.hh \ core/automatic/topology/topology_having_neighborhood.hh \ core/automatic/topology/topology_having_subset.hh \ \ + core/automatic/impl.hh \ + \ core/gen/bbox.hh \ core/gen/bbox_bkd_piter.hh \ core/gen/bbox_fwd_piter.hh \ @@ -120,11 +127,13 @@ core/gen/fwd_niter_neighb.hh \ core/gen/fwd_piter_bbox.hh \ core/gen/fwd_qiter_win.hh \ + core/gen/fwd_viter_lut.hh \ core/gen/piter_isubset.hh \ core/gen/grid.hh \ core/gen/mapimage.hh \ core/gen/neighb.hh \ core/gen/pw_value.hh \ + core/gen/topo_add_isubset.hh \ core/gen/topo_add_nbh.hh \ core/gen/topo_bbox.hh \ core/gen/topo_lbbox.hh \ @@ -141,6 +150,7 @@ core/internal/bbox_bkd_piter.hh \ core/internal/bbox_fwd_piter.hh \ core/internal/dpoint_nd.hh \ + core/internal/fwd_viter_lut.hh \ core/internal/point_nd.hh \ core/internal/topology_morpher.hh \ core/internal/tracked_ptr.hh \ @@ -191,11 +201,13 @@ \ value/accessor.hh \ value/all.hh \ + value/bin.hh \ value/default.hh \ value/greylevel.hh \ value/proxy.hh \ value/rw_counter.hh \ value/tags.hh \ + value/two_way.hh \ \ basics1d.hh \ basics2d.hh \ Index: oln/morpher/thru_mfun.hh --- oln/morpher/thru_mfun.hh (revision 687) +++ oln/morpher/thru_mfun.hh (working copy) @@ -30,6 +30,7 @@ # include <xtd/res.hh> # include <xtd/abstract/open_nary_fun.hh> +# include <xtd/abstract/mutable_fun.hh> # include <xtd/mexpr.hh> # include <oln/morpher/internal/image_value_morpher.hh> Index: oln/morpher/thru_fun.hh --- oln/morpher/thru_fun.hh (revision 687) +++ oln/morpher/thru_fun.hh (working copy) @@ -28,12 +28,13 @@ #ifndef OLN_MORPHER_THRU_FUN # define OLN_MORPHER_THRU_FUN -# include <xtd/abstract/open_nary_fun.hh> # include <xtd/res.hh> +// For xtd::case_<xtd::tag::fun_operator_1, mlc::pair_<F, Expr>, 1> +# include <xtd/mexpr.hh> +# include <xtd/abstract/open_nary_fun.hh> # include <oln/morpher/internal/image_value_morpher.hh> - namespace oln { @@ -135,7 +136,7 @@ // where A is an oln::abstract::image<I> template <typename Fun, typename A> - struct case_ < tag::fun_operator_1, mlc::pair_<Fun, A>, 1 > + struct case_ < tag::fun_operator_1, mlc::pair_<Fun, A>, 2 > : where_< mlc_is_a(A, oln::abstract::image) > { typedef stc_to_exact(A) I; Index: oln/value/proxy.hh --- oln/value/proxy.hh (revision 687) +++ oln/value/proxy.hh (working copy) @@ -25,10 +25,11 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef OLN_CORE_VALUE_PROXY_HH -# define OLN_CORE_VALUE_PROXY_HH +#ifndef OLN_VALUE_PROXY_HH +# define OLN_VALUE_PROXY_HH # include <xtd/optraits.hh> +# include <oln/core/typedefs.hh> # include <oln/core/type.hh> # include <oln/core/traits_id.hh> @@ -469,4 +470,4 @@ } // end of namespace oln -#endif // ! OLN_CORE_VALUE_PROXY_HH +#endif // ! OLN_VALUE_PROXY_HH
participants (1)
-
Roland Levillain