https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add temporary helpers to support the new SCOOP 2 implementation.
The macro OLENA_USE_NEW_SCOOP2 is used to tag the places where
support code is introduced.
* oln/core/typedefs.hh (stc/scoop2.hh) [OLENA_USE_NEW_SCOOP2]:
Include it.
(stc/scoop.hh) [!OLENA_USE_NEW_SCOOP2]: Include it.
Invoke stc_scoop_equipment_for_namespace(oln).
Temporary hack: define deferred virtual types as single_vtypes
when using new SCOOP 2 implementation.
* oln/core/image_entry.hh
(vtypes< image_entry<E> >::rvalue_type)
[!OLENA_USE_NEW_SCOOP2]: Define it.
(single_vtype<image_entry<E>, typedef_::rvalue_type>
[!OLENA_USE_NEW_SCOOP2]: Define it.
* oln/core/abstract/iterator_on_points.hh
(vtypes< abstract::iterator_on_points<E> >)
[!OLENA_USE_NEW_SCOOP2]: Define it.
(single_vtype<abstract::iterator_on_points<E>, typedef_::coord_type>)
[OLENA_USE_NEW_SCOOP2]: Define it.
* oln/core/abstract/point.hh (oln, oln):
(vtypes< abstract::point<E> >::coord_type)
(vtypes< abstract::point<E> >::vec_type)
[!OLENA_USE_NEW_SCOOP2]: Define them.
(single_vtype< abstract::point<E>, typedef_::coord_type>)
(single_vtype< abstract::point<E>, typedef_::vec_type>)
[OLENA_USE_NEW_SCOOP2]: Define them.
* oln/core/internal/point_nd.hh (vtypes< internal::point_nd<E> >):
Disable it (duplicate with vtypes< abstract::point<E> >).
* oln/core/internal/dpoint_nd.hh
(vtypes< internal::dpoint_nd<E> >::vec_type)
[!OLENA_USE_NEW_SCOOP2]: Define it.
(single_vtype< internal::dpoint_nd<E>, typedef_::vec_type >)
[OLENA_USE_NEW_SCOOP2]: Define it.
Fix the usage of stc::not_found and stc::is_found_.
* oln/core/abstract/image/dimension/hierarchy.hh
(case_<image_hierarchy_wrt_dimension, E, 1>)
(case_<image_hierarchy_wrt_dimension, E, 3>)
(case_<image_hierarchy_wrt_dimension, E, 5>)
[OLENA_USE_NEW_SCOOP2]: Use stc::is_found_ to check for the
existence of an lvalue.
[!OLENA_USE_NEW_SCOOP2]: Use mlc::is_found_ to check for the
existence of an lvalue.
* oln/core/abstract/image/mutability/hierarchy.hh
(case_<image_hierarchy_wrt_mutability, E, 1>)
[OLENA_USE_NEW_SCOOP2]: Use stc::is_found_ to check for the
existence of an lvalue.
[!OLENA_USE_NEW_SCOOP2]: Use mlc::is_found_ to check for the
existence of an lvalue.
* oln/core/abstract/image/bbox/hierarchy.hh
(case_<image_hierarchy_wrt_bbox, E, 1>)
[OLENA_USE_NEW_SCOOP2]: Use stc::is_found_ to check for the
existence of a bounding box.
[!OLENA_USE_NEW_SCOOP2]: Use mlc::is_found_ to check for the
existence of a bounding box.
* oln/core/abstract/image/hybrid/classical.hh
(case_<image_hybrid_hierarchy_wrt_classical, E, 1>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 2>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 3>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 4>)
[OLENA_USE_NEW_SCOOP2]: Use stc::not_found to check for the
existence of a bounding box.
(case_<image_hybrid_hierarchy_wrt_classical, E, 1>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 2>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 3>)
(case_<image_hybrid_hierarchy_wrt_classical, E, 4>)
[!OLENA_USE_NEW_SCOOP2]: Use mlc::not_found to check for the
existence of a bounding box.
* oln/core/abstract/image/value_wise_accessibility/hierarchy.hh
(case_<image_hierarchy_wrt_value_wise_accessibility, E, 1>):
(case_<image_hierarchy_wrt_value_wise_accessibility, E, 2>):
[OLENA_USE_NEW_SCOOP2]: Use stc::is_found_ to check for the
existence of a value iterator (and a value proxy).
[!OLENA_USE_NEW_SCOOP2]: Use mlc::is_found_ to check for the
existence of a value iterator (and a value proxy).
* oln/core/abstract/image/neighborhood/hierarchy.hh
(case_<image_hierarchy_wrt_neighborhood, E, 1>)
[OLENA_USE_NEW_SCOOP2]: Use stc::is_found_ to check for the
existence of a neighborhood.
[!OLENA_USE_NEW_SCOOP2]: Use mlc::is_found_ to check for the
existence of a neighborhood.
* oln/core/abstract/grid.hh (set_super_type<abstract::grid<E>>):
New. Fix abstract::grid not having a super type.
* oln/morpher/thru_mfun.hxx: Move all implementations of methods
into...
(oln::morpher): ...this namespace.
* oln/core/gen/fwd_viter_lut.hh, oln/core/gen/bkd_viter_lut.hh,
* oln/core/gen/topo_bbox.hh, oln/core/gen/topo_lbbox.hh,
* oln/core/gen/topo_add_isubset.hh, oln/core/gen/topo_add_nbh.hh,
* oln/core/internal/bbox_fwd_piter.hh: Fix comments.
* oln/core/2d/point2d.hh (oln): Aesthetic changes.
* tests/core/point2d.cc: Fix inter-dependent headers.
* tests/core/dpoint2d.cc: Add a static assertion.
* tests/algorithms/fill.cc:
s/oln_type_of_(image_t, piter)/oln_piter_(image_t)/
oln/core/2d/point2d.hh | 1
oln/core/abstract/grid.hh | 7 +
oln/core/abstract/image/bbox/hierarchy.hh | 5 +
oln/core/abstract/image/dimension/hierarchy.hh | 30 +++++-
oln/core/abstract/image/hybrid/classical.hh | 44 +++++++---
oln/core/abstract/image/mutability/hierarchy.hh | 4
oln/core/abstract/image/neighborhood/hierarchy.hh | 5 +
oln/core/abstract/image/value_wise_accessibility/hierarchy.hh | 19 +++-
oln/core/abstract/iterator_on_points.hh | 11 ++
oln/core/abstract/point.hh | 22 +++++
oln/core/gen/bkd_viter_lut.hh | 2
oln/core/gen/fwd_viter_lut.hh | 2
oln/core/gen/topo_add_isubset.hh | 6 -
oln/core/gen/topo_add_nbh.hh | 6 -
oln/core/gen/topo_bbox.hh | 4
oln/core/gen/topo_lbbox.hh | 4
oln/core/image_entry.hh | 9 ++
oln/core/internal/bbox_fwd_piter.hh | 2
oln/core/internal/dpoint_nd.hh | 17 +++
oln/core/internal/point_nd.hh | 21 ++--
oln/core/typedefs.hh | 6 +
oln/morpher/thru_mfun.hxx | 5 +
tests/algorithms/fill.cc | 2
tests/core/dpoint2d.cc | 3
tests/core/point2d.cc | 3
25 files changed, 193 insertions(+), 47 deletions(-)
Index: tests/core/point2d.cc
--- tests/core/point2d.cc (revision 722)
+++ tests/core/point2d.cc (working copy)
@@ -27,7 +27,10 @@
#include <mlc/assert.hh>
#include <mlc/is_a.hh>
+// FIXME: There is an inter-dependency between point2d and dpoint2d.
+// Maybe we'll solve this with the interface/implementation separation?
#include <oln/core/2d/point2d.hh>
+#include <oln/core/2d/dpoint2d.hh>
int
Index: tests/core/dpoint2d.cc
--- tests/core/dpoint2d.cc (revision 722)
+++ tests/core/dpoint2d.cc (working copy)
@@ -39,4 +39,7 @@
mlc::assert_<
mlc_is_a_( dpoint_t, oln::internal::dpoint_nd )
::check();
+
+ typedef oln_vtype_(dpoint_t, vec) vec_t;
+ mlc::assert_< mlc_is_a_( vec_t, mlc_comma_1(xtd::vec< 2u, int >) )
>::check();
}
Index: tests/algorithms/fill.cc
--- tests/algorithms/fill.cc (revision 722)
+++ tests/algorithms/fill.cc (working copy)
@@ -40,7 +40,7 @@
typedef oln::image2d<int> image_t;
image_t ima(3, 3);
oln::level::fill(ima, 51);
- oln_type_of_(image_t, piter) p(ima.topo());
+ oln_piter_(image_t) p(ima.topo());
for_all(p)
assert(ima(p) == 51);
}
Index: oln/core/typedefs.hh
--- oln/core/typedefs.hh (revision 722)
+++ oln/core/typedefs.hh (working copy)
@@ -41,7 +41,11 @@
# include <stc/any.hh>
# include <stc/exact.hh>
+# ifdef OLENA_USE_NEW_SCOOP2
+# include <stc/scoop2.hh>
+# else
# include <stc/scoop.hh>
+# endif // OLENA_USE_NEW_SCOOP2
# include <oln/core/type.hh>
// FIXME: Move to oln/core.
@@ -52,9 +56,11 @@
| Namespace equipment. |
`----------------------*/
+# ifndef OLENA_USE_NEW_SCOOP2
// The virtual types facility is inserted here because it also
// triggers Metalic's typedef introspection equipment.
stc_scoop_equipment_for_namespace(oln);
+# endif // !OLENA_USE_NEW_SCOOP2
namespace oln
Index: oln/core/image_entry.hh
--- oln/core/image_entry.hh (revision 722)
+++ oln/core/image_entry.hh (working copy)
@@ -71,7 +71,9 @@
// FIXME: default definitions:
typedef oln_point(E) psite_type;
+# ifndef OLENA_USE_NEW_SCOOP2
typedef oln_value(E) rvalue_type;
+# endif // !OLENA_USE_NEW_SCOOP2
/// \brief Morpher type.
///
@@ -79,6 +81,13 @@
typedef mlc::none morpher_type;
};
+# ifdef OLENA_USE_NEW_SCOOP2
+ template <typename E>
+ struct single_vtype< image_entry<E>, typedef_::rvalue_type >
+ {
+ typedef oln_value(E) ret;
+ };
+# endif // OLENA_USE_NEW_SCOOP2
/// Entry class for point sets: image_entry<E> is an alias for
Index: oln/core/abstract/iterator_on_points.hh
--- oln/core/abstract/iterator_on_points.hh (revision 722)
+++ oln/core/abstract/iterator_on_points.hh (working copy)
@@ -54,9 +54,20 @@
struct vtypes< abstract::iterator_on_points<E> >
{
typedef stc::abstract point_type;
+# ifndef OLENA_USE_NEW_SCOOP2
typedef oln_deduce_deferred_vtype(E, point, coord) coord_type;
+# endif // !OLENA_USE_NEW_SCOOP2
};
+# ifdef OLENA_USE_NEW_SCOOP2
+ template <typename E>
+ struct single_vtype< abstract::iterator_on_points<E>,
+ typedef_::coord_type >
+ {
+ typedef oln_deduce_deferred_vtype(E, point, coord) ret;
+ };
+# endif // OLENA_USE_NEW_SCOOP2
+
namespace abstract
{
Index: oln/core/abstract/image/hybrid/classical.hh
--- oln/core/abstract/image/hybrid/classical.hh (revision 722)
+++ oln/core/abstract/image/hybrid/classical.hh (working copy)
@@ -174,11 +174,16 @@
/// 1D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 1 > :
- where_< mlc::and_list_< mlc::eq_< oln_vtype(E, grid), oln::grid1d >,
+ where_< mlc::and_list_<
+ mlc::eq_< oln_vtype(E, grid), oln::grid1d >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), stc::not_found >
+# else
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
- >
- >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::classical_1d_image<E> ret;
};
@@ -187,11 +192,16 @@
/// 2D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 2 > :
- where_< mlc::and_list_< mlc::eq_< oln_vtype(E, grid), oln::grid2d >,
+ where_< mlc::and_list_<
+ mlc::eq_< oln_vtype(E, grid), oln::grid2d >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), stc::not_found >
+# else
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
- >
- >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::classical_2d_image<E> ret;
};
@@ -200,11 +210,16 @@
/// 3D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 3 > :
- where_< mlc::and_list_< mlc::eq_< oln_vtype(E, grid), oln::grid3d >,
+ where_< mlc::and_list_<
+ mlc::eq_< oln_vtype(E, grid), oln::grid3d >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), stc::not_found >
+# else
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
- >
- >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::classical_3d_image<E> ret;
};
@@ -213,10 +228,15 @@
/// General case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 4 > :
- where_< mlc::and_< mlc::eq_< oln_deduce_vtype(E, topo,
is_random_accessible), mlc::true_ >,
+ where_< mlc::and_<
+ mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), stc::not_found >
+# else
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
- >
- >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::classical_image<E> ret;
};
Index: oln/core/abstract/image/mutability/hierarchy.hh
--- oln/core/abstract/image/mutability/hierarchy.hh (revision 722)
+++ oln/core/abstract/image/mutability/hierarchy.hh (working copy)
@@ -108,7 +108,11 @@
/// With mutability.
template <typename E>
struct case_< image_hierarchy_wrt_mutability, E, 1 > :
+# ifdef OLENA_USE_NEW_SCOOP2
+ where_< stc::is_found_< oln_find_vtype(E, lvalue) > >
+# else
where_< mlc::is_found_< oln_find_vtype(E, lvalue) > >
+# endif // OLENA_USE_NEW_SCOOP2
{
typedef abstract::mutable_image<E> ret;
};
Index: oln/core/abstract/image/dimension/hierarchy.hh
--- oln/core/abstract/image/dimension/hierarchy.hh (revision 722)
+++ oln/core/abstract/image/dimension/hierarchy.hh (working copy)
@@ -96,8 +96,14 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 1 > :
- where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid1d >,
- mlc::is_found_< oln_find_vtype(E, lvalue) > > >
+ where_< mlc::and_<
+ mlc::eq_< oln_grid(E), oln::grid1d >,
+# ifdef OLENA_USE_NEW_SCOOP2
+ stc::is_found_< oln_find_vtype(E, lvalue) >
+# else
+ mlc::is_found_< oln_find_vtype(E, lvalue) >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::mutable_image1d<E> ret;
};
@@ -113,8 +119,14 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 3 > :
- where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid2d >,
- mlc::is_found_< oln_find_vtype(E, lvalue) > > >
+ where_< mlc::and_<
+ mlc::eq_< oln_grid(E), oln::grid2d >,
+# ifdef OLENA_USE_NEW_SCOOP2
+ stc::is_found_< oln_find_vtype(E, lvalue) >
+# else
+ mlc::is_found_< oln_find_vtype(E, lvalue) >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::mutable_image2d<E> ret;
};
@@ -130,8 +142,14 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 5 > :
- where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid3d >,
- mlc::is_found_< oln_find_vtype(E, lvalue) > > >
+ where_< mlc::and_<
+ mlc::eq_< oln_grid(E), oln::grid3d >,
+# ifdef OLENA_USE_NEW_SCOOP2
+ stc::is_found_< oln_find_vtype(E, lvalue) >
+# else
+ mlc::is_found_< oln_find_vtype(E, lvalue) >
+# endif // OLENA_USE_NEW_SCOOP2
+ > >
{
typedef abstract::mutable_image3d<E> ret;
};
Index: oln/core/abstract/image/neighborhood/hierarchy.hh
--- oln/core/abstract/image/neighborhood/hierarchy.hh (revision 722)
+++ oln/core/abstract/image/neighborhood/hierarchy.hh (working copy)
@@ -106,7 +106,12 @@
/// With neighborhood.
template <typename E>
struct case_< image_hierarchy_wrt_neighborhood, E, 1 > :
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ where_< mlc::neq_< oln_find_vtype(E, neighborhood), stc::not_found > >
+# else
where_< mlc::neq_< oln_find_vtype(E, neighborhood), mlc::not_found > >
+# endif // OLENA_USE_NEW_SCOOP2
{
typedef abstract::image_having_neighborhood<E> ret;
};
Index: oln/core/abstract/image/bbox/hierarchy.hh
--- oln/core/abstract/image/bbox/hierarchy.hh (revision 722)
+++ oln/core/abstract/image/bbox/hierarchy.hh (working copy)
@@ -135,7 +135,12 @@
/// With bbox.
template <typename E>
struct case_< image_hierarchy_wrt_bbox, E, 1 > :
+ // FIXME: Shouldn't we use stc::is_found (resp. mlc::is_found) here?
+# ifdef OLENA_USE_NEW_SCOOP2
+ where_< mlc::neq_< oln_deduce_vtype(E, topo, bbox), stc::not_found > >
+# else
where_< mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found > >
+# endif // OLENA_USE_NEW_SCOOP2
{
typedef abstract::image_having_bbox<E> ret;
};
Index: oln/core/abstract/image/value_wise_accessibility/hierarchy.hh
--- oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (revision 722)
+++ oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (working copy)
@@ -133,8 +133,17 @@
/// With mutable value-wise random accessibility.
template <typename E>
struct case_< image_hierarchy_wrt_value_wise_accessibility, E, 1 > :
- where_< mlc_and( mlc_is_ok(oln_find_vtype(E, fwd_viter)),
- mlc_is_ok(oln_find_vtype(E, mutable_value_proxy)) ) >
+# ifdef OLENA_USE_NEW_SCOOP2
+ where_<
+ mlc_and( stc::is_found_< oln_find_vtype(E, fwd_viter) >,
+ stc::is_found_< oln_find_vtype(E, mutable_value_proxy) > )
+ >
+# else
+ where_<
+ mlc_and( mlc::is_found_< oln_find_vtype(E, fwd_viter) >,
+ mlc::is_found_< oln_find_vtype(E, mutable_value_proxy) > )
+ >
+# endif // OLENA_USE_NEW_SCOOP2
{
typedef abstract::mutable_image_being_value_wise_random_accessible<E> ret;
};
@@ -142,7 +151,11 @@
/// With (constant) value-wise random accessibility.
template <typename E>
struct case_< image_hierarchy_wrt_value_wise_accessibility, E, 2 > :
- where_< mlc_is_ok(oln_find_vtype(E, fwd_viter)) >
+# ifdef OLENA_USE_NEW_SCOOP2
+ where_< stc::is_found_< oln_find_vtype(E, fwd_viter) > >
+# else
+ where_< mlc::is_found_< oln_find_vtype(E, fwd_viter) > >
+# endif // OLENA_USE_NEW_SCOOP2
{
typedef abstract::image_being_value_wise_random_accessible<E> ret;
};
Index: oln/core/abstract/grid.hh
--- oln/core/abstract/grid.hh (revision 722)
+++ oln/core/abstract/grid.hh (working copy)
@@ -40,6 +40,13 @@
template <typename E> class grid;
}
+ /// Super type declaration.
+ template <typename E>
+ struct set_super_type< abstract::grid<E> >
+ {
+ typedef mlc::none ret;
+ };
+
/// Virtual types associated to oln::abstract::grid.
template <typename E>
struct vtypes< abstract::grid<E> >
Index: oln/core/abstract/point.hh
--- oln/core/abstract/point.hh (revision 722)
+++ oln/core/abstract/point.hh (working copy)
@@ -69,13 +69,35 @@
// FIXME: Prefer to use final<deduce..> when possible.
typedef stc::abstract grid_type;
typedef stc::abstract dpoint_type;
+# ifndef OLENA_USE_NEW_SCOOP2
typedef oln_deduce_deferred_vtype(E, dpoint, coord) coord_type;
+# endif // !OLENA_USE_NEW_SCOOP2
typedef stc::abstract dim_type;
+# ifndef OLENA_USE_NEW_SCOOP2
typedef oln_dim(E) dim_t;
typedef xtd::vec<mlc_value(dim_t), coord_type> vec_type;
+# endif // !OLENA_USE_NEW_SCOOP2
};
+# ifdef OLENA_USE_NEW_SCOOP2
+ template <typename E>
+ struct single_vtype< abstract::point<E>, typedef_::coord_type>
+ {
+ typedef oln_deduce_vtype(E, dpoint, coord) ret;
+ };
+
+ template <typename E>
+ struct single_vtype< abstract::point<E>, typedef_::vec_type>
+ {
+ private:
+ typedef oln_dim(E) dim_t;
+ typedef oln_coord(E) coord_t;
+ public:
+ typedef xtd::vec<mlc_value(dim_t), coord_t> ret;
+ };
+# endif // OLENA_USE_NEW_SCOOP2
+
namespace abstract
{
Index: oln/core/2d/point2d.hh
--- oln/core/2d/point2d.hh (revision 722)
+++ oln/core/2d/point2d.hh (working copy)
@@ -36,7 +36,6 @@
namespace oln
{
-
/// Fwd decls.
template <unsigned D> struct grid_;
template <typename C> struct dpoint2d_;
Index: oln/core/gen/topo_add_isubset.hh
--- oln/core/gen/topo_add_isubset.hh (revision 722)
+++ oln/core/gen/topo_add_isubset.hh (working copy)
@@ -36,7 +36,7 @@
{
- // Forward declarations.
+ // Forward declaration.
template <typename topo, typename isubset> class topo_add_isubset;
@@ -49,7 +49,7 @@
};
- /// Virtual types associated to oln::bbox_<point>.
+ /// Virtual types associated to oln::topo_add_isubset<topo, isubset>.
template <typename topo, typename isubset>
struct vtypes< topo_add_isubset<topo, isubset> >
{
@@ -57,7 +57,7 @@
};
- /// Bounding box topology based on a point class.
+ /// Topology based on another topology and a subset (encoded in an image).
template <typename topo_t, typename isubset_t>
class topo_add_isubset
: public internal::topology_morpher<topo_t, topo_add_isubset<topo_t,
isubset_t> >
Index: oln/core/gen/topo_bbox.hh
--- oln/core/gen/topo_bbox.hh (revision 722)
+++ oln/core/gen/topo_bbox.hh (working copy)
@@ -35,7 +35,7 @@
namespace oln
{
- // Forward declarations.
+ // Forward declaration.
template <typename point> class topo_bbox_;
@@ -48,7 +48,7 @@
};
- /// Virtual types associated to oln::bbox_<point>.
+ /// Virtual types associated to oln::topo_bbox_<point>.
template <typename point>
struct vtypes< topo_bbox_<point> >
{
Index: oln/core/gen/bkd_viter_lut.hh
--- oln/core/gen/bkd_viter_lut.hh (revision 722)
+++ oln/core/gen/bkd_viter_lut.hh (working copy)
@@ -91,7 +91,7 @@
bool impl_is_valid() const;
/// \}
- // Get the value pointed by this iterator (const version).
+ /// Get the value pointed by this iterator.
value_type impl_to_value() const;
void print(std::ostream& ostr) const;
Index: oln/core/gen/topo_lbbox.hh
--- oln/core/gen/topo_lbbox.hh (revision 722)
+++ oln/core/gen/topo_lbbox.hh (working copy)
@@ -34,7 +34,7 @@
namespace oln
{
- // Forward declarations.
+ // Forward declaration.
template <typename point> class topo_lbbox_;
@@ -47,7 +47,7 @@
};
- /// Virtual types associated to oln::bbox_<point>.
+ /// Virtual types associated to oln::topo_lbbox_<point>.
template <typename point>
struct vtypes< topo_lbbox_<point> >
{
Index: oln/core/gen/fwd_viter_lut.hh
--- oln/core/gen/fwd_viter_lut.hh (revision 722)
+++ oln/core/gen/fwd_viter_lut.hh (working copy)
@@ -91,7 +91,7 @@
bool impl_is_valid() const;
/// \}
- // Get the value pointed by this iterator (const version).
+ /// Get the value pointed by this iterator.
value_type impl_to_value() const;
void print(std::ostream& ostr) const;
Index: oln/core/gen/topo_add_nbh.hh
--- oln/core/gen/topo_add_nbh.hh (revision 722)
+++ oln/core/gen/topo_add_nbh.hh (working copy)
@@ -36,7 +36,7 @@
{
- // Forward declarations.
+ // Forward declaration.
template <typename topo, typename nbh> class topo_add_nbh;
@@ -49,7 +49,7 @@
};
- /// Virtual types associated to oln::bbox_<point>.
+ /// Virtual types associated to oln::topo_add_nbh<topo, nbh>.
template <typename topo, typename nbh>
struct vtypes< topo_add_nbh<topo, nbh> >
{
@@ -58,7 +58,7 @@
};
- /// Bounding box topology based on a point class.
+ /// Topology based on another topology and a neighborhood.
template <typename topo_t, typename nbh_t>
class topo_add_nbh : public internal::topology_morpher<topo_t,
topo_add_nbh<topo_t, nbh_t> >
{
Index: oln/core/internal/point_nd.hh
--- oln/core/internal/point_nd.hh (revision 722)
+++ oln/core/internal/point_nd.hh (working copy)
@@ -44,7 +44,6 @@
namespace oln
{
-
/// Function \f$point : (n, coord) \rightarrow point type\f$.
template <unsigned n, typename C>
@@ -67,16 +66,16 @@
typedef abstract::point<E> ret;
};
-
- template <typename E>
- struct vtypes< internal::point_nd<E> >
- {
- private:
- typedef oln_deferred_vtype(E, dim) dim_t;
- typedef oln_deferred_vtype(E, coord) coord_t;
- public:
- typedef xtd::vec<mlc_value(dim_t), coord_t> vec_type;
- };
+// FIXME: Already defined in vtypes< abstract::point<E> > (Why?).
+// template <typename E>
+// struct vtypes< internal::point_nd<E> >
+// {
+// private:
+// typedef oln_deferred_vtype(E, dim) dim_t;
+// typedef oln_deferred_vtype(E, coord) coord_t;
+// public:
+// typedef xtd::vec<mlc_value(dim_t), coord_t> vec_type;
+// };
namespace internal
Index: oln/core/internal/bbox_fwd_piter.hh
--- oln/core/internal/bbox_fwd_piter.hh (revision 722)
+++ oln/core/internal/bbox_fwd_piter.hh (working copy)
@@ -45,7 +45,7 @@
}
- // Super type declaration.
+ /// Super type declaration.
template <typename E>
struct set_super_type< internal::bbox_fwd_piter<E> >
{
Index: oln/core/internal/dpoint_nd.hh
--- oln/core/internal/dpoint_nd.hh (revision 722)
+++ oln/core/internal/dpoint_nd.hh (working copy)
@@ -54,13 +54,26 @@
template <typename E>
struct vtypes< internal::dpoint_nd<E> >
{
+# ifndef OLENA_USE_NEW_SCOOP2
private:
typedef oln_deferred_vtype(E, dim) dim_t;
typedef oln_deferred_vtype(E, coord) coord_t;
public:
typedef xtd::vec<mlc_value(dim_t), coord_t> vec_type;
+# endif // !OLENA_USE_NEW_SCOOP2
};
+# ifdef OLENA_USE_NEW_SCOOP2
+ template <typename E>
+ struct single_vtype< internal::dpoint_nd<E>, typedef_::vec_type >
+ {
+ private:
+ typedef oln_deferred_vtype(E, dim) dim_t;
+ typedef oln_deferred_vtype(E, coord) coord_t;
+ public:
+ typedef xtd::vec<mlc_value(dim_t), coord_t> ret;
+ };
+# endif // OLENA_USE_NEW_SCOOP2
namespace internal
{
@@ -68,6 +81,10 @@
template <typename E>
class dpoint_nd : public abstract::dpoint<E>
{
+// #ifdef USE_ALT_SCOOP2
+// typedef typename vtypes< internal::dpoint_nd<E> >::self_type dummy;
+// #endif // USE_ALT_SCOOP2
+
typedef E exact_t;
typedef dpoint_nd<E> self_t;
typedef oln_dim(E) dim_t;
Index: oln/morpher/thru_mfun.hxx
--- oln/morpher/thru_mfun.hxx (revision 722)
+++ oln/morpher/thru_mfun.hxx (working copy)
@@ -31,6 +31,9 @@
namespace oln
{
+ namespace morpher
+ {
+
template <typename Image, typename Fun>
thru_mfun<Image, Fun>::thru_mfun(const Image& image, const Fun& fun) :
super_t(image),
@@ -52,6 +55,8 @@
return fun_(this->image_(p));
}
+ } // end of namespace oln::morpher
+
} // end of namespace oln
#endif // ! OLN_MORPHER_THRU_MFUN_HXX