3788: De-activate hsl stuff in value rgb.

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@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. fun/c.hh | 3 ++ trait/value_.hh | 7 ++--- value/rgb.hh | 78 ++++++++++++++++++++++++++++---------------------------- 3 files changed, 46 insertions(+), 42 deletions(-) Index: mln/trait/value_.hh --- mln/trait/value_.hh (revision 3787) +++ mln/trait/value_.hh (working copy) @@ -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. Index: mln/value/rgb.hh --- mln/value/rgb.hh (revision 3787) +++ mln/value/rgb.hh (working copy) @@ -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 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 @@ } - // 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 @@ 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 -> rgb16. - template <typename H, typename S, typename L> - void from_to_(const value::hsl_<H,S,L>&, value::rgb<16>& 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); // rgb -> bool. template <unsigned m> @@ -397,8 +397,8 @@ } // 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 @@ 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<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<16>& to) +// { +// to = fun::v2v::f_hsl_to_rgb_3x16(from); +// } template <unsigned m> void Index: mln/fun/c.hh --- mln/fun/c.hh (revision 3787) +++ mln/fun/c.hh (working copy) @@ -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>
participants (1)
-
Thierry Geraud