* mln/value/rgb.hh: De-activate hsl stuff.
It shall be moved elsewhere.
* mln/trait/value_.hh (mln_dim): New macro.
Layout; sort short macros by name.
* mln/fun/c.hh (todo): New.
---
milena/ChangeLog | 10 ++++++
milena/mln/fun/c.hh | 3 ++
milena/mln/trait/value_.hh | 7 ++--
milena/mln/value/rgb.hh | 78 ++++++++++++++++++++++----------------------
4 files changed, 56 insertions(+), 42 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 44d34d3..b26865f 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-12 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ De-activate hsl stuff in value rgb.
+
+ * mln/value/rgb.hh: De-activate hsl stuff.
+ It shall be moved elsewhere.
+ * mln/trait/value_.hh (mln_dim): New macro.
+ Layout; sort short macros by name.
+ * mln/fun/c.hh (todo): New.
+
2009-05-11 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fix full2image() domain for cropped images.
diff --git a/milena/mln/fun/c.hh b/milena/mln/fun/c.hh
index 400c781..bd07d0e 100644
--- a/milena/mln/fun/c.hh
+++ b/milena/mln/fun/c.hh
@@ -33,6 +33,9 @@
///
/// Encapsulate a plain (C language-like) pointer to function
/// into a functor.
+///
+/// \todo Fix category: super is not defined!
+/// See mln/value/builtin/integers.hh for an example.
# include <mln/fun/internal/selector.hh>
# include <mln/metal/unqualif.hh>
diff --git a/milena/mln/trait/value_.hh b/milena/mln/trait/value_.hh
index d445bdf..571f8b7 100644
--- a/milena/mln/trait/value_.hh
+++ b/milena/mln/trait/value_.hh
@@ -53,11 +53,12 @@
# define mln_trait_value_quant_(V) mln::trait::value_< V >::quant
-# define mln_nbits(V) mln::trait::value_< V >::nbits
# define mln_card(V) mln::trait::value_< V >::card
-# define mln_min(V) mln::trait::value_< V >::min()
-# define mln_max(V) mln::trait::value_< V >::max()
+# define mln_dim(V) mln::trait::value_< V >::dim
# define mln_epsilon(V) mln::trait::value_< V >::epsilon()
+# define mln_max(V) mln::trait::value_< V >::max()
+# define mln_min(V) mln::trait::value_< V >::min()
+# define mln_nbits(V) mln::trait::value_< V >::nbits
/// Give the summation type for values of type \c T.
diff --git a/milena/mln/value/rgb.hh b/milena/mln/value/rgb.hh
index 54e6b76..c8ff8d9 100644
--- a/milena/mln/value/rgb.hh
+++ b/milena/mln/value/rgb.hh
@@ -42,7 +42,7 @@
# include <mln/value/ops.hh>
-# include <mln/fun/v2v/hsl_to_rgb.hh>
+// # include <mln/fun/v2v/hsl_to_rgb.hh>
# include <mln/value/concept/vectorial.hh>
# include <mln/value/int_u.hh>
# include <mln/algebra/vec.hh>
@@ -55,24 +55,24 @@ namespace mln
- namespace fun
- {
+// namespace fun
+// {
- namespace v2v
- {
+// namespace v2v
+// {
- template <typename T_rgb>
- struct f_hsl_to_rgb_;
+// template <typename T_rgb>
+// struct f_hsl_to_rgb_;
- typedef f_hsl_to_rgb_< value::rgb<8> > f_hsl_to_rgb_3x8_t;
- typedef f_hsl_to_rgb_< value::rgb<16> > f_hsl_to_rgb_3x16_t;
+// typedef f_hsl_to_rgb_< value::rgb<8> > f_hsl_to_rgb_3x8_t;
+// typedef f_hsl_to_rgb_< value::rgb<16> > f_hsl_to_rgb_3x16_t;
- extern f_hsl_to_rgb_3x8_t f_hsl_to_rgb_3x8;
- extern f_hsl_to_rgb_3x16_t f_hsl_to_rgb_3x16;
+// extern f_hsl_to_rgb_3x8_t f_hsl_to_rgb_3x8;
+// extern f_hsl_to_rgb_3x16_t f_hsl_to_rgb_3x16;
- }
+// }
- }
+// }
namespace literal
@@ -103,11 +103,11 @@ namespace mln
}
- // Forward declaration.
- namespace value
- {
- template <typename H, typename S, typename L> class hsl_;
- }
+// // Forward declaration.
+// namespace value
+// {
+// template <typename H, typename S, typename L> class hsl_;
+// }
namespace convert
@@ -128,13 +128,13 @@ namespace mln
template <unsigned m>
void from_to_(const value::int_u<m>& from, value::rgb<m>& to);
- // hsl -> rgb8.
- template <typename H, typename S, typename L>
- void from_to_(const value::hsl_<H,S,L>&, value::rgb<8>& to);
+// // hsl -> rgb8.
+// template <typename H, typename S, typename L>
+// void from_to_(const value::hsl_<H,S,L>&, value::rgb<8>&
to);
- // hsl -> rgb16.
- template <typename H, typename S, typename L>
- void from_to_(const value::hsl_<H,S,L>&, value::rgb<16>& to);
+// // hsl -> rgb16.
+// template <typename H, typename S, typename L>
+// void from_to_(const value::hsl_<H,S,L>&, value::rgb<16>&
to);
// rgb -> bool.
template <unsigned m>
@@ -397,8 +397,8 @@ namespace mln
} // end of namespace mln
-// Needed by from_to_.
-# include <mln/fun/v2v/rgb_to_hsl.hh>
+// // Needed by from_to_.
+// # include <mln/fun/v2v/rgb_to_hsl.hh>
# ifndef MLN_INCLUDE_ONLY
@@ -787,19 +787,19 @@ namespace mln
to = value::rgb<m>(from, from, from);
}
- template <typename H, typename S, typename L>
- void
- from_to_(const value::hsl_<H,S,L>& from, value::rgb<8>& to)
- {
- to = fun::v2v::f_hsl_to_rgb_3x8(from);
- }
-
- template <typename H, typename S, typename L>
- void
- from_to_(const value::hsl_<H,S,L>& from, value::rgb<16>& to)
- {
- to = fun::v2v::f_hsl_to_rgb_3x16(from);
- }
+// template <typename H, typename S, typename L>
+// void
+// from_to_(const value::hsl_<H,S,L>& from, value::rgb<8>& to)
+// {
+// to = fun::v2v::f_hsl_to_rgb_3x8(from);
+// }
+
+// template <typename H, typename S, typename L>
+// void
+// from_to_(const value::hsl_<H,S,L>& from, value::rgb<16>&
to)
+// {
+// to = fun::v2v::f_hsl_to_rgb_3x16(from);
+// }
template <unsigned m>
void
--
1.6.1.2