2006-12-04 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
Propagate scoop update to oln.
* oln/core/macros.hh
(oln_type_of_, oln_type_of, oln_deduce_type_of): Update and rename as...
(oln_vtype_, oln_vtype, oln_deduce_vtype): ...these.
(oln_deferred_vtype, oln_deduce_deferred_vtype): New.
(oln_find_vtype, oln_find_deferred_vtype): New.
* tests/morphers/add_neighborhood_morpher.cc: Update.
* tests/morphers/morphers.cc: Likewise.
* tests/core/image_entry.cc: Likewise.
* tests/core/grid.cc: Likewise.
* tests/core/image1d.cc: Likewise.
* tests/core/image2d.cc: Likewise.
* tests/core/image3d.cc: Likewise.
* tests/core/npoints.cc: Likewise.
* oln/debug/print.hh: Likewise.
* oln/core/typedefs.hh: Likewise.
* oln/core/automatic/impl.hh: Likewise.
* oln/core/automatic/image/image.hh: Likewise.
* oln/core/automatic/image/image_being_point_wise_random_accessible.hh:
Likewise.
* oln/core/automatic/image/image_having_neighborhood.hh: Likewise.
* oln/core/automatic/image/image_being_value_wise_random_accessible.hh:
Likewise.
* oln/core/automatic/topology/topology_having_bbox.hh: Likewise.
* oln/core/automatic/topology/topology_having_subset.hh: Likewise.
* oln/core/automatic/topology/topology_being_random_accessible.hh:
Likewise.
* oln/core/automatic/topology/topology_having_neighborhood.hh: Likewise.
* oln/core/spe/row.hh: Likewise.
* oln/core/spe/col.hh: Likewise.
* oln/core/spe/slice.hh: Likewise.
* oln/core/iterator_vtypes.hh: Likewise.
* oln/core/abstract/iterator_on_points.hh: Likewise.
* oln/core/abstract/image/hybrid/classical.hh: Likewise.
* oln/core/abstract/image/type/integre.hh: Likewise.
* oln/core/abstract/image/type/hierarchy.hh: Likewise.
* oln/core/abstract/image/computability/hierarchy.hh: Likewise.
* oln/core/abstract/image/dimension/1d.hh: Likewise.
* oln/core/abstract/image/dimension/2d.hh: Likewise.
* oln/core/abstract/image/dimension/3d.hh: Likewise.
* oln/core/abstract/image/point_wise_accessibility/hierarchy.hh: Likewise.
* oln/core/abstract/point_set/point_set_being_random_accessible.hh:
Likewise.
* oln/core/abstract/point_set/point_set_having_known_size.hh: Likewise.
* oln/core/abstract/point_set/point_set_being_connected.hh: Likewise.
* oln/core/abstract/point_set/point_set_having_bbox.hh: Likewise.
* oln/core/abstract/topology/topology_having_bbox.hh: Likewise.
* oln/core/abstract/topology/topology_being_random_accessible.hh: Likewise.
* oln/core/abstract/topology/topology_having_subset.hh: Likewise.
* oln/core/abstract/topology/topology_having_neighborhood.hh: Likewise.
* oln/core/abstract/internal/image_impl.hh: Likewise.
* oln/core/gen/piter_isubset.hh: Likewise.
* oln/core/gen/topo_add_isubset.hh: Likewise.
* oln/core/gen/bbox.hh: Likewise.
* oln/core/gen/topo_bbox.hh: Likewise.
* oln/core/gen/neighb.hh: Likewise.
* oln/core/gen/bkd_viter_lut.hh: Likewise.
* oln/core/gen/pset_list.hh: Likewise.
* oln/core/gen/window.hh: Likewise.
* oln/core/gen/topo_lbbox.hh: Likewise.
* oln/core/gen/pset_vec.hh: Likewise.
* oln/core/gen/pset_.hh: Likewise.
* oln/core/gen/fwd_viter_lut.hh: Likewise.
* oln/core/gen/mapimage.hh: Likewise.
* oln/core/gen/topo_add_nbh.hh: Likewise.
* oln/core/internal/topology_morpher.hh: Likewise.
* oln/core/internal/point_nd.hh: Likewise.
* oln/core/internal/bbox_bkd_piter.hh: Likewise.
* oln/core/internal/bbox_fwd_piter.hh: Likewise.
* oln/core/internal/dpoint_nd.hh: Likewise.
* oln/morpher/add_isubset.hh: Likewise.
* oln/morpher/value_cast.hh: Likewise.
* oln/morpher/thru_fun.hh: Likewise.
* oln/morpher/slice.hh: Likewise.
* oln/morpher/with_lut.hh: Likewise.
* oln/morpher/thru_mfun.hh: Likewise.
* oln/morpher/internal/image_value_morpher.hh: Likewise.
* oln/morpher/internal/image_extension.hh: Likewise.
* oln/morpher/add_neighborhood.hh: Likewise.
Entry classes now use:
- stc::abstract instead of mlc::undefined;
- stc::final when possible;
- 'deferred' versions of vtype access when required.
* oln/core/point_set_entry.hh: Update.
(set_super_type): New.
(vtypes): Update.
* oln/core/neighborhood_entry.hh: Likewise.
* oln/core/topology_entry.hh: Likewise.
* oln/core/image_entry.hh: Likewise.
* oln/core/abstract/grid.hh: Likewise.
* oln/core/abstract/image.hh: Likewise.
(decl): Re-activate static checks.
* oln/core/abstract/iterator.hh: Likewise.
* oln/core/abstract/point.hh: Likewise.
* oln/core/abstract/dpoint.hh: Likewise.
* oln/core/abstract/iterator_on_values.hh: Likewise.
* oln/core/abstract/window.hh: Likewise.
Remove obsolete definitions of now final vtypes.
* tests/core/image_entry.cc: Update.
* oln/core/1d/image1d.hh: Likewise.
* oln/core/2d/image2d.hh: Likewise.
* oln/core/3d/image3d.hh: Likewise.
Update tests with the 'find' version of vtype access.
* oln/core/abstract/image/mutability/hierarchy.hh: Update.
* oln/core/abstract/image/dimension/hierarchy.hh: Likewise.
* oln/core/abstract/image/neighborhood/hierarchy.hh: Likewise.
* oln/core/abstract/image/bbox/hierarchy.hh: Likewise.
* oln/core/abstract/image/value_wise_accessibility/hierarchy.hh: Likewise.
Update from 'delegated' to 'delegatee'.
* oln/core/abstract/internal/image_impl.hh: Update.
* oln/core/gen/topo_add_nbh.hh: Likewise.
* oln/core/internal/topology_morpher.hh: Likewise.
* oln/morpher/internal/image_value_morpher.hh: Likewise.
* oln/morpher/internal/image_extension.hh: Likewise.
* oln/core/typedefs.hh (delegated_type): Add commentary.
Misc.
* tests/core/at.cc: Cosmetic change.
* oln/core/gen/bbox.hh (vtypes): Fix typo.
* oln/core/gen/pset_list.hh: Likewise.
* oln/core/gen/pset_vec.hh: Likewise.
* oln/core/gen/pset_.hh: Likewise.
* tests/core/image_entry.cc (is_computed_type): Fix missing.
Index: tests/morphers/add_neighborhood_morpher.cc
===================================================================
--- tests/morphers/add_neighborhood_morpher.cc (revision 712)
+++ tests/morphers/add_neighborhood_morpher.cc (working copy)
@@ -61,11 +61,11 @@
// same interfaces as the underlying morphed image.
mlc::assert_< mlc_is_a_(image_with_nbh_t, oln::abstract::image2d) >::check();
// Check the type of neighborhood.
- mlc::assert_< mlc_eq(oln_type_of_(image_with_nbh_t, neighborhood),
+ mlc::assert_< mlc_eq(oln_vtype_(image_with_nbh_t, neighborhood),
oln::neighb2d) >::check();
// Instantiate a neighborhood for this image type.
- oln_type_of_(image_with_nbh_t, neighborhood) nbh;
+ oln_vtype_(image_with_nbh_t, neighborhood) nbh;
// Instantiate an object, and check its methods.
image_with_nbh_t ima_with_nbh(ima, nbh);
oln::neighb2d nbh2 = ima_with_nbh.neighborhood();
Index: tests/morphers/morphers.cc
===================================================================
--- tests/morphers/morphers.cc (revision 712)
+++ tests/morphers/morphers.cc (working copy)
@@ -65,11 +65,11 @@
mlc::assert_< mlc_is_a_(image_with_nbh_t,
oln::abstract::image_having_neighborhood) >::check();
// Check the type of neighborhood.
- mlc::assert_< mlc_eq(oln_type_of_(image_with_nbh_t, neighborhood),
+ mlc::assert_< mlc_eq(oln_vtype_(image_with_nbh_t, neighborhood),
oln::neighb2d) >::check();
// Instantiate a neighborhood for this image type.
- oln_type_of_(image_with_nbh_t, neighborhood) nbh;
+ oln_vtype_(image_with_nbh_t, neighborhood) nbh;
// Instantiate an object, and check its methods.
image_with_nbh_t ima_with_nbh(ima, nbh);
oln::neighb2d nbh2 = ima_with_nbh.neighborhood();
@@ -88,7 +88,7 @@
mlc::assert_< mlc_is_a_(image_with_nbh_id_t,
oln::abstract::image_having_neighborhood) >::check();
// Check the type of neighborhood.
- mlc::assert_< mlc_eq(oln_type_of_(image_with_nbh_id_t, neighborhood),
+ mlc::assert_< mlc_eq(oln_vtype_(image_with_nbh_id_t, neighborhood),
oln::neighb2d) >::check();
// Instantiate an object, and check its methods.
Index: tests/core/image_entry.cc
===================================================================
--- tests/core/image_entry.cc (revision 712)
+++ tests/core/image_entry.cc (working copy)
@@ -57,21 +57,20 @@
template<>
struct vtypes<my::image>
{
- // The switch for image_dimension (above image_entry) plugs the
- // inheritance relation to the right abstract::image_dimension
- // class using the sole grid information (the grid can be seen
- // here as a ``tag'').
- typedef oln::grid2d grid_type;
-
// Likewise, for the switch of image_typeness using the type of
// the value of the image.
typedef char value_type;
+ // The switch for image_dimension (above image_entry) plugs the
+ // inheritance relation to the right abstract::image_dimension
+ // class using the grid information fetched from the point type.
+ typedef point2d point_type;
+
// FIXME: Dummy values.
typedef topo2d topo_type;
- typedef point2d point_type;
typedef my::image concrete_type;
typedef my::dummy morpher_type;
+ typedef mlc::true_ is_computed_type;
};
template<>
Index: tests/core/at.cc
===================================================================
--- tests/core/at.cc (revision 712)
+++ tests/core/at.cc (working copy)
@@ -38,10 +38,12 @@
{
using namespace oln;
- image2d<int> ima(1, 1);
+ typedef image2d<int> I;
+ I ima(1, 1);
point2d p(0, 0);
(ima + c4).at(0, 0) = 51;
+
assert(ima(p) == 51);
image1d<int> sig(1);
Index: tests/core/grid.cc
===================================================================
--- tests/core/grid.cc (revision 712)
+++ tests/core/grid.cc (working copy)
@@ -39,7 +39,7 @@
// The extra pairs of parenthesis around mlc_value are needed to
// prevent the assert macro from interpreting the arguments of
// mlc_value as its own.
- assert((mlc_value(oln_type_of_(oln::grid1d, dimvalue))) == 1);
- assert((mlc_value(oln_type_of_(oln::grid2d, dimvalue))) == 2);
- assert((mlc_value(oln_type_of_(oln::grid3d, dimvalue))) == 3);
+ assert((mlc_value(oln_vtype_(oln::grid1d, dimvalue))) == 1);
+ assert((mlc_value(oln_vtype_(oln::grid2d, dimvalue))) == 2);
+ assert((mlc_value(oln_vtype_(oln::grid3d, dimvalue))) == 3);
}
Index: tests/core/image1d.cc
===================================================================
--- tests/core/image1d.cc (revision 712)
+++ tests/core/image1d.cc (working copy)
@@ -38,7 +38,7 @@
{
// Fill a 1D image using its iterator.
oln::image1d<char> ima1(3);
- oln_type_of_(oln::image1d<char>, piter) p1(ima1.topo());
+ oln_vtype_(oln::image1d<char>, piter) p1(ima1.topo());
for_all(p1)
ima1(p1) = 1;
@@ -54,7 +54,7 @@
// Add the three images.
oln::image1d<long> sum(ima1.topo());
- oln_type_of_(oln::image1d<long>, piter) p(sum.topo());
+ oln_vtype_(oln::image1d<long>, piter) p(sum.topo());
for_all(p)
sum(p) = ima1(p) + ima2(p) + ima3(p);
// And check the sum.
Index: tests/core/image2d.cc
===================================================================
--- tests/core/image2d.cc (revision 712)
+++ tests/core/image2d.cc (working copy)
@@ -38,7 +38,7 @@
{
// Fill a 2D image using its iterator.
oln::image2d<char> ima1(3, 3);
- oln_type_of_(oln::image2d<char>, piter) p1(ima1.topo());
+ oln_vtype_(oln::image2d<char>, piter) p1(ima1.topo());
for_all(p1)
ima1(p1) = 1;
@@ -55,7 +55,7 @@
// Add the three images.
oln::image2d<long> sum(ima1.topo());
- oln_type_of_(oln::image2d<long>, piter) p(sum.topo());
+ oln_vtype_(oln::image2d<long>, piter) p(sum.topo());
for_all(p)
sum(p) = ima1(p) + ima2(p) + ima3(p);
// And check the sum.
Index: tests/core/image3d.cc
===================================================================
--- tests/core/image3d.cc (revision 712)
+++ tests/core/image3d.cc (working copy)
@@ -38,7 +38,7 @@
{
// Fill a 3D image using its iterator.
oln::image3d<char> ima1(3, 3, 3);
- oln_type_of_(oln::image3d<char>, piter) p1(ima1.topo());
+ oln_vtype_(oln::image3d<char>, piter) p1(ima1.topo());
for_all(p1)
ima1(p1) = 1;
@@ -56,7 +56,7 @@
// Add the three images.
oln::image3d<long> sum(ima1.topo());
- oln_type_of_(oln::image3d<long>, piter) p(sum.topo());
+ oln_vtype_(oln::image3d<long>, piter) p(sum.topo());
for_all(p)
sum(p) = ima1(p) + ima2(p) + ima3(p);
// And check the sum.
Index: tests/core/npoints.cc
===================================================================
--- tests/core/npoints.cc (revision 712)
+++ tests/core/npoints.cc (working copy)
@@ -34,7 +34,7 @@
template <typename I>
unsigned npoints(const oln::abstract::image<I>& input)
{
- oln_type_of(I, piter) p(input.topo());
+ oln_vtype(I, piter) p(input.topo());
unsigned count = 0;
for_all(p)
++count;
Index: oln/debug/print.hh
===================================================================
--- oln/debug/print.hh (revision 712)
+++ oln/debug/print.hh (working copy)
@@ -73,7 +73,7 @@
template <typename I>
void print(const abstract::image<I>& input, std::ostream& ostr)
{
- oln_type_of(I, fwd_piter) p(input.topo());
+ oln_vtype(I, fwd_piter) p(input.topo());
for_all(p)
ostr << p.to_point() << ':' << format(input(p)) <<
' ';
}
Index: oln/core/typedefs.hh
===================================================================
--- oln/core/typedefs.hh (revision 712)
+++ oln/core/typedefs.hh (working copy)
@@ -125,7 +125,7 @@
mlc_decl_typedef(neighborhood_type);
mlc_decl_typedef(subset_type);
- mlc_decl_typedef(delegated_type);
+ mlc_decl_typedef(delegated_type); // FIXME: soon obsolete
mlc_decl_typedef(topo_type);
mlc_decl_typedef(bbox_type);
@@ -168,85 +168,85 @@
/// Shortcuts formed such as "oln_something(T) means
-/// oln_type_of(T, something)".
+/// oln_vtype(T, something)".
/// \{
-# define oln_dim(T) oln_type_of(T, dim)
-# define oln_dim_(T) oln_type_of_(T, dim)
+# define oln_dim(T) oln_vtype(T, dim)
+# define oln_dim_(T) oln_vtype_(T, dim)
-# define oln_vec(T) oln_type_of(T, vec)
-# define oln_vec_(T) oln_type_of_(T, vec)
+# define oln_vec(T) oln_vtype(T, vec)
+# define oln_vec_(T) oln_vtype_(T, vec)
-# define oln_bbox(T) oln_type_of(T, bbox)
-# define oln_bbox_(T) oln_type_of_(T, bbox)
+# define oln_bbox(T) oln_vtype(T, bbox)
+# define oln_bbox_(T) oln_vtype_(T, bbox)
-# define oln_coord(T) oln_type_of(T, coord)
-# define oln_coord_(T) oln_type_of_(T, coord)
+# define oln_coord(T) oln_vtype(T, coord)
+# define oln_coord_(T) oln_vtype_(T, coord)
-# define oln_grid(T) oln_type_of(T, grid)
-# define oln_grid_(T) oln_type_of_(T, grid)
+# define oln_grid(T) oln_vtype(T, grid)
+# define oln_grid_(T) oln_vtype_(T, grid)
-# define oln_topo(T) oln_type_of(T, topo)
-# define oln_topo_(T) oln_type_of_(T, topo)
+# define oln_topo(T) oln_vtype(T, topo)
+# define oln_topo_(T) oln_vtype_(T, topo)
-# define oln_point(T) oln_type_of(T, point)
-# define oln_point_(T) oln_type_of_(T, point)
+# define oln_point(T) oln_vtype(T, point)
+# define oln_point_(T) oln_vtype_(T, point)
-# define oln_psite(T) oln_type_of(T, psite)
-# define oln_psite_(T) oln_type_of_(T, psite)
+# define oln_psite(T) oln_vtype(T, psite)
+# define oln_psite_(T) oln_vtype_(T, psite)
-# define oln_dpoint(T) oln_type_of(T, dpoint)
-# define oln_dpoint_(T) oln_type_of_(T, dpoint)
+# define oln_dpoint(T) oln_vtype(T, dpoint)
+# define oln_dpoint_(T) oln_vtype_(T, dpoint)
-# define oln_is_computed(T) oln_type_of(T, is_computed)
-# define oln_is_computed_(T) oln_type_of_(T, is_computed)
+# define oln_is_computed(T) oln_vtype(T, is_computed)
+# define oln_is_computed_(T) oln_vtype_(T, is_computed)
-# define oln_value(T) oln_type_of(T, value)
-# define oln_value_(T) oln_type_of_(T, value)
+# define oln_value(T) oln_vtype(T, value)
+# define oln_value_(T) oln_vtype_(T, value)
-# define oln_rvalue(T) oln_type_of(T, rvalue)
-# define oln_rvalue_(T) oln_type_of_(T, rvalue)
+# define oln_rvalue(T) oln_vtype(T, rvalue)
+# define oln_rvalue_(T) oln_vtype_(T, rvalue)
-# define oln_lvalue(T) oln_type_of(T, lvalue)
-# define oln_lvalue_(T) oln_type_of_(T, lvalue)
+# define oln_lvalue(T) oln_vtype(T, lvalue)
+# define oln_lvalue_(T) oln_vtype_(T, lvalue)
-# define oln_fwd_piter(T) oln_type_of(T, fwd_piter)
-# define oln_fwd_piter_(T) oln_type_of_(T, fwd_piter)
+# define oln_fwd_piter(T) oln_vtype(T, fwd_piter)
+# define oln_fwd_piter_(T) oln_vtype_(T, fwd_piter)
-# define oln_bkd_piter(T) oln_type_of(T, bkd_piter)
-# define oln_bkd_piter_(T) oln_type_of_(T, bkd_piter)
+# define oln_bkd_piter(T) oln_vtype(T, bkd_piter)
+# define oln_bkd_piter_(T) oln_vtype_(T, bkd_piter)
-# define oln_fwd_qiter(T) oln_type_of(T, fwd_qiter)
-# define oln_fwd_qiter_(T) oln_type_of_(T, fwd_qiter)
+# define oln_fwd_qiter(T) oln_vtype(T, fwd_qiter)
+# define oln_fwd_qiter_(T) oln_vtype_(T, fwd_qiter)
-# define oln_bkd_qiter(T) oln_type_of(T, bkd_qiter)
-# define oln_bkd_qiter_(T) oln_type_of_(T, bkd_qiter)
+# define oln_bkd_qiter(T) oln_vtype(T, bkd_qiter)
+# define oln_bkd_qiter_(T) oln_vtype_(T, bkd_qiter)
-# define oln_fwd_niter(T) oln_type_of(T, fwd_niter)
-# define oln_fwd_niter_(T) oln_type_of_(T, fwd_niter)
+# define oln_fwd_niter(T) oln_vtype(T, fwd_niter)
+# define oln_fwd_niter_(T) oln_vtype_(T, fwd_niter)
-# define oln_bkd_niter(T) oln_type_of(T, bkd_niter)
-# define oln_bkd_niter_(T) oln_type_of_(T, bkd_niter)
+# define oln_bkd_niter(T) oln_vtype(T, bkd_niter)
+# define oln_bkd_niter_(T) oln_vtype_(T, bkd_niter)
-# define oln_fwd_viter(T) oln_type_of(T, fwd_viter)
-# define oln_fwd_viter_(T) oln_type_of_(T, fwd_viter)
+# define oln_fwd_viter(T) oln_vtype(T, fwd_viter)
+# define oln_fwd_viter_(T) oln_vtype_(T, fwd_viter)
-# define oln_bkd_viter(T) oln_type_of(T, bkd_viter)
-# define oln_bkd_viter_(T) oln_type_of_(T, bkd_viter)
+# define oln_bkd_viter(T) oln_vtype(T, bkd_viter)
+# define oln_bkd_viter_(T) oln_vtype_(T, bkd_viter)
/// Even shorter shortcuts.
/// \{
-# define oln_piter(T) oln_type_of(T, fwd_piter)
-# define oln_piter_(T) oln_type_of_(T, fwd_piter)
+# define oln_piter(T) oln_vtype(T, fwd_piter)
+# define oln_piter_(T) oln_vtype_(T, fwd_piter)
-# define oln_qiter(T) oln_type_of(T, fwd_qiter)
-# define oln_qiter_(T) oln_type_of_(T, fwd_qiter)
+# define oln_qiter(T) oln_vtype(T, fwd_qiter)
+# define oln_qiter_(T) oln_vtype_(T, fwd_qiter)
-# define oln_niter(T) oln_type_of(T, fwd_niter)
-# define oln_niter_(T) oln_type_of_(T, fwd_niter)
+# define oln_niter(T) oln_vtype(T, fwd_niter)
+# define oln_niter_(T) oln_vtype_(T, fwd_niter)
-# define oln_viter(T) oln_type_of(T, fwd_viter)
-# define oln_viter_(T) oln_type_of_(T, fwd_viter)
+# define oln_viter(T) oln_vtype(T, fwd_viter)
+# define oln_viter_(T) oln_vtype_(T, fwd_viter)
/// \}
/// \}
Index: oln/core/macros.hh
===================================================================
--- oln/core/macros.hh (revision 712)
+++ oln/core/macros.hh (working copy)
@@ -32,30 +32,36 @@
# include <oln/core/typedefs.hh>
-# define oln_type_of_(OlnType, Alias) \
- oln::direct_type_of_<OlnType, oln::typedef_:: Alias##_type>::ret
+# define oln_vtype_(OlnType, Alias) \
+ stc_vtype_(oln, OlnType, Alias)
-# define oln_type_of(OlnType, Alias) \
- typename oln_type_of_(OlnType, Alias)
+# define oln_vtype(OlnType, Alias) \
+ stc_vtype(oln, OlnType, Alias)
+# define oln_find_vtype(OlnType, Alias) \
+ stc_find_vtype(oln, OlnType, Alias)
-# define oln_deduce_type_of(OlnType, Alias1, Alias2) \
-typename oln::direct_type_of_<typename oln::direct_type_of_<OlnType,
oln::typedef_::Alias1##_type >::ret, \
- oln::typedef_::Alias2##_type >::ret
-# define oln_deduce(OlnType, Alias1, Alias2) \
- oln_deduce_type_of(OlnType, Alias1, Alias2)
+# define oln_deferred_vtype(OlnType, Alias) \
+ stc_deferred_vtype(oln, OlnType, Alias)
+# define oln_deduce_deferred_vtype(OlnType, Alias1, Alias2) \
+ stc_deduce_deferred_vtype(oln, OlnType, Alias1, Alias2)
+# define oln_deduce_vtype(OlnType, Alias1, Alias2) \
+ stc_deduce_vtype(oln, OlnType, Alias1, Alias2)
+
+# define oln_find_deduce_vtype(OlnType, Alias1, Alias2) \
+ stc_find_deduce_vtype(oln, OlnType, Alias1, Alias2)
+
+
+
#define oln_virtual_typedef(Typedef) \
- typedef oln_type_of(E, Typedef) Typedef
+ typedef oln_vtype(E, Typedef) Typedef
-// FIXME: Rec? The macro below is to ensure that static checks are removed during
"Rec" tests.
-// #define oln_virtual_typedef(Typedef) typedef void Typedef
-
#endif // ! OLN_CORE_MACROS_HH
Index: oln/core/point_set_entry.hh
===================================================================
--- oln/core/point_set_entry.hh (revision 712)
+++ oln/core/point_set_entry.hh (working copy)
@@ -39,6 +39,11 @@
template <typename E> struct point_set_entry;
+ template <typename E>
+ struct set_super_type< point_set_entry<E> >
+ {
+ typedef mlc::none ret;
+ };
/// Virtual types associated to point_set_entry<E>.
@@ -46,20 +51,20 @@
template <typename E>
struct vtypes< point_set_entry<E> >
{
- typedef mlc::undefined point_type;
+ typedef stc::abstract point_type;
- typedef mlc::undefined fwd_piter_type;
- typedef mlc::undefined bkd_piter_type;
+ typedef stc::abstract fwd_piter_type;
+ typedef stc::abstract bkd_piter_type;
typedef mlc::none bbox_type;
- typedef mlc::undefined is_random_accessible_type;
- typedef mlc::undefined has_known_size_type;
- typedef mlc::undefined is_connected_type;
+ typedef stc::abstract is_random_accessible_type;
+ typedef stc::abstract has_known_size_type;
+ typedef stc::abstract is_connected_type;
// final.
- typedef oln_deduce(E, point, coord) coord_type;
- typedef oln_deduce(E, point, grid) grid_type;
- typedef oln_deduce(E, point, dim) dim_type;
+ typedef oln_deduce_vtype(E, point, coord) coord_type;
+ typedef oln_deduce_vtype(E, point, grid) grid_type;
+ typedef oln_deduce_vtype(E, point, dim) dim_type;
typedef oln_fwd_piter(E) piter_type;
};
Index: oln/core/neighborhood_entry.hh
===================================================================
--- oln/core/neighborhood_entry.hh (revision 712)
+++ oln/core/neighborhood_entry.hh (working copy)
@@ -40,11 +40,18 @@
template <typename E> struct neighborhood_entry;
+ template <typename E>
+ struct set_super_type< neighborhood_entry<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
/// Virtual types associated to neighborhood_entry<E>.
template <typename E>
struct vtypes< neighborhood_entry<E> >
{
- typedef mlc::undefined grid_type;
+ typedef stc::abstract grid_type;
};
Index: oln/core/automatic/impl.hh
===================================================================
--- oln/core/automatic/impl.hh (revision 712)
+++ oln/core/automatic/impl.hh (working copy)
@@ -44,7 +44,7 @@
/// Specialization of oln::automatic::get_impl saving the user
/// the need to specify the morpher type as tag.
template < template <class> class abstraction, typename E >
- class get_impl : public set_impl< abstraction, oln_type_of(E, morpher), E >
+ class get_impl : public set_impl< abstraction, oln_vtype(E, morpher), E >
{
};
Index: oln/core/automatic/image/image.hh
===================================================================
--- oln/core/automatic/image/image.hh (revision 712)
+++ oln/core/automatic/image/image.hh (working copy)
@@ -53,9 +53,9 @@
{
private:
- typedef oln_type_of(E, topo) topo_t;
- typedef oln_type_of(E, rvalue) rvalue_t;
- typedef oln_type_of(E, psite) psite_t;
+ typedef oln_vtype(E, topo) topo_t;
+ typedef oln_vtype(E, rvalue) rvalue_t;
+ typedef oln_vtype(E, psite) psite_t;
public:
Index: oln/core/automatic/image/image_being_point_wise_random_accessible.hh
===================================================================
--- oln/core/automatic/image/image_being_point_wise_random_accessible.hh (revision 712)
+++ oln/core/automatic/image/image_being_point_wise_random_accessible.hh (working copy)
@@ -55,7 +55,7 @@
{
private:
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
Index: oln/core/automatic/image/image_having_neighborhood.hh
===================================================================
--- oln/core/automatic/image/image_having_neighborhood.hh (revision 712)
+++ oln/core/automatic/image/image_having_neighborhood.hh (working copy)
@@ -53,7 +53,7 @@
public virtual stc::any__simple<E>
{
private:
- typedef oln_type_of(E, neighborhood) neighborhood_t;
+ typedef oln_vtype(E, neighborhood) neighborhood_t;
public:
/// Accessor delegation.
Index: oln/core/automatic/image/image_being_value_wise_random_accessible.hh
===================================================================
--- oln/core/automatic/image/image_being_value_wise_random_accessible.hh (revision 712)
+++ oln/core/automatic/image/image_being_value_wise_random_accessible.hh (working copy)
@@ -54,8 +54,8 @@
public virtual stc::any__simple<E>
{
public:
- typedef oln_type_of(E, value) value_type;
- typedef oln_type_of(E, fwd_viter) fwd_viter_type;
+ typedef oln_vtype(E, value) value_type;
+ typedef oln_vtype(E, fwd_viter) fwd_viter_type;
public:
fwd_viter_type impl_value(const value_type& v) const;
@@ -70,8 +70,8 @@
public virtual stc::any__simple<E>
{
public:
- typedef oln_type_of(E, value) value_type;
- typedef oln_type_of(E, fwd_viter) fwd_viter_type;
+ typedef oln_vtype(E, value) value_type;
+ typedef oln_vtype(E, fwd_viter) fwd_viter_type;
public:
fwd_viter_type impl_value(const value_type& v);
Index: oln/core/automatic/topology/topology_having_bbox.hh
===================================================================
--- oln/core/automatic/topology/topology_having_bbox.hh (revision 712)
+++ oln/core/automatic/topology/topology_having_bbox.hh (working copy)
@@ -56,7 +56,7 @@
public virtual stc::any__simple<E>
{
private:
- typedef oln_type_of(E, bbox) bbox_t;
+ typedef oln_vtype(E, bbox) bbox_t;
public:
Index: oln/core/automatic/topology/topology_having_subset.hh
===================================================================
--- oln/core/automatic/topology/topology_having_subset.hh (revision 712)
+++ oln/core/automatic/topology/topology_having_subset.hh (working copy)
@@ -56,7 +56,7 @@
public virtual stc::any__simple<E>
{
private:
- typedef oln_type_of(E, subset) subset_t;
+ typedef oln_vtype(E, subset) subset_t;
public:
Index: oln/core/automatic/topology/topology_being_random_accessible.hh
===================================================================
--- oln/core/automatic/topology/topology_being_random_accessible.hh (revision 712)
+++ oln/core/automatic/topology/topology_being_random_accessible.hh (working copy)
@@ -57,7 +57,7 @@
public virtual stc::any__simple<E>
{
private:
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
Index: oln/core/automatic/topology/topology_having_neighborhood.hh
===================================================================
--- oln/core/automatic/topology/topology_having_neighborhood.hh (revision 712)
+++ oln/core/automatic/topology/topology_having_neighborhood.hh (working copy)
@@ -56,7 +56,7 @@
public virtual stc::any__simple<E>
{
private:
- typedef oln_type_of(E, neighborhood) neighborhood_t;
+ typedef oln_vtype(E, neighborhood) neighborhood_t;
public:
Index: oln/core/spe/row.hh
===================================================================
--- oln/core/spe/row.hh (revision 712)
+++ oln/core/spe/row.hh (working copy)
@@ -81,14 +81,14 @@
template <typename P>
oln_coord(P) row(const abstract::point<P>& p)
{
- typedef oln_type_of(P, row_comp) comp_t;
+ typedef oln_vtype(P, row_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename P>
oln_coord(P)& row(abstract::point<P>& p)
{
- typedef oln_type_of(P, row_comp) comp_t;
+ typedef oln_vtype(P, row_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -97,14 +97,14 @@
template <typename D>
oln_coord(D) row(const abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, row_comp) comp_t;
+ typedef oln_vtype(D, row_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename D>
oln_coord(D)& row(abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, row_comp) comp_t;
+ typedef oln_vtype(D, row_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -113,7 +113,7 @@
template <typename P>
oln_coord(P) row(const abstract::iterator_on_points<P>& it)
{
- typedef oln_deduce_type_of(P, point, row_comp) comp_t;
+ typedef oln_deduce_vtype(P, point, row_comp) comp_t;
return it.to_point().vec()[mlc_value(comp_t)];
}
@@ -122,14 +122,14 @@
template <typename Ps>
oln_coord(Ps) min_row(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, row_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, row_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename Ps>
oln_coord(Ps) max_row(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, row_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, row_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
@@ -138,14 +138,14 @@
template <typename I>
oln_coord(I) min_row(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, row_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, row_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename I>
oln_coord(I) max_row(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, row_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, row_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
Index: oln/core/spe/col.hh
===================================================================
--- oln/core/spe/col.hh (revision 712)
+++ oln/core/spe/col.hh (working copy)
@@ -81,14 +81,14 @@
template <typename P>
oln_coord(P) col(const abstract::point<P>& p)
{
- typedef oln_type_of(P, col_comp) comp_t;
+ typedef oln_vtype(P, col_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename P>
oln_coord(P)& col(abstract::point<P>& p)
{
- typedef oln_type_of(P, col_comp) comp_t;
+ typedef oln_vtype(P, col_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -97,14 +97,14 @@
template <typename D>
oln_coord(D) col(const abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, col_comp) comp_t;
+ typedef oln_vtype(D, col_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename D>
oln_coord(D)& col(abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, col_comp) comp_t;
+ typedef oln_vtype(D, col_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -113,7 +113,7 @@
template <typename P>
oln_coord(P) col(const abstract::iterator_on_points<P>& it)
{
- typedef oln_deduce_type_of(P, point, col_comp) comp_t;
+ typedef oln_deduce_vtype(P, point, col_comp) comp_t;
return it.to_point().vec()[mlc_value(comp_t)];
}
@@ -122,14 +122,14 @@
template <typename Ps>
oln_coord(Ps) min_col(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, col_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, col_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename Ps>
oln_coord(Ps) max_col(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, col_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, col_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
@@ -138,14 +138,14 @@
template <typename I>
oln_coord(I) min_col(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, col_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, col_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename I>
oln_coord(I) max_col(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, col_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, col_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
Index: oln/core/spe/slice.hh
===================================================================
--- oln/core/spe/slice.hh (revision 712)
+++ oln/core/spe/slice.hh (working copy)
@@ -81,14 +81,14 @@
template <typename P>
oln_coord(P) slice(const abstract::point<P>& p)
{
- typedef oln_type_of(P, slice_comp) comp_t;
+ typedef oln_vtype(P, slice_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename P>
oln_coord(P)& slice(abstract::point<P>& p)
{
- typedef oln_type_of(P, slice_comp) comp_t;
+ typedef oln_vtype(P, slice_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -97,14 +97,14 @@
template <typename D>
oln_coord(D) slice(const abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, slice_comp) comp_t;
+ typedef oln_vtype(D, slice_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
template <typename D>
oln_coord(D)& slice(abstract::dpoint<D>& p)
{
- typedef oln_type_of(D, slice_comp) comp_t;
+ typedef oln_vtype(D, slice_comp) comp_t;
return p.vec()[mlc_value(comp_t)];
}
@@ -113,7 +113,7 @@
template <typename P>
oln_coord(P) slice(const abstract::iterator_on_points<P>& it)
{
- typedef oln_deduce_type_of(P, point, slice_comp) comp_t;
+ typedef oln_deduce_vtype(P, point, slice_comp) comp_t;
return it.to_point().vec()[mlc_value(comp_t)];
}
@@ -122,14 +122,14 @@
template <typename Ps>
oln_coord(Ps) min_slice(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, slice_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, slice_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename Ps>
oln_coord(Ps) max_slice(const abstract::point_set_having_bbox<Ps>& ps)
{
- typedef oln_deduce_type_of(Ps, point, slice_comp) comp_t;
+ typedef oln_deduce_vtype(Ps, point, slice_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
@@ -138,14 +138,14 @@
template <typename I>
oln_coord(I) min_slice(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, slice_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, slice_comp) comp_t;
return ps.pmin().vec()[mlc_value(comp_t)];
}
template <typename I>
oln_coord(I) max_slice(const abstract::image_having_bbox<I>& ps)
{
- typedef oln_deduce_type_of(I, point, slice_comp) comp_t;
+ typedef oln_deduce_vtype(I, point, slice_comp) comp_t;
return ps.pmax().vec()[mlc_value(comp_t)];
}
Index: oln/core/topology_entry.hh
===================================================================
--- oln/core/topology_entry.hh (revision 712)
+++ oln/core/topology_entry.hh (working copy)
@@ -39,15 +39,22 @@
template <typename E> struct topology_entry;
+ template <typename E>
+ struct set_super_type< topology_entry<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
/// Virtual types associated to topology_entry<E>.
template <typename E>
struct vtypes< topology_entry<E> >
{
- typedef mlc::undefined point_type;
- typedef mlc::undefined bbox_type;
+ typedef stc::abstract point_type;
+ typedef stc::abstract bbox_type;
typedef mlc::none neighborhood_type;
- typedef mlc::undefined is_random_accessible_type;
+ typedef stc::abstract is_random_accessible_type;
typedef mlc::none subset_type;
typedef mlc::none morpher_type;
Index: oln/core/image_entry.hh
===================================================================
--- oln/core/image_entry.hh (revision 712)
+++ oln/core/image_entry.hh (working copy)
@@ -42,29 +42,34 @@
template <typename E> struct image_entry;
+ template <typename E>
+ struct set_super_type< image_entry<E> >
+ {
+ typedef mlc::none ret;
+ };
+
/// Virtual types associated to image_entry<E>.
template <typename E>
struct vtypes< image_entry<E> >
{
- typedef mlc::undefined topo_type;
- typedef mlc::undefined grid_type;
- typedef mlc::undefined point_type;
- typedef mlc::undefined is_computed_type;
- typedef mlc::undefined value_type;
+ typedef stc::abstract topo_type;
- typedef mlc::undefined fwd_piter_type;
- typedef mlc::undefined bkd_piter_type;
+ typedef stc::abstract point_type;
+ typedef stc::final<oln_deduce_deferred_vtype(E, point, grid)> grid_type;
+ typedef stc::final<oln_deduce_deferred_vtype(E, point, coord)> coord_type;
- typedef mlc::undefined fwd_qiter_type;
- typedef mlc::undefined bkd_qiter_type;
+ typedef stc::abstract is_computed_type;
+ typedef stc::abstract value_type;
- // final definitions:
- typedef oln_deduce(E, point, coord) coord_type;
- typedef oln_fwd_piter(E) piter_type;
+ typedef stc::abstract fwd_piter_type;
+ typedef stc::abstract bkd_piter_type;
- // default definitions:
+ // FIXME: final definitions:
+ typedef oln_fwd_piter(E) piter_type;
+
+ // FIXME: default definitions:
typedef oln_point(E) psite_type;
typedef oln_value(E) rvalue_type;
Index: oln/core/iterator_vtypes.hh
===================================================================
--- oln/core/iterator_vtypes.hh (revision 712)
+++ oln/core/iterator_vtypes.hh (working copy)
@@ -183,7 +183,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_piter_type >
{
- typedef piter_isubset_<oln_type_of(Image, fwd_piter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, fwd_piter), Isubset> ret;
};
/// bkd_piter vtype on morpher::add_isubset.
@@ -191,7 +191,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_piter_type >
{
- typedef piter_isubset_<oln_type_of(Image, bkd_piter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, bkd_piter), Isubset> ret;
};
@@ -202,7 +202,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_qiter_type >
{
- typedef piter_isubset_<oln_type_of(Image, fwd_qiter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, fwd_qiter), Isubset> ret;
};
/// bkd_qiter vtype on morpher::add_isubset.
@@ -210,7 +210,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_qiter_type >
{
- typedef piter_isubset_<oln_type_of(Image, bkd_qiter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, bkd_qiter), Isubset> ret;
};
@@ -221,7 +221,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::fwd_niter_type >
{
- typedef piter_isubset_<oln_type_of(Image, fwd_niter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, fwd_niter), Isubset> ret;
};
/// bkd_niter vtype on morpher::add_isubset.
@@ -229,7 +229,7 @@
struct single_vtype< morpher::add_isubset<Image, Isubset>,
typedef_::bkd_niter_type >
{
- typedef piter_isubset_<oln_type_of(Image, bkd_niter), Isubset> ret;
+ typedef piter_isubset_<oln_vtype(Image, bkd_niter), Isubset> ret;
};
@@ -254,7 +254,7 @@
typedef_::fwd_niter_type >
{
private:
- typedef oln_type_of(Image, point) point_t;
+ typedef oln_vtype(Image, point) point_t;
public:
typedef fwd_niter_neighb_<point_t> ret;
};
@@ -265,7 +265,7 @@
typedef_::bkd_niter_type >
{
private:
- typedef oln_type_of(Image, point) point_t;
+ typedef oln_vtype(Image, point) point_t;
public:
typedef bkd_niter_neighb_<point_t> ret;
};
Index: oln/core/abstract/iterator_on_points.hh
===================================================================
--- oln/core/abstract/iterator_on_points.hh (revision 712)
+++ oln/core/abstract/iterator_on_points.hh (working copy)
@@ -53,8 +53,8 @@
template <typename E>
struct vtypes< abstract::iterator_on_points<E> >
{
- typedef mlc::undefined point_type;
- typedef oln_deduce(E, point, coord) coord_type;
+ typedef stc::abstract point_type;
+ typedef oln_deduce_deferred_vtype(E, point, coord) coord_type;
};
Index: oln/core/abstract/image.hh
===================================================================
--- oln/core/abstract/image.hh (revision 712)
+++ oln/core/abstract/image.hh (working copy)
@@ -79,8 +79,8 @@
oln_virtual_typedef(point);
// FIXME: Rec?
-// oln_virtual_typedef(fwd_piter);
-// oln_virtual_typedef(bkd_piter);
+ oln_virtual_typedef(fwd_piter);
+ oln_virtual_typedef(bkd_piter);
oln_virtual_typedef(is_computed);
oln_virtual_typedef(value);
@@ -144,11 +144,11 @@
image<E>::decl::decl()
{
// FIXME: Rec?
-// mlc::assert_< mlc_is_a(topo, abstract::topology)
>::check();
-// mlc::assert_< mlc_is_a(grid, abstract::grid)
>::check();
-// mlc::assert_< mlc_is_a(point, abstract::point)
>::check();
-// mlc::assert_< mlc_is_a(fwd_piter, abstract::iterator_on_points)
>::check();
-// mlc::assert_< mlc_is_a(bkd_piter, abstract::iterator_on_points)
>::check();
+ mlc::assert_< mlc_is_a(topo, abstract::topology) >::check();
+ mlc::assert_< mlc_is_a(grid, abstract::grid) >::check();
+ mlc::assert_< mlc_is_a(point, abstract::point) >::check();
+ mlc::assert_< mlc_is_a(fwd_piter, abstract::iterator_on_points) >::check();
+ mlc::assert_< mlc_is_a(bkd_piter, abstract::iterator_on_points) >::check();
// FIXME: Rec?
// mlc::assert_< mlc_is_a(plain, abstract::image) >::check();
Index: oln/core/abstract/image/hybrid/classical.hh
===================================================================
--- oln/core/abstract/image/hybrid/classical.hh (revision 712)
+++ oln/core/abstract/image/hybrid/classical.hh (working copy)
@@ -174,9 +174,9 @@
/// 1D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 1 > :
- where_< mlc::and_list_< mlc::eq_< oln_type_of(E, grid), oln::grid1d >,
- mlc::eq_< oln_deduce_type_of(E, topo, is_random_accessible), mlc::true_ >,
- mlc::neq_< oln_deduce_type_of(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_ >,
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
{
@@ -187,9 +187,9 @@
/// 2D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 2 > :
- where_< mlc::and_list_< mlc::eq_< oln_type_of(E, grid), oln::grid2d >,
- mlc::eq_< oln_deduce_type_of(E, topo, is_random_accessible), mlc::true_ >,
- mlc::neq_< oln_deduce_type_of(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_ >,
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
{
@@ -200,9 +200,9 @@
/// 3D case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 3 > :
- where_< mlc::and_list_< mlc::eq_< oln_type_of(E, grid), oln::grid3d >,
- mlc::eq_< oln_deduce_type_of(E, topo, is_random_accessible), mlc::true_ >,
- mlc::neq_< oln_deduce_type_of(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_ >,
+ mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found >
{
@@ -213,8 +213,8 @@
/// General case.
template <typename E>
struct case_< image_hybrid_hierarchy_wrt_classical, E, 4 > :
- where_< mlc::and_< mlc::eq_< oln_deduce_type_of(E, topo,
is_random_accessible), mlc::true_ >,
- mlc::neq_< oln_deduce_type_of(E, topo, bbox), mlc::not_found >
+ 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 >
{
Index: oln/core/abstract/image/type/integre.hh
===================================================================
--- oln/core/abstract/image/type/integre.hh (revision 712)
+++ oln/core/abstract/image/type/integre.hh (working copy)
@@ -97,9 +97,9 @@
/// Binary case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 5 > :
- where_< mlc::or_list_< mlc::eq_<oln_type_of(E, value), ntg::bin>,
- ntg::eq_<ntg::int_u, 1, oln_type_of(E, value)>,
- ntg::eq_<ntg::int_s, 1, oln_type_of(E, value)> > >
+ where_< mlc::or_list_< mlc::eq_<oln_vtype(E, value), ntg::bin>,
+ ntg::eq_<ntg::int_u, 1, oln_vtype(E, value)>,
+ ntg::eq_<ntg::int_s, 1, oln_vtype(E, value)> > >
{
// Definition of the super class corresponding to this case.
typedef abstract::binary_image<E> ret;
@@ -108,7 +108,7 @@
/// Grey-level case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 6 > :
- where_< mlc_is_a( oln_type_of(E, value), ntg::real_value ) >
+ where_< mlc_is_a( oln_vtype(E, value), ntg::real_value ) >
{
// Definition of the super class corresponding to this case
// (abstract::grey_level_image_ is the conjunction of
@@ -119,7 +119,7 @@
/// Label case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 7 > :
- where_< mlc_is_a( oln_type_of(E, value), ntg::enum_value ) >
+ where_< mlc_is_a( oln_vtype(E, value), ntg::enum_value ) >
{
// Definition of the super class corresponding to this case
// (abstract::label_image_ is the conjunction of
@@ -130,7 +130,7 @@
/// Color case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 8 > :
- where_< mlc_is_a( oln_type_of(E, value), ntg::color_value ) >
+ where_< mlc_is_a( oln_vtype(E, value), ntg::color_value ) >
{
// Definition of the super class corresponding to this case
// (abstract::color_image_ is the conjunction of
Index: oln/core/abstract/image/type/hierarchy.hh
===================================================================
--- oln/core/abstract/image/type/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/type/hierarchy.hh (working copy)
@@ -66,7 +66,7 @@
(a concrete image)
- Default case: If no known value type is returned by `oln_type_of(I, value)',
+ Default case: If no known value type is returned by `oln_vtype(I, value)',
the entry is plugged to abstract::data_image<I>. */
@@ -103,7 +103,7 @@
/// Binary case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 1 > :
- where_< value::is_binary<oln_type_of(E, value)> >
+ where_< value::is_binary<oln_vtype(E, value)> >
{
// Definition of the super class corresponding to this case.
typedef abstract::binary_image<E> ret;
@@ -112,7 +112,7 @@
/// Color case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 2 > :
- where_< value::is_color<oln_type_of(E, value)> >
+ where_< value::is_color<oln_vtype(E, value)> >
{
// Definition of the super class corresponding to this case.
typedef abstract::color_image<E> ret;
@@ -121,7 +121,7 @@
/// Grey-level case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 3 > :
- where_< value::is_grey_level<oln_type_of(E, value)> >
+ where_< value::is_grey_level<oln_vtype(E, value)> >
{
// Definition of the super class corresponding to this case.
typedef abstract::grey_level_image<E> ret;
@@ -130,7 +130,7 @@
/// Label case.
template <typename E>
struct case_< image_hierarchy_wrt_type, E, 4 > :
- where_< value::is_label<oln_type_of(E, value)> >
+ where_< value::is_label<oln_vtype(E, value)> >
{
// Definition of the super class corresponding to this case.
typedef abstract::label_image<E> ret;
Index: oln/core/abstract/image/mutability/hierarchy.hh
===================================================================
--- oln/core/abstract/image/mutability/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/mutability/hierarchy.hh (working copy)
@@ -108,7 +108,7 @@
/// With mutability.
template <typename E>
struct case_< image_hierarchy_wrt_mutability, E, 1 > :
- where_< mlc_is_ok(oln_lvalue(E)) >
+ where_< mlc::is_found_< oln_find_vtype(E, lvalue) > >
{
typedef abstract::mutable_image<E> ret;
};
Index: oln/core/abstract/image/computability/hierarchy.hh
===================================================================
--- oln/core/abstract/image/computability/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/computability/hierarchy.hh (working copy)
@@ -105,14 +105,14 @@
/// With computability.
template <typename E>
struct case_< image_hierarchy_wrt_computability, E, 1 > :
- where_< mlc::eq_< oln_type_of(E, is_computed), mlc::true_ > >
+ where_< mlc::eq_< oln_vtype(E, is_computed), mlc::true_ > >
{
typedef abstract::computed_image<E> ret;
};
template <typename E>
struct case_< image_hierarchy_wrt_computability, E, 2 > :
- where_< mlc::eq_< oln_type_of(E, is_computed), mlc::false_ > >
+ where_< mlc::eq_< oln_vtype(E, is_computed), mlc::false_ > >
{
typedef abstract::plain_image<E> ret;
};
Index: oln/core/abstract/image/dimension/1d.hh
===================================================================
--- oln/core/abstract/image/dimension/1d.hh (revision 712)
+++ oln/core/abstract/image/dimension/1d.hh (working copy)
@@ -67,8 +67,8 @@
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 automatic::set_impl<abstract::image1d, oln_vtype(E, morpher),
E>::impl_at;
+ using automatic::set_impl<abstract::mutable_image1d, oln_vtype(E, morpher),
E>::impl_at;
using image1d<E>::at;
Index: oln/core/abstract/image/dimension/2d.hh
===================================================================
--- oln/core/abstract/image/dimension/2d.hh (revision 712)
+++ oln/core/abstract/image/dimension/2d.hh (working copy)
@@ -67,8 +67,8 @@
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 automatic::set_impl<abstract::image2d, oln_vtype(E, morpher),
E>::impl_at;
+ using automatic::set_impl<abstract::mutable_image2d, oln_vtype(E, morpher),
E>::impl_at;
using image2d<E>::at;
Index: oln/core/abstract/image/dimension/3d.hh
===================================================================
--- oln/core/abstract/image/dimension/3d.hh (revision 712)
+++ oln/core/abstract/image/dimension/3d.hh (working copy)
@@ -72,8 +72,8 @@
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 automatic::set_impl<abstract::image3d, oln_vtype(E, morpher),
E>::impl_at;
+ using automatic::set_impl<abstract::mutable_image3d, oln_vtype(E, morpher),
E>::impl_at;
using image3d<E>::at;
Index: oln/core/abstract/image/dimension/hierarchy.hh
===================================================================
--- oln/core/abstract/image/dimension/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/dimension/hierarchy.hh (working copy)
@@ -62,7 +62,7 @@
(a concrete image)
- Default case: If no known grid type is returned by `oln_type_of(I, grid)',
+ Default case: If no known grid type is returned by `oln_vtype(I, grid)',
the entry is directly plugged to abstract::image<I>. */
// FIXME: Figure above is obsolete because of the introduction of
@@ -97,7 +97,7 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 1 > :
where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid1d >,
- mlc_is_ok(oln_lvalue(E)) > >
+ mlc::is_found_< oln_find_vtype(E, lvalue) > > >
{
typedef abstract::mutable_image1d<E> ret;
};
@@ -114,7 +114,7 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 3 > :
where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid2d >,
- mlc_is_ok(oln_lvalue(E)) > >
+ mlc::is_found_< oln_find_vtype(E, lvalue) > > >
{
typedef abstract::mutable_image2d<E> ret;
};
@@ -131,7 +131,7 @@
template <typename E>
struct case_< image_hierarchy_wrt_dimension, E, 5 > :
where_< mlc::and_< mlc::eq_< oln_grid(E), oln::grid3d >,
- mlc_is_ok(oln_lvalue(E)) > >
+ mlc::is_found_< oln_find_vtype(E, lvalue) > > >
{
typedef abstract::mutable_image3d<E> ret;
};
Index: oln/core/abstract/image/neighborhood/hierarchy.hh
===================================================================
--- oln/core/abstract/image/neighborhood/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/neighborhood/hierarchy.hh (working copy)
@@ -50,7 +50,7 @@
public automatic::get_impl<image_having_neighborhood, E>
{
private:
- typedef oln_type_of(E, neighborhood) neighborhood_t;
+ typedef oln_vtype(E, neighborhood) neighborhood_t;
public:
@@ -106,7 +106,7 @@
/// With neighborhood.
template <typename E>
struct case_< image_hierarchy_wrt_neighborhood, E, 1 > :
- where_< mlc::neq_< oln_type_of(E, neighborhood), mlc::not_found > >
+ where_< mlc::neq_< oln_find_vtype(E, neighborhood), mlc::not_found > >
{
typedef abstract::image_having_neighborhood<E> ret;
};
Index: oln/core/abstract/image/point_wise_accessibility/hierarchy.hh
===================================================================
--- oln/core/abstract/image/point_wise_accessibility/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/point_wise_accessibility/hierarchy.hh (working copy)
@@ -49,7 +49,7 @@
public virtual image<E>,
public automatic::get_impl< image_being_point_wise_random_accessible, E >
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
@@ -98,7 +98,7 @@
/// With point-wise accessibility.
template <typename E>
struct case_< image_hierarchy_wrt_point_wise_accessibility, E, 1 > :
- where_< mlc::eq_< oln_deduce_type_of(E, topo, is_random_accessible), mlc::true_
> >
+ where_< mlc::eq_< oln_deduce_vtype(E, topo, is_random_accessible), mlc::true_
> >
{
typedef abstract::image_being_point_wise_random_accessible<E> ret;
};
Index: oln/core/abstract/image/bbox/hierarchy.hh
===================================================================
--- oln/core/abstract/image/bbox/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/bbox/hierarchy.hh (working copy)
@@ -51,8 +51,8 @@
{
private:
- typedef oln_type_of(E, bbox) bbox_t;
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, bbox) bbox_t;
+ typedef oln_vtype(E, point) point_t;
public:
@@ -135,7 +135,7 @@
/// With bbox.
template <typename E>
struct case_< image_hierarchy_wrt_bbox, E, 1 > :
- where_< mlc::neq_< oln_deduce(E, topo, bbox), mlc::not_found > >
+ where_< mlc::neq_< oln_deduce_vtype(E, topo, bbox), mlc::not_found > >
{
typedef abstract::image_having_bbox<E> ret;
};
@@ -146,7 +146,7 @@
template <typename E>
struct single_vtype< image_entry<E>, typedef_::bbox_type >
{
- typedef oln_deduce(E, topo, bbox) ret;
+ typedef oln_deduce_vtype(E, topo, bbox) ret;
};
} // end of namespace oln
Index: oln/core/abstract/image/value_wise_accessibility/hierarchy.hh
===================================================================
--- oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (revision 712)
+++ oln/core/abstract/image/value_wise_accessibility/hierarchy.hh (working copy)
@@ -52,8 +52,8 @@
public virtual image<E>,
public automatic::get_impl< image_being_value_wise_random_accessible, E >
{
- typedef oln_type_of(E, value) value_t;
- typedef oln_type_of(E, value_proxy) value_proxy_t;
+ typedef oln_vtype(E, value) value_t;
+ typedef oln_vtype(E, value_proxy) value_proxy_t;
public:
/// Get a (read-only) value descriptor from a value.
@@ -75,8 +75,8 @@
public virtual image_being_value_wise_random_accessible<E>,
public automatic::get_impl< mutable_image_being_value_wise_random_accessible, E
>
{
- typedef oln_type_of(E, value) value_t;
- typedef oln_type_of(E, mutable_value_proxy) mutable_value_proxy_t;
+ typedef oln_vtype(E, value) value_t;
+ typedef oln_vtype(E, mutable_value_proxy) mutable_value_proxy_t;
public:
using image_being_value_wise_random_accessible<E>::value;
@@ -133,8 +133,8 @@
/// 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_type_of(E, fwd_viter)),
- mlc_is_ok(oln_type_of(E, mutable_value_proxy)) ) >
+ where_< mlc_and( mlc_is_ok(oln_find_vtype(E, fwd_viter)),
+ mlc_is_ok(oln_find_vtype(E, mutable_value_proxy)) ) >
{
typedef abstract::mutable_image_being_value_wise_random_accessible<E> ret;
};
@@ -142,7 +142,7 @@
/// With (constant) value-wise random accessibility.
template <typename E>
struct case_< image_hierarchy_wrt_value_wise_accessibility, E, 2 > :
- where_< mlc_is_ok(oln_type_of(E, fwd_viter)) >
+ where_< mlc_is_ok(oln_find_vtype(E, fwd_viter)) >
{
typedef abstract::image_being_value_wise_random_accessible<E> ret;
};
Index: oln/core/abstract/grid.hh
===================================================================
--- oln/core/abstract/grid.hh (revision 712)
+++ oln/core/abstract/grid.hh (working copy)
@@ -44,7 +44,7 @@
template <typename E>
struct vtypes< abstract::grid<E> >
{
- typedef mlc::undefined dimvalue_type;
+ typedef stc::abstract dimvalue_type;
};
namespace abstract {
Index: oln/core/abstract/iterator.hh
===================================================================
--- oln/core/abstract/iterator.hh (revision 712)
+++ oln/core/abstract/iterator.hh (working copy)
@@ -35,7 +35,16 @@
namespace oln
{
+ namespace abstract { template <typename E> class iterator; }
+
+ template <typename E>
+ struct set_super_type< abstract::iterator<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
namespace abstract
{
Index: oln/core/abstract/point.hh
===================================================================
--- oln/core/abstract/point.hh (revision 712)
+++ oln/core/abstract/point.hh (working copy)
@@ -55,14 +55,22 @@
namespace abstract { template <typename E> class point; }
+ template <typename E>
+ struct set_super_type< abstract::point<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
/// Virtual types associated to abstract::point<E>.
template <typename E>
struct vtypes< abstract::point<E> >
{
- typedef mlc::undefined grid_type;
- typedef mlc::undefined dpoint_type;
- typedef oln_deduce(E, dpoint, coord) coord_type;
- typedef mlc::undefined dim_type;
+ // 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;
+ typedef stc::abstract dim_type;
typedef oln_dim(E) dim_t;
typedef xtd::vec<mlc_value(dim_t), coord_type> vec_type;
@@ -232,8 +240,8 @@
template <typename P>
bool point<E>::operator==(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_equal(rhs.exact());
}
@@ -248,8 +256,8 @@
template <typename P>
bool point<E>::operator!=(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return not (*this == rhs);
}
@@ -264,8 +272,8 @@
template <typename P>
bool point<E>::operator<(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_less(rhs.exact());
}
@@ -280,8 +288,8 @@
template <typename P>
bool point<E>::operator>(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return rhs < *this;
}
@@ -296,8 +304,8 @@
template <typename P>
bool point<E>::operator>=(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return not (*this < rhs);
}
@@ -312,8 +320,8 @@
template <typename P>
bool point<E>::operator<=(const abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return not (rhs < *this);
}
@@ -328,8 +336,8 @@
template <typename D>
E& point<E>::operator+=(const abstract::dpoint<D>& rhs)
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(D, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(D, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_plus_equal(rhs.exact());
}
@@ -344,8 +352,8 @@
template <typename D>
xtd_op_plus_trait(E,D) point<E>::operator+(const abstract::dpoint<D>&
rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(D, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(D, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_plus(rhs.exact());
}
@@ -360,8 +368,8 @@
template <typename D>
E& point<E>::operator-=(const abstract::dpoint<D>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(D, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(D, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_minus_equal(rhs.exact());
}
@@ -376,8 +384,8 @@
template <typename D>
xtd_op_minus_trait(E, D) point<E>::operator-(const
abstract::dpoint<D>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(D, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(D, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_minus(rhs.exact());
}
@@ -392,8 +400,8 @@
template <typename P>
xtd_op_minus_trait(E, P) point<E>::operator-(const
abstract::point<P>& rhs) const
{
- mlc::assert_equal_< oln_type_of(E, grid),
- oln_type_of(P, grid),
+ mlc::assert_equal_< oln_vtype(E, grid),
+ oln_vtype(P, grid),
oln::ERROR::OPERANDS_ARE_NOT_COMPATIBLE >::check();
return this->exact().impl_minus(rhs.exact());
}
@@ -420,10 +428,10 @@
// template <typename E>
// point<E>::~point()
// {
-// mlc::assert_defined_< oln_type_of(E, grid) >::check();
-// mlc::assert_defined_< oln_type_of(E, dpoint) >::check();
-// mlc::assert_defined_< oln_type_of(E, coord) >::check();
-// mlc::assert_defined_< oln_type_of(E, dim) >::check();
+// mlc::assert_defined_< oln_vtype(E, grid) >::check();
+// mlc::assert_defined_< oln_vtype(E, dpoint) >::check();
+// mlc::assert_defined_< oln_vtype(E, coord) >::check();
+// mlc::assert_defined_< oln_vtype(E, dim) >::check();
// }
# endif
Index: oln/core/abstract/dpoint.hh
===================================================================
--- oln/core/abstract/dpoint.hh (revision 712)
+++ oln/core/abstract/dpoint.hh (working copy)
@@ -50,14 +50,22 @@
namespace abstract { template <typename E> class dpoint; }
+ template <typename E>
+ struct set_super_type< abstract::dpoint<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
/// Virtual types associated to abstract::dpoint<E>.
template <typename E>
struct vtypes< abstract::dpoint<E> >
{
- typedef mlc::undefined grid_type;
- typedef mlc::undefined point_type;
- typedef mlc::undefined coord_type;
- typedef mlc::undefined dim_type;
+ // FIXME: Prefer to use final<deduce..> when possible.
+ typedef stc::abstract grid_type;
+ typedef stc::abstract point_type;
+ typedef stc::abstract coord_type;
+ typedef stc::abstract dim_type;
};
@@ -123,10 +131,10 @@
// template <typename E>
// dpoint<E>::~dpoint() {
-// mlc::assert_defined_< oln_type_of(E, grid) >::check();
-// mlc::assert_defined_< oln_type_of(E, point) >::check();
-// mlc::assert_defined_< oln_type_of(E, coord) >::check();
-// mlc::assert_defined_< oln_type_of(E, dim) >::check();
+// mlc::assert_defined_< oln_vtype(E, grid) >::check();
+// mlc::assert_defined_< oln_vtype(E, point) >::check();
+// mlc::assert_defined_< oln_vtype(E, coord) >::check();
+// mlc::assert_defined_< oln_vtype(E, dim) >::check();
// }
# endif
Index: oln/core/abstract/iterator_on_values.hh
===================================================================
--- oln/core/abstract/iterator_on_values.hh (revision 712)
+++ oln/core/abstract/iterator_on_values.hh (working copy)
@@ -52,7 +52,7 @@
template <typename E>
struct vtypes< abstract::iterator_on_values<E> >
{
- typedef mlc::undefined value_type;
+ typedef stc::abstract value_type;
};
@@ -64,7 +64,7 @@
class iterator_on_values : public abstract::iterator<E>
{
public:
- typedef oln_type_of(E, value) value_type;
+ typedef oln_vtype(E, value) value_type;
value_type to_value() const;
Index: oln/core/abstract/point_set/point_set_being_random_accessible.hh
===================================================================
--- oln/core/abstract/point_set/point_set_being_random_accessible.hh (revision 712)
+++ oln/core/abstract/point_set/point_set_being_random_accessible.hh (working copy)
@@ -43,7 +43,7 @@
template <typename E>
class point_set_being_random_accessible : public virtual point_set<E>
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
@@ -75,7 +75,7 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_accessibility, E, 1 >
- : where_< mlc::eq_< oln_type_of(E, is_random_accessible), mlc::true_ > >
+ : where_< mlc::eq_< oln_vtype(E, is_random_accessible), mlc::true_ > >
{
typedef abstract::point_set_being_random_accessible<E> ret;
};
Index: oln/core/abstract/point_set/point_set_having_known_size.hh
===================================================================
--- oln/core/abstract/point_set/point_set_having_known_size.hh (revision 712)
+++ oln/core/abstract/point_set/point_set_having_known_size.hh (working copy)
@@ -73,7 +73,7 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_known_size, E, 1 >
- : where_< mlc::eq_< oln_type_of(E, has_known_size), mlc::true_ > >
+ : where_< mlc::eq_< oln_vtype(E, has_known_size), mlc::true_ > >
{
typedef abstract::point_set_having_known_size<E> ret;
};
Index: oln/core/abstract/point_set/point_set_being_connected.hh
===================================================================
--- oln/core/abstract/point_set/point_set_being_connected.hh (revision 712)
+++ oln/core/abstract/point_set/point_set_being_connected.hh (working copy)
@@ -166,9 +166,9 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_connectivity, E, 1 >
: where_< mlc::and_list_<
- mlc::neq_< oln_type_of(E, bbox), mlc::none >,
- mlc::eq_< oln_type_of(E, is_connected), mlc::true_ >,
- mlc::eq_< oln_type_of(E, grid), grid1d >
+ mlc::neq_< oln_vtype(E, bbox), mlc::none >,
+ mlc::eq_< oln_vtype(E, is_connected), mlc::true_ >,
+ mlc::eq_< oln_vtype(E, grid), grid1d >
>
{
typedef abstract::point_set_being_1d_connected<E> ret;
@@ -177,9 +177,9 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_connectivity, E, 2 >
: where_< mlc::and_list_<
- mlc::neq_< oln_type_of(E, bbox), mlc::none >,
- mlc::eq_< oln_type_of(E, is_connected), mlc::true_ >,
- mlc::eq_< oln_type_of(E, grid), grid2d >
+ mlc::neq_< oln_vtype(E, bbox), mlc::none >,
+ mlc::eq_< oln_vtype(E, is_connected), mlc::true_ >,
+ mlc::eq_< oln_vtype(E, grid), grid2d >
>
{
typedef abstract::point_set_being_2d_connected<E> ret;
@@ -188,9 +188,9 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_connectivity, E, 3 >
: where_< mlc::and_list_<
- mlc::neq_< oln_type_of(E, bbox), mlc::none >,
- mlc::eq_< oln_type_of(E, is_connected), mlc::true_ >,
- mlc::eq_< oln_type_of(E, grid), grid3d >
+ mlc::neq_< oln_vtype(E, bbox), mlc::none >,
+ mlc::eq_< oln_vtype(E, is_connected), mlc::true_ >,
+ mlc::eq_< oln_vtype(E, grid), grid3d >
>
{
typedef abstract::point_set_being_3d_connected<E> ret;
Index: oln/core/abstract/point_set/point_set_having_bbox.hh
===================================================================
--- oln/core/abstract/point_set/point_set_having_bbox.hh (revision 712)
+++ oln/core/abstract/point_set/point_set_having_bbox.hh (working copy)
@@ -138,7 +138,7 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_bbox, E, 1 >
- : where_< mlc::eq_< oln_type_of(E, bbox), E > >
+ : where_< mlc::eq_< oln_vtype(E, bbox), E > >
{
typedef abstract::bbox<E> ret;
};
@@ -146,7 +146,7 @@
template <typename E>
struct case_ < point_set_hierarchy_wrt_bbox, E, 2 >
- : where_< mlc::neq_< oln_type_of(E, bbox), mlc::none > >
+ : where_< mlc::neq_< oln_vtype(E, bbox), mlc::none > >
{
typedef abstract::point_set_having_bbox<E> ret;
};
Index: oln/core/abstract/window.hh
===================================================================
--- oln/core/abstract/window.hh (revision 712)
+++ oln/core/abstract/window.hh (working copy)
@@ -34,6 +34,16 @@
namespace oln
{
+ namespace abstract { template <typename E> class window; }
+
+
+ template <typename E>
+ struct set_super_type< abstract::window<E> >
+ {
+ typedef mlc::none ret;
+ };
+
+
namespace abstract
{
Index: oln/core/abstract/topology/topology_having_bbox.hh
===================================================================
--- oln/core/abstract/topology/topology_having_bbox.hh (revision 712)
+++ oln/core/abstract/topology/topology_having_bbox.hh (working copy)
@@ -44,7 +44,7 @@
: public virtual topology<E>,
public automatic::get_impl<topology_having_bbox, E>
{
- typedef oln_type_of(E, bbox) bbox_t;
+ typedef oln_vtype(E, bbox) bbox_t;
public:
@@ -66,21 +66,21 @@
# ifndef OLN_INCLUDE_ONLY
template <typename E>
- const oln_type_of(E, bbox)&
+ const oln_vtype(E, bbox)&
topology_having_bbox<E>::bbox() const
{
return this->exact().impl_bbox();
}
template <typename E>
- oln_type_of(E, bbox)&
+ oln_vtype(E, bbox)&
topology_having_bbox<E>::bbox()
{
return this->exact().impl_bbox();
}
template <typename E>
- topology_having_bbox<E>::operator oln_type_of(E, bbox)() const
+ topology_having_bbox<E>::operator oln_vtype(E, bbox)() const
{
return this->bbox();
}
@@ -98,7 +98,7 @@
template <typename E>
struct case_ < topology_hierarchy_wrt_bbox, E, 1 >
- : where_< mlc::neq_< oln_type_of(E, bbox), mlc::none > >
+ : where_< mlc::neq_< oln_vtype(E, bbox), mlc::none > >
{
typedef abstract::topology_having_bbox<E> ret;
};
Index: oln/core/abstract/topology/topology_being_random_accessible.hh
===================================================================
--- oln/core/abstract/topology/topology_being_random_accessible.hh (revision 712)
+++ oln/core/abstract/topology/topology_being_random_accessible.hh (working copy)
@@ -44,7 +44,7 @@
: public virtual topology<E>,
public automatic::get_impl<topology_being_random_accessible, E>
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
@@ -62,13 +62,13 @@
# ifndef OLN_INCLUDE_ONLY
template <typename E>
- bool topology_being_random_accessible<E>::has(const oln_type_of(E, point)&
p) const
+ bool topology_being_random_accessible<E>::has(const oln_vtype(E, point)& p)
const
{
return this->exact().impl_has(p);
}
template <typename E>
- bool topology_being_random_accessible<E>::has_large(const oln_type_of(E,
point)& p) const
+ bool topology_being_random_accessible<E>::has_large(const oln_vtype(E,
point)& p) const
{
return this->exact().impl_has_large(p);
}
@@ -86,7 +86,7 @@
template <typename E>
struct case_ < topology_hierarchy_wrt_accessibility, E, 1 >
- : where_< mlc::eq_< oln_type_of(E, is_random_accessible), mlc::true_ > >
+ : where_< mlc::eq_< oln_vtype(E, is_random_accessible), mlc::true_ > >
{
typedef abstract::topology_being_random_accessible<E> ret;
};
Index: oln/core/abstract/topology/topology_having_subset.hh
===================================================================
--- oln/core/abstract/topology/topology_having_subset.hh (revision 712)
+++ oln/core/abstract/topology/topology_having_subset.hh (working copy)
@@ -44,7 +44,7 @@
: public virtual topology<E>,
public automatic::get_impl<topology_having_subset, E>
{
- typedef oln_type_of(E, subset) subset_t;
+ typedef oln_vtype(E, subset) subset_t;
public:
@@ -60,7 +60,7 @@
# ifndef OLN_INCLUDE_ONLY
template <typename E>
- const oln_type_of(E, subset)&
+ const oln_vtype(E, subset)&
topology_having_subset<E>::subset() const
{
return this->exact().impl_subset();
@@ -78,7 +78,7 @@
template <typename E>
struct case_ < topology_hierarchy_wrt_subset, E, 1 >
- : where_< mlc::neq_< oln_type_of(E, subset), mlc::none > >
+ : where_< mlc::neq_< oln_vtype(E, subset), mlc::none > >
{
typedef abstract::topology_having_subset<E> ret;
};
Index: oln/core/abstract/topology/topology_having_neighborhood.hh
===================================================================
--- oln/core/abstract/topology/topology_having_neighborhood.hh (revision 712)
+++ oln/core/abstract/topology/topology_having_neighborhood.hh (working copy)
@@ -44,7 +44,7 @@
: public virtual topology<E>,
public automatic::get_impl<topology_having_neighborhood, E>
{
- typedef oln_type_of(E, neighborhood) neighborhood_t;
+ typedef oln_vtype(E, neighborhood) neighborhood_t;
public:
@@ -64,14 +64,14 @@
# ifndef OLN_INCLUDE_ONLY
template <typename E>
- const oln_type_of(E, neighborhood)&
+ const oln_vtype(E, neighborhood)&
topology_having_neighborhood<E>::neighborhood() const
{
return this->exact().impl_neighborhood();
}
template <typename E>
- topology_having_neighborhood<E>::operator oln_type_of(E, neighborhood)() const
+ topology_having_neighborhood<E>::operator oln_vtype(E, neighborhood)() const
{
return this->neighborhood();
}
@@ -89,7 +89,7 @@
template <typename E>
struct case_ < topology_hierarchy_wrt_neighborhood, E, 1 >
- : where_< mlc::neq_< oln_type_of(E, neighborhood), mlc::none > >
+ : where_< mlc::neq_< oln_vtype(E, neighborhood), mlc::none > >
{
typedef abstract::topology_having_neighborhood<E> ret;
};
Index: oln/core/abstract/internal/image_impl.hh
===================================================================
--- oln/core/abstract/internal/image_impl.hh (revision 712)
+++ oln/core/abstract/internal/image_impl.hh (working copy)
@@ -75,8 +75,8 @@
(client)
- The D parameter is the delegated type. If there is no
- delegated type (i.e. D = mlc::none), get_image_impl inherits
+ The D parameter is the delegatee type. If there is no
+ delegatee type (i.e. D = mlc::none), get_image_impl inherits
from oln::any_best_speed (trough get_image_impl_helper);
otherwise, get_image_impl is plugged to set_image_impl, a
class than can be specialized by the user.
@@ -91,7 +91,7 @@
// Entry point.
template <typename A, typename E>
struct get_image_impl :
- public get_image_impl_helper <A, oln_type_of(E, delegated), E>
+ public get_image_impl_helper <A, oln_vtype(E, delegatee), E>
{
};
@@ -120,7 +120,7 @@
struct image_impl :
public virtual oln::abstract::any_best_speed<E>
{
- typedef oln_type_of(E, delegated) D;
+ typedef oln_vtype(E, delegatee) D;
D& delegate() { return this->exact().impl_delegate(); }
const D& delegate() const { return this->exact().impl_delegate(); }
};
Index: oln/core/1d/image1d.hh
===================================================================
--- oln/core/1d/image1d.hh (revision 712)
+++ oln/core/1d/image1d.hh (working copy)
@@ -51,7 +51,6 @@
struct vtypes< image1d<T> >
{
typedef topo1d topo_type;
- typedef grid1d grid_type;
typedef point1d point_type;
Index: oln/core/2d/image2d.hh
===================================================================
--- oln/core/2d/image2d.hh (revision 712)
+++ oln/core/2d/image2d.hh (working copy)
@@ -51,7 +51,6 @@
struct vtypes< image2d<T> >
{
typedef topo2d topo_type;
- typedef grid2d grid_type;
typedef point2d point_type;
Index: oln/core/3d/image3d.hh
===================================================================
--- oln/core/3d/image3d.hh (revision 712)
+++ oln/core/3d/image3d.hh (working copy)
@@ -51,7 +51,6 @@
struct vtypes< image3d<T> >
{
typedef topo3d topo_type;
- typedef grid3d grid_type;
typedef point3d point_type;
Index: oln/core/gen/piter_isubset.hh
===================================================================
--- oln/core/gen/piter_isubset.hh (revision 712)
+++ oln/core/gen/piter_isubset.hh (working copy)
@@ -54,10 +54,10 @@
template <typename piter_t, typename isubset_t>
struct vtypes< piter_isubset_<piter_t, isubset_t> >
{
- typedef oln_type_of(piter_t, point) point_type;
- typedef oln_type_of(piter_t, grid) grid_type;
+ typedef oln_vtype(piter_t, point) point_type;
+ typedef oln_vtype(piter_t, grid) grid_type;
- typedef topo_add_isubset<oln_type_of(piter_t, topo), isubset_t> topo_type;
+ typedef topo_add_isubset<oln_vtype(piter_t, topo), isubset_t> topo_type;
};
@@ -69,8 +69,8 @@
typedef piter_isubset_<piter_t, isubset_t> self_t;
typedef abstract::iterator_on_points<self_t> super_t;
- typedef oln_type_of(self_t, topo) topo_t;
- typedef oln_type_of(self_t, point) point_t;
+ typedef oln_vtype(self_t, topo) topo_t;
+ typedef oln_vtype(self_t, point) point_t;
public:
Index: oln/core/gen/topo_add_isubset.hh
===================================================================
--- oln/core/gen/topo_add_isubset.hh (revision 712)
+++ oln/core/gen/topo_add_isubset.hh (working copy)
@@ -63,7 +63,7 @@
: public internal::topology_morpher<topo_t, topo_add_isubset<topo_t,
isubset_t> >
{
typedef topo_add_isubset<topo_t, isubset_t> self_t;
- typedef oln_type_of(self_t, point) point_t;
+ typedef oln_vtype(self_t, point) point_t;
public:
Index: oln/core/gen/bbox.hh
===================================================================
--- oln/core/gen/bbox.hh (revision 712)
+++ oln/core/gen/bbox.hh (working copy)
@@ -62,7 +62,7 @@
typedef bbox_<point_t> bbox_type;
typedef mlc::true_ is_random_accessible_type;
- typedef mlc::true_ has_know_size_type;
+ typedef mlc::true_ has_known_size_type;
typedef mlc::true_ is_connected_type;
};
@@ -80,9 +80,9 @@
private:
typedef point_set_entry<self_type> super_t;
- typedef oln_type_of(point_t, coord) coord_t;
+ typedef oln_vtype(point_t, coord) coord_t;
- typedef oln_type_of(point_t, dim) dim;
+ typedef oln_vtype(point_t, dim) dim;
enum { n = mlc_value(dim) };
public:
Index: oln/core/gen/topo_bbox.hh
===================================================================
--- oln/core/gen/topo_bbox.hh (revision 712)
+++ oln/core/gen/topo_bbox.hh (working copy)
@@ -118,7 +118,7 @@
{
typedef topo_bbox_<point> self_t;
typedef topology_entry<self_t> super_t;
- typedef oln_type_of(self_t, bbox) bbox_t;
+ typedef oln_vtype(self_t, bbox) bbox_t;
public:
Index: oln/core/gen/neighb.hh
===================================================================
--- oln/core/gen/neighb.hh (revision 712)
+++ oln/core/gen/neighb.hh (working copy)
@@ -56,15 +56,17 @@
template <typename dpoint>
struct vtypes< neighb_<dpoint> >
{
- typedef oln_type_of(dpoint, grid) grid_type;
+ typedef oln_vtype(dpoint, grid) grid_type;
};
+ struct FIXME_ERR;
+
/// Abstract forward dpoint iterator class.
template <typename dpoint>
class neighb_ : public neighborhood_entry< neighb_<dpoint> >,
- private mlc::assert_< mlc_is_a(dpoint, abstract::dpoint) >
+ private mlc::assert_< mlc_is_a(dpoint, abstract::dpoint), FIXME_ERR >
{
typedef neighb_<dpoint> self_t;
typedef neighborhood_entry<self_t> super_t;
Index: oln/core/gen/bkd_viter_lut.hh
===================================================================
--- oln/core/gen/bkd_viter_lut.hh (revision 712)
+++ oln/core/gen/bkd_viter_lut.hh (working copy)
@@ -70,11 +70,11 @@
{
typedef bkd_viter_lut<Lut> self_t;
typedef abstract::iterator_on_values<self_t> super_t;
- typedef oln_type_of(self_t, lut_iter) lut_iter_t;
+ typedef oln_vtype(self_t, lut_iter) lut_iter_t;
public:
- typedef oln_type_of(self_t, lut) lut_type;
- typedef oln_type_of(self_t, value) value_type;
+ typedef oln_vtype(self_t, lut) lut_type;
+ typedef oln_vtype(self_t, value) value_type;
public:
/// Construct a backward value iterator from a look-up table (LUT).
Index: oln/core/gen/pset_list.hh
===================================================================
--- oln/core/gen/pset_list.hh (revision 712)
+++ oln/core/gen/pset_list.hh (working copy)
@@ -61,7 +61,7 @@
typedef bkd_piter_on_std_based_pset< std::list<point_t> >
bkd_piter_type;
typedef mlc::false_ is_random_accessible_type;
- typedef mlc::true_ has_know_size_type;
+ typedef mlc::true_ has_known_size_type;
typedef mlc::false_ is_connected_type;
};
Index: oln/core/gen/window.hh
===================================================================
--- oln/core/gen/window.hh (revision 712)
+++ oln/core/gen/window.hh (working copy)
@@ -44,9 +44,16 @@
template <typename dpoint>
+ struct set_super_type< window_<dpoint> >
+ {
+ typedef abstract::window< window_<dpoint> > ret;
+ };
+
+
+ template <typename dpoint>
struct vtypes< window_<dpoint> >
{
- typedef oln_type_of(dpoint, grid) grid_type;
+ typedef oln_vtype(dpoint, grid) grid_type;
};
Index: oln/core/gen/topo_lbbox.hh
===================================================================
--- oln/core/gen/topo_lbbox.hh (revision 712)
+++ oln/core/gen/topo_lbbox.hh (working copy)
@@ -66,7 +66,7 @@
private mlc::assert_< mlc_is_a(point, abstract::point) >
{
typedef topo_lbbox_<point> self_t;
- typedef oln_type_of(self_t, bbox) bbox_t;
+ typedef oln_vtype(self_t, bbox) bbox_t;
public:
@@ -103,7 +103,7 @@
unsigned border)
: bb_(bb), border_(border)
{
- typedef oln_type_of(point, dpoint) dpoint_t;
+ typedef oln_vtype(point, dpoint) dpoint_t;
dpoint_t dp;
dp.set_all(border);
lbb_ = bbox_<point>(bb_.pmin() - dp, bb_.pmax() + dp);
@@ -114,7 +114,7 @@
unsigned border)
: bb_(pmin, pmax), border_(border)
{
- typedef oln_type_of(point, dpoint) dpoint_t;
+ typedef oln_vtype(point, dpoint) dpoint_t;
dpoint_t dp;
dp.set_all(border);
lbb_ = bbox_<point>(bb_.pmin() - dp, bb_.pmax() + dp);
Index: oln/core/gen/pset_vec.hh
===================================================================
--- oln/core/gen/pset_vec.hh (revision 712)
+++ oln/core/gen/pset_vec.hh (working copy)
@@ -61,7 +61,7 @@
typedef bkd_piter_on_std_based_pset< std::vector<point_t> >
bkd_piter_type;
typedef mlc::false_ is_random_accessible_type;
- typedef mlc::true_ has_know_size_type;
+ typedef mlc::true_ has_known_size_type;
typedef mlc::false_ is_connected_type;
};
Index: oln/core/gen/pset_.hh
===================================================================
--- oln/core/gen/pset_.hh (revision 712)
+++ oln/core/gen/pset_.hh (working copy)
@@ -61,7 +61,7 @@
typedef bkd_piter_on_std_based_pset< std::set<point_t> > bkd_piter_type;
typedef mlc::false_ is_random_accessible_type;
- typedef mlc::true_ has_know_size_type;
+ typedef mlc::true_ has_known_size_type;
typedef mlc::false_ is_connected_type;
};
Index: oln/core/gen/fwd_viter_lut.hh
===================================================================
--- oln/core/gen/fwd_viter_lut.hh (revision 712)
+++ oln/core/gen/fwd_viter_lut.hh (working copy)
@@ -70,11 +70,11 @@
{
typedef fwd_viter_lut<Lut> self_t;
typedef abstract::iterator_on_values<self_t> super_t;
- typedef oln_type_of(self_t, lut_iter) lut_iter_t;
+ typedef oln_vtype(self_t, lut_iter) lut_iter_t;
public:
- typedef oln_type_of(self_t, lut) lut_type;
- typedef oln_type_of(self_t, value) value_type;
+ typedef oln_vtype(self_t, lut) lut_type;
+ typedef oln_vtype(self_t, value) value_type;
public:
/// Construct a forward value iterator from a look-up table (LUT).
Index: oln/core/gen/mapimage.hh
===================================================================
--- oln/core/gen/mapimage.hh (revision 712)
+++ oln/core/gen/mapimage.hh (working copy)
@@ -48,7 +48,6 @@
struct vtypes< mapimage<point_t, value_t> >
{
typedef topo_bbox_<point_t> topo_type;
- typedef oln_type_of(point_t, grid) grid_type;
typedef point_t point_type;
@@ -77,7 +76,7 @@
class mapimage : public image_entry< mapimage<point_t, value_t> >
{
typedef mapimage<point_t, value_t> self_t;
- typedef oln_type_of(self_t, topo) topo_t;
+ typedef oln_vtype(self_t, topo) topo_t;
public:
Index: oln/core/gen/topo_add_nbh.hh
===================================================================
--- oln/core/gen/topo_add_nbh.hh (revision 712)
+++ oln/core/gen/topo_add_nbh.hh (working copy)
@@ -54,7 +54,7 @@
struct vtypes< topo_add_nbh<topo, nbh> >
{
typedef nbh neighborhood_type;
- typedef topo delegated_type;
+ typedef topo delegatee_type;
};
Index: oln/core/internal/topology_morpher.hh
===================================================================
--- oln/core/internal/topology_morpher.hh (revision 712)
+++ oln/core/internal/topology_morpher.hh (working copy)
@@ -42,17 +42,23 @@
} // end of namespace oln::internal
+
+ /// Super type.
template <typename Topo, typename E>
- struct set_pseudosuper_type< internal::topology_morpher<Topo, E> >
+ struct set_super_type< internal::topology_morpher<Topo, E> >
{
- typedef Topo ret;
+ typedef topology_entry<E> ret;
};
+
+ /// Vtypes.
template <typename Topo, typename E>
struct vtypes< internal::topology_morpher<Topo, E> >
{
typedef morpher::tag::identity morpher_type;
- typedef Topo delegated_type;
+
+ /// Delegatee type.
+ typedef Topo delegatee_type;
};
Index: oln/core/internal/point_nd.hh
===================================================================
--- oln/core/internal/point_nd.hh (revision 712)
+++ oln/core/internal/point_nd.hh (working copy)
@@ -72,8 +72,8 @@
struct vtypes< internal::point_nd<E> >
{
private:
- typedef oln_dim(E) dim_t;
- typedef oln_coord(E) coord_t;
+ 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;
};
@@ -124,9 +124,7 @@
point_nd(const vec_t& v);
/// Dtor.
- ~point_nd()
- {
- }
+ ~point_nd();
vec_t v_;
};
@@ -221,9 +219,9 @@
v_(v)
{}
-// template <typename E>
-// point_nd<E>::~point_nd()
-// {}
+ template <typename E>
+ point_nd<E>::~point_nd()
+ {}
# endif
@@ -256,10 +254,10 @@
: where_< mlc::and_< mlc_is_a(P, internal::point_nd),
mlc_is_a(D, internal::dpoint_nd) > >
{
- typedef oln_type_of(P, coord) P_coord;
- typedef oln_type_of(D, coord) D_coord;
+ typedef oln_vtype(P, coord) P_coord;
+ typedef oln_vtype(D, coord) D_coord;
typedef xtd_op_plus_trait(P_coord, D_coord) coord;
- typedef oln_type_of(P, dim) dim;
+ typedef oln_vtype(P, dim) dim;
typedef typename point_<mlc_value(dim), coord>::ret ret;
};
@@ -271,10 +269,10 @@
: where_< mlc::and_< mlc_is_a(P, internal::point_nd),
mlc_is_a(D, internal::dpoint_nd) > >
{
- typedef oln_type_of(P, coord) P_coord;
- typedef oln_type_of(D, coord) D_coord;
+ typedef oln_vtype(P, coord) P_coord;
+ typedef oln_vtype(D, coord) D_coord;
typedef xtd_op_minus_trait(P_coord, D_coord) coord;
- typedef oln_type_of(P, dim) dim;
+ typedef oln_vtype(P, dim) dim;
typedef typename point_<mlc_value(dim), coord>::ret ret;
};
@@ -286,10 +284,10 @@
: where_< mlc::and_< mlc_is_a(P1, internal::point_nd),
mlc_is_a(P2, internal::point_nd) > >
{
- typedef oln_type_of(P1, coord) P1_coord;
- typedef oln_type_of(P2, coord) P2_coord;
+ typedef oln_vtype(P1, coord) P1_coord;
+ typedef oln_vtype(P2, coord) P2_coord;
typedef xtd_op_minus_trait(P1_coord, P2_coord) coord;
- typedef oln_type_of(P1, dim) dim;
+ typedef oln_vtype(P1, dim) dim;
typedef typename dpoint_<mlc_value(dim), coord>::ret ret;
};
Index: oln/core/internal/bbox_bkd_piter.hh
===================================================================
--- oln/core/internal/bbox_bkd_piter.hh (revision 712)
+++ oln/core/internal/bbox_bkd_piter.hh (working copy)
@@ -61,7 +61,7 @@
template <typename E>
class bbox_bkd_piter : public abstract::iterator_on_points<E>
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
@@ -95,7 +95,7 @@
# ifndef OLN_INCLUDE_ONLY
template <typename E>
- bbox_bkd_piter<E>::bbox_bkd_piter(const bbox_<oln_type_of(E, point)>&
bb)
+ bbox_bkd_piter<E>::bbox_bkd_piter(const bbox_<oln_vtype(E, point)>&
bb)
: p_(),
bb_(bb)
{
@@ -104,7 +104,7 @@
}
template <typename E>
- const bbox_<oln_type_of(E, point)>&
+ const bbox_<oln_vtype(E, point)>&
bbox_bkd_piter<E>::bbox() const
{
return bb_;
@@ -122,7 +122,7 @@
void
bbox_bkd_piter<E>::impl_next()
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
invariant(implies(p_ != nop_, bb_.has(p_)));
for (int i = point_t::n - 1; i >= 0; --i)
if (p_[i] == bb_.pmin(i))
@@ -153,14 +153,14 @@
}
template <typename E>
- oln_type_of(E, point)
+ oln_vtype(E, point)
bbox_bkd_piter<E>::impl_to_point() const
{
return p_;
}
template <typename E>
- const oln_type_of(E, point)*
+ const oln_vtype(E, point)*
bbox_bkd_piter<E>::impl_point_adr() const
{
return &p_;
Index: oln/core/internal/bbox_fwd_piter.hh
===================================================================
--- oln/core/internal/bbox_fwd_piter.hh (revision 712)
+++ oln/core/internal/bbox_fwd_piter.hh (working copy)
@@ -61,7 +61,7 @@
template <typename E>
class bbox_fwd_piter : public abstract::iterator_on_points<E>
{
- typedef oln_type_of(E, point) point_t;
+ typedef oln_vtype(E, point) point_t;
public:
Index: oln/core/internal/dpoint_nd.hh
===================================================================
--- oln/core/internal/dpoint_nd.hh (revision 712)
+++ oln/core/internal/dpoint_nd.hh (working copy)
@@ -55,8 +55,8 @@
struct vtypes< internal::dpoint_nd<E> >
{
private:
- typedef oln_dim(E) dim_t;
- typedef oln_coord(E) coord_t;
+ 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;
};
@@ -72,7 +72,7 @@
typedef dpoint_nd<E> self_t;
typedef oln_dim(E) dim_t;
typedef oln_coord(E) coord_t;
- typedef xtd::vec< mlc_value(dim_t), coord_t> vec_t;
+ typedef xtd::vec< mlc_value(dim_t), coord_t> vec_t;
public:
Index: oln/morpher/add_isubset.hh
===================================================================
--- oln/morpher/add_isubset.hh (revision 712)
+++ oln/morpher/add_isubset.hh (working copy)
@@ -103,7 +103,7 @@
super_t(image),
topo_(image.topo(), isubset)
{
- // mlc::assert_equal_<oln_type_of(Image, grid), oln_type_of(Isubset,
grid)>::check();
+ // mlc::assert_equal_<oln_vtype(Image, grid), oln_vtype(Isubset,
grid)>::check();
// FIXME: check that Image is without a isubset
}
@@ -144,7 +144,7 @@
operator | (const abstract::image<I>& image,
const abstract::binary_image<S>& isubset)
{
- mlc::assert_equal_<oln_type_of(I, grid), oln_type_of(S, grid)>::check();
+ mlc::assert_equal_<oln_vtype(I, grid), oln_vtype(S, grid)>::check();
// FIXME: check that Image does not have yet a subset
morpher::add_isubset<I, S> tmp(image.exact(), isubset.exact());
return tmp;
Index: oln/morpher/value_cast.hh
===================================================================
--- oln/morpher/value_cast.hh (revision 712)
+++ oln/morpher/value_cast.hh (working copy)
@@ -78,8 +78,8 @@
typedef value_cast<Image, Value> self_t;
typedef internal::image_value_morpher<Image, self_t> super_t;
- typedef oln_type_of(self_t, psite) psite_t;
- typedef oln_type_of(self_t, rvalue) rvalue_t;
+ typedef oln_vtype(self_t, psite) psite_t;
+ typedef oln_vtype(self_t, rvalue) rvalue_t;
public:
Index: oln/morpher/thru_fun.hh
===================================================================
--- oln/morpher/thru_fun.hh (revision 712)
+++ oln/morpher/thru_fun.hh (working copy)
@@ -59,7 +59,7 @@
struct vtypes< morpher::thru_fun<Image, Fun> >
{
private:
- typedef oln_type_of(Image, rvalue) old_value_type;
+ typedef oln_vtype(Image, rvalue) old_value_type;
typedef morpher::thru_fun<Image, Fun> self_t;
public:
typedef mlc::true_ is_computed_type;
Index: oln/morpher/slice.hh
===================================================================
--- oln/morpher/slice.hh (revision 712)
+++ oln/morpher/slice.hh (working copy)
@@ -61,6 +61,7 @@
};
+
/// Virtual types associated to oln::morpher::slice<Image>
/// \{
template <typename Image>
@@ -69,28 +70,24 @@
private:
typedef morpher::slice<Image> self_t;
- typedef oln_deduce_type_of(Image, grid, dimvalue) orig_dimvalue_type;
+ typedef oln_deduce_vtype(Image, grid, dimvalue) orig_dimvalue_type;
typedef mlc::uint_< mlc_value(orig_dimvalue_type) - 1 > dimvalue_type;
- typedef oln_type_of(Image, fwd_piter) orig_fwd_piter;
- typedef oln_type_of(Image, bkd_piter) orig_bkd_piter;
- typedef oln_type_of(Image, fwd_qiter) orig_fwd_qiter;
- typedef oln_type_of(Image, bkd_qiter) orig_bkd_qiter;
+ typedef oln_vtype(Image, fwd_piter) orig_fwd_piter;
+ typedef oln_vtype(Image, bkd_piter) orig_bkd_piter;
+ typedef oln_vtype(Image, fwd_qiter) orig_fwd_qiter;
+ typedef oln_vtype(Image, bkd_qiter) orig_bkd_qiter;
public:
typedef typename
- type_fun::slice_topo< oln_type_of(Image, topo) >::ret topo_type;
+ type_fun::slice_topo< oln_vtype(Image, topo) >::ret topo_type;
- typedef grid_<mlc_value(orig_dimvalue_type) - 1> grid_type;
+ typedef typename point_< mlc_value(dimvalue_type),
+ oln_deduce_vtype(Image, point, coord) >::ret point_type;
+ typedef point_type psite_type;
+ // FIXME: A better (when overriding is involved) is oln_deferred_vtype(self_t,
point).
- // psite_type: see below.
- typedef typename
- point_< mlc_value(dimvalue_type),
- oln_deduce_type_of(Image, point, coord) >::ret
- point_type;
-
- // piter_type: see below.
-
+ typedef oln_is_computed(Image) is_computed_type;
typedef oln_value(Image) value_type;
// rvalue_type: see below.
// lvalue_type: see below.
@@ -104,8 +101,6 @@
typedef oln::morpher::tag::slice morpher_type;
// Final.
- typedef oln_deduce(Image, point, coord) coord_type;
- typedef oln_point(self_t) psite_type;
typedef oln_fwd_piter(Image) piter_type;
typedef oln_rvalue(Image) rvalue_type;
typedef oln_lvalue(Image) lvalue_type;
@@ -127,15 +122,15 @@
{
typedef slice<Image> self_t;
- typedef oln_type_of(self_t, topo) topo_t;
- typedef oln_type_of(self_t, rvalue) rvalue_t;
- typedef oln_type_of(self_t, lvalue) lvalue_t;
- typedef oln_type_of(self_t, point) point_t;
+ typedef oln_vtype(self_t, topo) topo_t;
+ typedef oln_vtype(self_t, rvalue) rvalue_t;
+ typedef oln_vtype(self_t, lvalue) lvalue_t;
+ typedef oln_vtype(self_t, point) point_t;
- typedef oln_type_of(Image, topo) orig_topo_t;
- typedef oln_type_of(Image, point) orig_point_t;
+ typedef oln_vtype(Image, topo) orig_topo_t;
+ typedef oln_vtype(Image, point) orig_point_t;
- typedef oln_deduce_type_of(Image, point, coord) coord_t;
+ typedef oln_deduce_vtype(Image, point, coord) coord_t;
public:
Index: oln/morpher/with_lut.hh
===================================================================
--- oln/morpher/with_lut.hh (revision 712)
+++ oln/morpher/with_lut.hh (working copy)
@@ -60,7 +60,7 @@
struct vtypes< morpher::with_lut<Image, Lut> >
{
private:
- typedef oln_type_of(Image, rvalue) orig_value_type;
+ typedef oln_vtype(Image, rvalue) orig_value_type;
typedef morpher::with_lut<Image, Lut> self_t;
public:
typedef mlc::true_ is_computed_type;
@@ -68,7 +68,6 @@
// Value type.
typedef typename Lut::new_value_type value_type;
typedef value_type rvalue_type;
- typedef mlc::not_ok lvalue_type;
// Look-up table type.
typedef Lut lut_type;
@@ -103,11 +102,11 @@
public:
typedef Lut lut_type;
- typedef oln_type_of(self_t, value) value_type;
- typedef oln_type_of(self_t, rvalue) rvalue_type;
- typedef oln_type_of(self_t, psite) psite_type;
- typedef oln_type_of(self_t, value_proxy) value_proxy_type;
- typedef oln_type_of(self_t, mutable_value_proxy) mutable_value_proxy_type;
+ typedef oln_vtype(self_t, value) value_type;
+ typedef oln_vtype(self_t, rvalue) rvalue_type;
+ typedef oln_vtype(self_t, psite) psite_type;
+ typedef oln_vtype(self_t, value_proxy) value_proxy_type;
+ typedef oln_vtype(self_t, mutable_value_proxy) mutable_value_proxy_type;
public:
with_lut(const Image& image, const Lut& lut);
Index: oln/morpher/thru_mfun.hh
===================================================================
--- oln/morpher/thru_mfun.hh (revision 712)
+++ oln/morpher/thru_mfun.hh (working copy)
@@ -59,7 +59,7 @@
struct vtypes< morpher::thru_mfun<Image, Fun> >
{
private:
- typedef oln_type_of(Image, rvalue) old_value_type;
+ typedef oln_vtype(Image, rvalue) old_value_type;
typedef morpher::thru_mfun<Image, Fun> self_t;
public:
typedef mlc::false_ is_computed_type;
Index: oln/morpher/internal/image_value_morpher.hh
===================================================================
--- oln/morpher/internal/image_value_morpher.hh (revision 712)
+++ oln/morpher/internal/image_value_morpher.hh (working copy)
@@ -48,27 +48,30 @@
} // end of namespace oln::morpher
- /// Create an ``uplink'' from
- /// oln::morpher::internal::image_value_morpher to the morphed \a Image,
- /// so as to get all its virtual types.
+ /// Super type.
template <typename Image, typename Exact>
- struct
- set_pseudosuper_type< morpher::internal::image_value_morpher<Image, Exact>
>
+ struct set_super_type< morpher::internal::image_value_morpher<Image, Exact>
>
{
- typedef Image ret;
+ typedef oln::image_entry<Exact> ret;
};
+ /// Vtypes.
template <typename Image, typename Exact>
struct vtypes< morpher::internal::image_value_morpher<Image, Exact> >
{
// Morpher type.
typedef oln::morpher::tag::identity morpher_type; // FIXME: Wrong!
- typedef mlc::not_found is_computed_type;
- typedef mlc::not_found value_type;
- typedef mlc::not_found lvalue_type;
- typedef mlc::not_found rvalue_type;
+ typedef stc::not_delegated is_computed_type;
+ typedef stc::not_delegated value_type;
+ typedef stc::not_delegated lvalue_type;
+ typedef stc::not_delegated rvalue_type;
+
+ /// Create an ``uplink'' from
+ /// oln::morpher::internal::image_value_morpher to the morphed \a Image,
+ /// so as to get all its virtual types.
+ typedef Image delegatee_type;
};
Index: oln/morpher/internal/image_extension.hh
===================================================================
--- oln/morpher/internal/image_extension.hh (revision 712)
+++ oln/morpher/internal/image_extension.hh (working copy)
@@ -48,22 +48,26 @@
} // end of namespace oln::morpher
- /// Create an ``uplink'' from
- /// oln::morpher::internal::image_extension to the morphed \a Image,
- /// so as to get all its virtual types.
+ /// Super type.
template <typename Image, typename Exact>
- struct
- set_pseudosuper_type< morpher::internal::image_extension<Image, Exact> >
+ struct set_super_type< morpher::internal::image_extension<Image, Exact> >
{
- typedef Image ret;
+ typedef oln::image_entry<Exact> ret;
};
+ /// Vtypes.
template <typename Image, typename Exact>
struct vtypes< morpher::internal::image_extension<Image, Exact> >
{
// Morpher type.
typedef oln::morpher::tag::identity morpher_type;
+
+ /// Delegatee type:
+ /// Create an ``uplink'' from
+ /// oln::morpher::internal::image_extension to the morphed \a Image,
+ /// so as to get all its virtual types.
+ typedef Image delegatee_type;
};
Index: oln/morpher/add_neighborhood.hh
===================================================================
--- oln/morpher/add_neighborhood.hh (revision 712)
+++ oln/morpher/add_neighborhood.hh (working copy)
@@ -58,7 +58,7 @@
struct vtypes< morpher::add_neighborhood<Image, Neighb> >
{
// Topology type.
- typedef topo_add_nbh< oln_type_of(Image, topo), Neighb > topo_type;
+ typedef topo_add_nbh< oln_vtype(Image, topo), Neighb > topo_type;
// Neighborhood type.
typedef Neighb neighborhood_type;
@@ -103,7 +103,7 @@
super_t(image),
topo_(image.topo(), nbh)
{
- mlc::assert_equal_<oln_type_of(Image, grid), oln_type_of(Neighb,
grid)>::check();
+ mlc::assert_equal_<oln_vtype(Image, grid), oln_vtype(Neighb,
grid)>::check();
// FIXME: check that Image is without a nbh
}
@@ -132,7 +132,7 @@
operator + (const abstract::image<I>& image,
const abstract::neighborhood<N>& nbh)
{
- mlc::assert_equal_<oln_type_of(I, grid), oln_type_of(N, grid)>::check();
+ mlc::assert_equal_<oln_vtype(I, grid), oln_vtype(N, grid)>::check();
// FIXME: check that Image is without a nbh
morpher::add_neighborhood<I, N> tmp(image.exact(), nbh.exact());
return tmp;