Commit 12a218c7 authored by Roland Levillain's avatar Roland Levillain
Browse files

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)/


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@723 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 8071df3b
2007-01-26 Roland Levillain <roland@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)/
2007-01-19 Thomas Moulard <thomas.moulard@lrde.epita.fr>
Split morphers' interface and implementation.
......
......@@ -36,7 +36,6 @@
namespace oln
{
/// Fwd decls.
template <unsigned D> struct grid_;
template <typename C> struct dpoint2d_;
......
......@@ -40,6 +40,13 @@ namespace oln {
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> >
......
......@@ -135,7 +135,12 @@ namespace oln
/// 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;
};
......
......@@ -96,8 +96,14 @@ namespace oln
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 @@ namespace oln
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 @@ namespace oln
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;
};
......
......@@ -174,11 +174,16 @@ namespace oln
/// 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 >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
>
>
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 @@ namespace oln
/// 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 >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
>
>
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 @@ namespace oln
/// 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 >,
mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_ >,
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
>
>
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 @@ namespace oln
/// 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_ >,
mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
>
>
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;
};
......
......@@ -108,7 +108,11 @@ namespace oln
/// 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;
};
......
......@@ -106,7 +106,12 @@ namespace oln
/// 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;
};
......
......@@ -133,8 +133,17 @@ namespace oln
/// 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 @@ namespace oln
/// 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;
};
......
......@@ -54,9 +54,20 @@ namespace oln
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
{
......
......@@ -69,13 +69,35 @@ namespace oln
// FIXME: Prefer to use final<deduce..> when possible.
typedef stc::abstract grid_type;
typedef stc::abstract dpoint_type;
typedef oln_deduce_deferred_vtype(E, dpoint, coord) coord_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
{
......
......@@ -91,7 +91,7 @@ namespace oln
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;
......
......@@ -91,7 +91,7 @@ namespace oln
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;
......
......@@ -36,7 +36,7 @@ namespace oln
{
// Forward declarations.
// Forward declaration.
template <typename topo, typename isubset> class topo_add_isubset;
......@@ -49,7 +49,7 @@ namespace oln
};
/// 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 @@ namespace oln
};
/// 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> >
......
......@@ -36,7 +36,7 @@ namespace oln
{
// Forward declarations.
// Forward declaration.
template <typename topo, typename nbh> class topo_add_nbh;
......@@ -49,7 +49,7 @@ namespace oln
};
/// 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 @@ namespace oln
};
/// 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> >
{
......
......@@ -35,7 +35,7 @@
namespace oln
{
// Forward declarations.
// Forward declaration.
template <typename point> class topo_bbox_;
......@@ -48,7 +48,7 @@ namespace oln
};
/// Virtual types associated to oln::bbox_<point>.
/// Virtual types associated to oln::topo_bbox_<point>.
template <typename point>
struct vtypes< topo_bbox_<point> >
{
......
......@@ -34,7 +34,7 @@
namespace oln
{
// Forward declarations.
// Forward declaration.
template <typename point> class topo_lbbox_;
......@@ -47,7 +47,7 @@ namespace oln
};
/// Virtual types associated to oln::bbox_<point>.
/// Virtual types associated to oln::topo_lbbox_<point>.
template <typename point>
struct vtypes< topo_lbbox_<point> >
{
......
......@@ -71,7 +71,9 @@ namespace oln
// 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 @@ namespace oln
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
......
......@@ -45,7 +45,7 @@ namespace oln
}
// Super type declaration.
/// Super type declaration.
template <typename E>
struct set_super_type< internal::bbox_fwd_piter<E> >
{
......
......@@ -54,13 +54,26 @@ namespace oln
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 @@ namespace oln
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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment