proto-1.0 113: Conform to mlc.

2005-04-05 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr> * oln/core/pw/image.hh: Conform to mlc macros. * oln/core/abstract/image_vectorialness.hh: Likewise. * oln/core/abstract/point.hh: Likewise. * oln/core/abstract/size.hh: Likewise. * oln/basics2d.hh: Likewise. * oln/morpho/reconstruction.hh: Likewise. * oln/morpho/dilation.hh: Likewise. * oln/morpho/stat.hh: Likewise. * oln/morpho/erosion.hh: Likewise. Index: oln/core/pw/image.hh =================================================================== --- oln/core/pw/image.hh (revision 112) +++ oln/core/pw/image.hh (working copy) @@ -243,12 +243,7 @@ template <typename F> bool check(const pw::abstract::function<F>& pred) { - // FIXME: ugly syntax - // FIXME: bool or bin or... - mlc::is_true< - mlc::type::eq< oln_pw_value_type(F), bool >::ret - >::ensure(); - + mlc::eq< oln_pw_value_type(F), bool >::ensure(); return oln::check(for_all_p(pred)); } Index: oln/core/abstract/image_vectorialness.hh =================================================================== --- oln/core/abstract/image_vectorialness.hh (revision 112) +++ oln/core/abstract/image_vectorialness.hh (working copy) @@ -28,12 +28,11 @@ #ifndef OLENA_CORE_ABSTRACT_IMAGE_VECTORIALNESS_HH # define OLENA_CORE_ABSTRACT_IMAGE_VECTORIALNESS_HH -# include <mlc/bool.hh> - +# include <mlc/switch.hh> # include <ntg/basics.hh> - # include <oln/core/abstract/image.hh> + /*! \namespace oln ** \brief oln namespace. */ Index: oln/core/abstract/point.hh =================================================================== --- oln/core/abstract/point.hh (revision 112) +++ oln/core/abstract/point.hh (working copy) @@ -43,7 +43,7 @@ -# define oln_point_type_from_2(P1, P2) mlc_if( mlc_eq( P2, oln::any_point ), P1, P2 ) +# define oln_point_type_from_2(P1, P2) typename mlc::if_< typename mlc::eq< P2, oln::any_point >::ret, P1, P2 >::ret Index: oln/core/abstract/size.hh =================================================================== --- oln/core/abstract/size.hh (revision 112) +++ oln/core/abstract/size.hh (working copy) @@ -39,10 +39,12 @@ } -# define oln_size_type_from_2(S1, S2) mlc_if( mlc_eq( S2, oln::any_size ), S1, S2 ) +# define oln_size_type_from_2(S1, S2) typename mlc::if_< typename mlc::eq< S2, oln::any_size >::ret, S1, S2 >::ret + + namespace oln { namespace abstract { Index: oln/basics2d.hh =================================================================== --- oln/basics2d.hh (revision 112) +++ oln/basics2d.hh (working copy) @@ -31,7 +31,6 @@ # include <oln/basics.hh> - # include <oln/core/2d/size2d.hh> # include <oln/core/2d/point2d.hh> # include <oln/core/2d/image2d.hh> Index: oln/morpho/reconstruction.hh =================================================================== --- oln/morpho/reconstruction.hh (revision 112) +++ oln/morpho/reconstruction.hh (working copy) @@ -31,6 +31,8 @@ # include <queue> # include <mlc/contract.hh> +# include <mlc/cmp.hh> + # include <oln/convert/ng_to_se.hh> # include <oln/morpho/splitse.hh> # include <oln/level/compare.hh> @@ -148,8 +150,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(N, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(N, size)>::ensure(); precondition(this->input1.size() == this->input2.size()); precondition(level::is_greater_or_equal(this->input2, this->input1)); @@ -289,8 +290,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(N, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(N, size)>::ensure(); precondition(this->input1.size() == this->input2.size()); precondition(level::is_greater_or_equal(this->input2, this->input1)); @@ -427,8 +427,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(N, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(N, size)>::ensure(); precondition(this->input1.size() == this->input2.size()); precondition(level::is_greater_or_equal(this->input2, this->input1)); @@ -570,8 +569,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(N, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(N, size)>::ensure(); precondition(this->input1.size() == this->input2.size()); precondition(level::is_greater_or_equal(this->input2, this->input1)); Index: oln/morpho/dilation.hh =================================================================== --- oln/morpho/dilation.hh (revision 112) +++ oln/morpho/dilation.hh (working copy) @@ -33,6 +33,7 @@ # include <oln/core/abstract/image_operator.hh> # include <mlc/cmp.hh> + namespace oln { namespace morpho { @@ -169,8 +170,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(S, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(S, size)>::ensure(); output_type tmp(this->input.size()); // FIXME: trick this->output = tmp; Index: oln/morpho/stat.hh =================================================================== --- oln/morpho/stat.hh (revision 112) +++ oln/morpho/stat.hh (working copy) @@ -30,7 +30,9 @@ # include <oln/basics.hh> # include <ntg/bin.hh> +# include <mlc/cmp.hh> + namespace oln { namespace morpho { @@ -64,8 +66,7 @@ max(const I& input, const oln_type_of(I, point)& p, const E& se) { // FIXME: test dim I == dim - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(E, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(E, size)>::ensure(); oln_type_of(E, fwd_witer) dp(se); dp.start(); @@ -91,8 +92,7 @@ min(const I& input, const oln_type_of(I, point)& p, const E& se) { // FIXME: test dim I == dim E - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(E, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(E, size)>::ensure(); oln_type_of(E, fwd_witer) dp(se); dp.start(); @@ -114,8 +114,7 @@ static ntg::bin max(const I& input, const oln_type_of(I, point)& p, const E& se) { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(E, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(E, size)>::ensure(); oln_type_of(E, fwd_witer) dp(se); for_all (dp) if (input.hold(p + dp)) @@ -127,8 +126,7 @@ static ntg::bin min(const I& input, const oln_type_of(I, point)& p, const E& se) { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(E, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(E, size)>::ensure(); oln_type_of(E, fwd_witer) dp(se); for_all (dp) if (input.hold(p + dp)) Index: oln/morpho/erosion.hh =================================================================== --- oln/morpho/erosion.hh (revision 112) +++ oln/morpho/erosion.hh (working copy) @@ -160,8 +160,7 @@ void impl_run() { - mlc::is_true<mlc::type::eq<oln_type_of(I, size), - oln_type_of(S, size)>::ret>::ensure(); + mlc::eq<oln_type_of(I, size), oln_type_of(S, size)>::ensure(); output_type tmp(this->input.size()); // FIXME: trick this->output = tmp;
participants (1)
-
Thierry GERAUD