olena: olena-2.0-553-ga8d1176 Add references to from_to_ overloads in documentation.

* mln/algebra/h_mat.hh, * mln/algebra/quat.hh, * mln/algebra/vec.hh, * mln/convert/from_to.hh, * mln/convert/impl/from_double_to_value.hh, * mln/convert/impl/from_float_to_value.hh, * mln/convert/impl/from_unsigned_to_value.hh, * mln/core/alias/neighb2d.hh, * mln/core/alias/neighb3d.hh, * mln/core/alias/window1d.hh, * mln/core/alias/window2d.hh, * mln/core/alias/window3d.hh, * mln/core/concept/gpoint.hh, * mln/core/image/#image2d#, * mln/core/image/image1d.hh, * mln/core/image/image2d.hh, * mln/core/image/image3d.hh, * mln/core/mixed_neighb.hh, * mln/core/neighb.hh, * mln/core/w_window.hh, * mln/fun/i2v/array.hh, * mln/histo/array.hh, * mln/util/array.hh, * mln/util/object_id.hh, * mln/value/hsl.hh, * mln/value/int_u.hh, * mln/value/label.hh, * mln/value/qt/rgb32.hh, * mln/value/rgb.hh: Add to from_to_ group. --- milena/ChangeLog | 34 +++++++++++++++++ milena/mln/algebra/h_mat.hh | 9 +++-- milena/mln/algebra/quat.hh | 13 +++++-- milena/mln/algebra/vec.hh | 32 +++++++++++++---- milena/mln/convert/from_to.hh | 40 +++++++++++++++++++- milena/mln/convert/impl/from_double_to_value.hh | 15 ++++++-- milena/mln/convert/impl/from_float_to_value.hh | 20 ++++++++-- milena/mln/convert/impl/from_unsigned_to_value.hh | 14 +++++-- milena/mln/core/alias/neighb2d.hh | 10 ++++- milena/mln/core/alias/neighb3d.hh | 5 ++- milena/mln/core/alias/window1d.hh | 9 +++-- milena/mln/core/alias/window2d.hh | 12 +++++-- milena/mln/core/alias/window3d.hh | 5 ++- milena/mln/core/concept/gpoint.hh | 10 ++++- milena/mln/core/image/#image2d# | 1 + milena/mln/core/image/image1d.hh | 2 +- milena/mln/core/image/image2d.hh | 2 +- milena/mln/core/image/image3d.hh | 2 +- milena/mln/core/mixed_neighb.hh | 12 ++++-- milena/mln/core/neighb.hh | 12 ++++-- milena/mln/core/w_window.hh | 12 ++++-- milena/mln/fun/i2v/array.hh | 17 +++++++-- milena/mln/histo/array.hh | 11 ++++-- milena/mln/util/array.hh | 23 +++++++++--- milena/mln/util/object_id.hh | 5 ++- milena/mln/value/hsl.hh | 40 ++++++++++++-------- milena/mln/value/int_u.hh | 30 ++++++++++++--- milena/mln/value/label.hh | 25 ++++++++++--- milena/mln/value/qt/rgb32.hh | 10 ++++- milena/mln/value/rgb.hh | 20 ++++++++-- 30 files changed, 351 insertions(+), 101 deletions(-) create mode 100644 milena/mln/core/image/#image2d# diff --git a/milena/ChangeLog b/milena/ChangeLog index 6c15ccc..3f29bbc 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,39 @@ 2013-04-19 Guillaume Lazzara <z@lrde.epita.fr> + Add references to from_to_ overloads in documentation. + + * mln/algebra/h_mat.hh, + * mln/algebra/quat.hh, + * mln/algebra/vec.hh, + * mln/convert/from_to.hh, + * mln/convert/impl/from_double_to_value.hh, + * mln/convert/impl/from_float_to_value.hh, + * mln/convert/impl/from_unsigned_to_value.hh, + * mln/core/alias/neighb2d.hh, + * mln/core/alias/neighb3d.hh, + * mln/core/alias/window1d.hh, + * mln/core/alias/window2d.hh, + * mln/core/alias/window3d.hh, + * mln/core/concept/gpoint.hh, + * mln/core/image/#image2d#, + * mln/core/image/image1d.hh, + * mln/core/image/image2d.hh, + * mln/core/image/image3d.hh, + * mln/core/mixed_neighb.hh, + * mln/core/neighb.hh, + * mln/core/w_window.hh, + * mln/fun/i2v/array.hh, + * mln/histo/array.hh, + * mln/util/array.hh, + * mln/util/object_id.hh, + * mln/value/hsl.hh, + * mln/value/int_u.hh, + * mln/value/label.hh, + * mln/value/qt/rgb32.hh, + * mln/value/rgb.hh: Add to from_to_ group. + +2013-04-19 Guillaume Lazzara <z@lrde.epita.fr> + Explain how to iterate over an image in tutorial. * doc/examples/split/tuto3_rw_image-3.cc.raw, diff --git a/milena/mln/algebra/h_mat.hh b/milena/mln/algebra/h_mat.hh index 4a9a61d..115bcf0 100644 --- a/milena/mln/algebra/h_mat.hh +++ b/milena/mln/algebra/h_mat.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -73,7 +73,10 @@ namespace mln }; - /// \internal Conversion: h_mat -> quat + /*! + \brief Conversion: h_mat -> quat + \ingroup fromto + */ template <typename C> void from_to_(const algebra::h_mat<3,C>& from, algebra::quat& to); diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh index 2ba89e4..9e60beb 100644 --- a/milena/mln/algebra/quat.hh +++ b/milena/mln/algebra/quat.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -266,7 +266,10 @@ namespace mln quat slerp_5(const quat& p, const quat& q, float h); - /// \internal Conversion: quaternion -> (angle_degrees, axis). + /*! + \brief Conversion: quaternion -> (angle_degrees, axis). + \ingroup fromto + */ template <typename C> void from_to_(const quat& from, mln::util::couple<C, algebra::vec<3,C> >& to); @@ -276,6 +279,10 @@ namespace mln namespace make { + /*! + \brief Construct a quaternion. + \relates mln::algebra::quat + */ template <typename C> mln::algebra::quat quat(double angle, const mln::algebra::vec<3,C>& axis); diff --git a/milena/mln/algebra/vec.hh b/milena/mln/algebra/vec.hh index 0177254..b02bf24 100644 --- a/milena/mln/algebra/vec.hh +++ b/milena/mln/algebra/vec.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2006, 2008, 2009, 2011, 2012 EPITA Research and +// Copyright (C) 2006, 2008, 2009, 2011, 2012, 2013 EPITA Research and // Development Laboratory (LRDE) // // This file is part of Olena. @@ -272,33 +272,51 @@ namespace mln }; - /// \internal Conversion: vec -> rgb. + /*! + \brief Conversion: vec -> rgb. + \ingroup fromto + */ template <typename T, unsigned m> void from_to_(const vec<3,T>& from, value::rgb<m>& to_); - /// \internal Conversion: vec<1,C1> -> point<G,C2> + /*! + \brief Conversion: vec<1,C1> -> point<G,C2> + \ingroup fromto + */ template <typename C1, typename G, typename C2> inline void from_to_(const vec<1,C1>& from, point<G,C2>& to); - /// \internal Conversion: vec<n,C1> -> point<G,C2> + /*! + \brief Conversion: vec<n,C1> -> point<G,C2> + \ingroup fromto + */ template <unsigned n, typename C1, typename G, typename C2> void from_to_(const vec<n,C1>& from, point<G,C2>& to); - /// \internal Conversion: vec<1,C1> -> point<G,C1> + /*! + \brief Conversion: vec<1,C1> -> point<G,C1> + \ingroup fromto + */ template <typename C1, typename G> inline void from_to_(const vec<1,C1>& from, point<G,C1>& to); - /// \internal Conversion: vec<n,C1> -> point<G,C1> + /*! + \brief Conversion: vec<n,C1> -> point<G,C1> + \ingroup fromto + */ template <unsigned n, typename C1, typename G> void from_to_(const vec<n,C1>& from, point<G,C1>& to); - /// \internal Conversion: vec -> gpoint + /*! + \brief Conversion: vec -> gpoint + \ingroup fromto + */ template <unsigned n, typename T, typename P> void from_to_(const vec<n,T>& from, Gpoint<P>& to); diff --git a/milena/mln/convert/from_to.hh b/milena/mln/convert/from_to.hh index a3ec6d4..32a471d 100644 --- a/milena/mln/convert/from_to.hh +++ b/milena/mln/convert/from_to.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2008, 2009, 2010, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2010, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -58,6 +58,42 @@ namespace mln namespace convert { + /*! \brief Value conversion routine. + + This is a generic function to convert an object towards another + one. + + It relies on predefined conversion functions. Many are defined + by default and listed in \ref from_to_ module. + + This conversion system is extensible. If more conversions are + needed, new ones can be added by implementing an overload of + from_to_(). This overload must be defined in the same namespace + as the first argument. + + Here is an example of a new conversion from value::rgb8 to + value::int_u8. + + \code + namespace value + { + template <unsigned m> + void from_to_(const value::rgb8& from, value::int_u8& to) + { + to = from.red() + from.green() + from.blue(); + } + } + \endcode + + Once this overload declared, one can safely write: + \code + value::rgb8 color(128,155,255); + value::int_8 gl; + convert::from_to(color, gl); + \endcode + + \ingroup convert + */ template <typename F, typename T> void from_to(const F& from, T& to); diff --git a/milena/mln/convert/impl/from_double_to_value.hh b/milena/mln/convert/impl/from_double_to_value.hh index 9b70f8e..1c22860 100644 --- a/milena/mln/convert/impl/from_double_to_value.hh +++ b/milena/mln/convert/impl/from_double_to_value.hh @@ -45,14 +45,23 @@ namespace mln { - /// \internal Conversion: double-> Value + /*! + \brief Conversion: double-> Value + \ingroup fromto + */ template <typename V> void from_to_(const double& from, Value<V>& to); - /// \internal Conversion: double-> unsigned + /*! + \brief Conversion: double-> unsigned + \ingroup fromto + */ void from_to_(const double& from, unsigned& to); - /// \internal Conversion: double-> int + /*! + \brief Conversion: double-> int + \ingroup fromto + */ void from_to_(const double& from, int& to); diff --git a/milena/mln/convert/impl/from_float_to_value.hh b/milena/mln/convert/impl/from_float_to_value.hh index 8d87f38..2b5bb85 100644 --- a/milena/mln/convert/impl/from_float_to_value.hh +++ b/milena/mln/convert/impl/from_float_to_value.hh @@ -45,17 +45,29 @@ namespace mln { - /// \internal Conversion: float-> Value + /*! + \brief Conversion: float-> Value + \ingroup fromto + */ template <typename V> void from_to_(const float& from, Value<V>& to); - /// \internal Conversion: float-> unsigned + /*! + \brief Conversion: float-> unsigned + \ingroup fromto + */ void from_to_(const float& from, unsigned& to); - /// \internal Conversion: float-> int + /*! + \brief Conversion: float-> int + \ingroup fromto + */ void from_to_(const float& from, int& to); - /// \internal Conversion: float-> short + /*! + \brief Conversion: float-> short + \ingroup fromto + */ void from_to_(const float& from, short& to); diff --git a/milena/mln/convert/impl/from_unsigned_to_value.hh b/milena/mln/convert/impl/from_unsigned_to_value.hh index 383f989..4c137f6 100644 --- a/milena/mln/convert/impl/from_unsigned_to_value.hh +++ b/milena/mln/convert/impl/from_unsigned_to_value.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2009, 2010, 2011, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2009, 2010, 2011, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -46,11 +46,17 @@ namespace mln { - /// \internal Conversion: unsigned-> Value + /*! + \brief Conversion: unsigned-> Value + \ingroup fromto + */ template <typename V> void from_to_(const unsigned& from, Value<V>& to); - /// \internal Conversion: unsigned -> bool + /*! + \brief Conversion: unsigned -> bool + \ingroup fromto + */ void from_to_(const unsigned& from, bool& to); diff --git a/milena/mln/core/alias/neighb2d.hh b/milena/mln/core/alias/neighb2d.hh index 31275f2..4283e83 100644 --- a/milena/mln/core/alias/neighb2d.hh +++ b/milena/mln/core/alias/neighb2d.hh @@ -207,11 +207,17 @@ namespace mln neighb< win::multiple<window2d, mln::fun::p2b::chess> > c6_2d(); - /// \internal Conversion: bool[] -> neighb2d + /*! + \brief Conversion: bool[] -> neighb2d + \ingroup fromto + */ template <unsigned S> void from_to_(const bool (&values)[S], neighb2d& nbh); - /// \internal Conversion: bool[][] -> neighb2d + /*! + \brief Conversion: bool[][] -> neighb2d + \ingroup fromto + */ template <unsigned R, unsigned C> void from_to_(bool const (&values)[R][C], neighb2d& nbh); diff --git a/milena/mln/core/alias/neighb3d.hh b/milena/mln/core/alias/neighb3d.hh index e902466..3419323 100644 --- a/milena/mln/core/alias/neighb3d.hh +++ b/milena/mln/core/alias/neighb3d.hh @@ -276,7 +276,10 @@ namespace mln const neighb3d& c26(); - /// \internal Conversion: bool[] -> neighb3d + /*! + \brief Conversion: bool[] -> neighb3d + \ingroup fromto + */ template <unsigned S> void from_to_(const bool (&values)[S], neighb3d& nbh); diff --git a/milena/mln/core/alias/window1d.hh b/milena/mln/core/alias/window1d.hh index d9c312f..a22859a 100644 --- a/milena/mln/core/alias/window1d.hh +++ b/milena/mln/core/alias/window1d.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -93,7 +93,10 @@ namespace mln /// \endcond - /// \internal Conversion: bool[] -> window1d + /*! + \brief Conversion: bool[] -> window1d + \ingroup fromto + */ template <unsigned M> void from_to_(const bool (&values)[M], window1d& win); diff --git a/milena/mln/core/alias/window2d.hh b/milena/mln/core/alias/window2d.hh index 49c8e2a..6c0c3e2 100644 --- a/milena/mln/core/alias/window2d.hh +++ b/milena/mln/core/alias/window2d.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008, 2009, 2010, 2012 EPITA Research and +// Copyright (C) 2007, 2008, 2009, 2010, 2012, 2013 EPITA Research and // Development Laboratory (LRDE) // // This file is part of Olena. @@ -125,11 +125,17 @@ namespace mln const window2d& win_c8p(); - /// \internal Conversion: bool[] -> window2d + /*! + \brief Conversion: bool[] -> window2d + \ingroup fromto + */ template <unsigned S> void from_to_(const bool (&values)[S], window2d& win); - /// \internal Conversion: bool[][] -> window2d + /*! + \brief Conversion: bool[][] -> window2d + \ingroup fromto + */ template <unsigned R, unsigned C> void from_to_(const bool (&values)[R][C], window2d& win); diff --git a/milena/mln/core/alias/window3d.hh b/milena/mln/core/alias/window3d.hh index 81ff2de..c4409c7 100644 --- a/milena/mln/core/alias/window3d.hh +++ b/milena/mln/core/alias/window3d.hh @@ -143,7 +143,10 @@ namespace mln const window3d& win_c8p_3d(); - /// \internal Conversion: bool[] -> window3d + /*! + \brief Conversion: bool[] -> window3d + \ingroup fromto + */ template <unsigned M> void from_to_(bool const (&values)[M], window3d& win); diff --git a/milena/mln/core/concept/gpoint.hh b/milena/mln/core/concept/gpoint.hh index 2c78226..59e17e7 100644 --- a/milena/mln/core/concept/gpoint.hh +++ b/milena/mln/core/concept/gpoint.hh @@ -271,12 +271,18 @@ namespace mln // FIXME : add operators and traits? - /// \internal Conversion: gpoint -> mln_delta + /*! + \brief Conversion: gpoint -> mln_delta + \ingroup fromto + */ template <typename P> void from_to_(const Gpoint<P>& from, mln_delta(P)& to); - /// \internal Conversion: gpoint -> algebra::vec + /*! + \brief Conversion: gpoint -> algebra::vec + \ingroup fromto + */ template <typename P, unsigned n, typename T> void from_to_(const Gpoint<P>& from, algebra::vec<n,T>& to); diff --git a/milena/mln/core/image/#image2d# b/milena/mln/core/image/#image2d# new file mode 100644 index 0000000..501a6bb --- /dev/null +++ b/milena/mln/core/image/#image2d# @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh index aaa1ec2..ce73205 100644 --- a/milena/mln/core/image/image1d.hh +++ b/milena/mln/core/image/image1d.hh @@ -127,7 +127,7 @@ namespace mln /// Basic 1D image class. /// - /// The parameter \c T is the type of pixel values. This image class + /// The parameter \c V is the type of pixel values. This image class /// stores data in memory and has a virtual border with constant /// thickness before and after data. /// diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh index 830057d..490c261 100644 --- a/milena/mln/core/image/image2d.hh +++ b/milena/mln/core/image/image2d.hh @@ -124,7 +124,7 @@ namespace mln /// Basic 2D image class. /// - /// The parameter \c T is the type of pixel values. This image class + /// The parameter \c V is the type of pixel values. This image class /// stores data in memory and has a virtual border with constant /// thickness around data. /// diff --git a/milena/mln/core/image/image3d.hh b/milena/mln/core/image/image3d.hh index d4e14ee..be13c35 100644 --- a/milena/mln/core/image/image3d.hh +++ b/milena/mln/core/image/image3d.hh @@ -123,7 +123,7 @@ namespace mln /// Basic 3D image class. /// - /// The parameter \c T is the type of pixel values. This image class + /// The parameter \c V is the type of pixel values. This image class /// stores data in memory and has a virtual border with constant /// thickness around data. /// diff --git a/milena/mln/core/mixed_neighb.hh b/milena/mln/core/mixed_neighb.hh index e95e0e9..40036d3 100644 --- a/milena/mln/core/mixed_neighb.hh +++ b/milena/mln/core/mixed_neighb.hh @@ -83,17 +83,21 @@ namespace mln }; - /// \cond INTERNAL_API - /// Conversion: mixed_neighb<W> -> W + /*! + \brief Conversion: mixed_neighb<W> -> W + \ingroup fromto + */ template <typename W> void from_to_(const mln::mixed_neighb<W>& from, W& to); - /// Conversion: mixed_neighb<W> -> W + /*! + \brief Conversion: mixed_neighb<W> -> W + \ingroup fromto + */ template <typename W> void from_to_(const W& from, mln::mixed_neighb<W>& to); - /// \endcond // mixed_neighb_fwd_niter<W> diff --git a/milena/mln/core/neighb.hh b/milena/mln/core/neighb.hh index 93e17f2..bfb7055 100644 --- a/milena/mln/core/neighb.hh +++ b/milena/mln/core/neighb.hh @@ -81,17 +81,21 @@ namespace mln }; - /// \cond INTERNAL_API - /// Conversions: neighb<W> -> W + /*! + \brief Conversions: neighb<W> -> W + \ingroup fromto + */ template <typename W> void from_to_(const mln::neighb<W>& from, W& to); - /// Conversions: W -> neighb<W> + /*! + \brief Conversions: W -> neighb<W> + \ingroup fromto + */ template <typename W> void from_to_(const W& from, mln::neighb<W>& to); - /// \endcond // neighb_fwd_niter<W> diff --git a/milena/mln/core/w_window.hh b/milena/mln/core/w_window.hh index fd608e5..1c8a62c 100644 --- a/milena/mln/core/w_window.hh +++ b/milena/mln/core/w_window.hh @@ -141,15 +141,19 @@ namespace mln template <typename D, typename Wl, typename Wr> bool operator==(const w_window<D,Wl>& lhs, const w_window<D,Wr>& rhs); - /// \cond INTERNAL_API - /// Conversions: w_window -> image + /*! + \brief Conversions: w_window -> image + \ingroup fromto + */ template <typename D, typename W, typename I> void from_to_(const w_window<D,W>& from, Image<I>& to); - /// Conversions: weight[] -> w_window + /*! + \brief Conversions: weight[] -> w_window + \ingroup fromto + */ template <typename V, unsigned S, typename D, typename W> void from_to_(const V (&weight)[S], w_window<D,W>& to); - /// \endcond diff --git a/milena/mln/fun/i2v/array.hh b/milena/mln/fun/i2v/array.hh index a0e392a..8f7168f 100644 --- a/milena/mln/fun/i2v/array.hh +++ b/milena/mln/fun/i2v/array.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2009, 2012 EPITA Research and Development +// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -130,7 +130,10 @@ namespace mln const array<T>& a); - /// \internal Conversion: fun::i2v::array -> util::array + /*! + \brief Conversion: fun::i2v::array -> util::array + \ingroup fromto + */ template <typename T1, typename T2> void from_to_(const fun::i2v::array<T1>& from, util::array<T2>& to); @@ -145,13 +148,19 @@ namespace mln namespace std { - /// \internal Conversion: std::vectorfun::i2v::array<T> -> fun::i2v::array<T> + /*! + \brief Conversion: std::vectorfun::i2v::array<T> -> fun::i2v::array<T> + \ingroup fromto + */ template <typename T> inline void from_to_(const vector<T>& from, mln::fun::i2v::array<T>& to); - /// \internal Conversion: std::vector<T> -> mln::fun::i2v::array<U> + /*! + \brief Conversion: std::vector<T> -> mln::fun::i2v::array<U> + \ingroup fromto + */ template <typename T, typename U> inline void diff --git a/milena/mln/histo/array.hh b/milena/mln/histo/array.hh index b60bad3..4abe08c 100644 --- a/milena/mln/histo/array.hh +++ b/milena/mln/histo/array.hh @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development -// Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and +// Development Laboratory (LRDE) // // This file is part of Olena. // @@ -45,7 +45,7 @@ namespace mln { // Forward declaration - template <typename T> struct image1d; + template <typename V> struct image1d; namespace histo { @@ -84,7 +84,10 @@ namespace mln template <typename T> std::ostream& operator<<(std::ostream& ostr, const array<T>& h); - /// \internal Conversion: histo::array -> image1d. + /*! + \brief Conversion: histo::array -> image1d. + \ingroup fromto + */ template <typename V, typename T> void from_to_(const array<V>& from, image1d<T>& to); diff --git a/milena/mln/util/array.hh b/milena/mln/util/array.hh index 3fd987d..4469806 100644 --- a/milena/mln/util/array.hh +++ b/milena/mln/util/array.hh @@ -208,28 +208,39 @@ namespace mln const array<T>& rhs); - /// \cond INTERNAL_API - /// Conversion: array -> array + /*! + \brief Conversion: array -> array + \ingroup fromto + */ template <typename T1, typename T2> void from_to_(const array<T1>& from, array<T2>& to); - /// Conversion: array<T> -> fun::i2v::array<T> + /*! + \brief Conversion: array<T> -> fun::i2v::array<T> + \ingroup fromto + */ template <typename T> inline void from_to_(const array<T>& from, fun::i2v::array<T>& to); - /// Conversion: array<T> -> fun::i2v::array<U> + /*! + \brief Conversion: array<T> -> fun::i2v::array<U> + \ingroup fromto + */ template <typename T, typename U> inline void from_to_(const array<T>& from, fun::i2v::array<U>& to); - ///Conversion: util::array -> image1d. + /*! + \brief Conversion: util::array -> image1d. + \ingroup fromto + */ template <typename V, typename T> void from_to_(const util::array<V>& from, image1d<T>& to); - /// \endcond + // array_fwd_iter<T> diff --git a/milena/mln/util/object_id.hh b/milena/mln/util/object_id.hh index a63bb73..0f50c3b 100644 --- a/milena/mln/util/object_id.hh +++ b/milena/mln/util/object_id.hh @@ -91,7 +91,10 @@ namespace mln bool operator<(const object_id<Tag,V>& lhs, const object_id<Tag,V>& rhs); - /// \internal Conversion: object_id<Tag,V> -> V. + /*! + \brief Conversion: object_id<Tag,V> -> V. + \ingroup fromto + */ template <typename Tag, typename V> void from_to_(const util::object_id<Tag,V>& from, V& to_); diff --git a/milena/mln/value/hsl.hh b/milena/mln/value/hsl.hh index 2cbcbe0..9cef0ba 100644 --- a/milena/mln/value/hsl.hh +++ b/milena/mln/value/hsl.hh @@ -213,54 +213,62 @@ namespace mln /// \param[in] c An rgb. /// /// \return The modified output stream \p ostr. + /// \relates hsl_ template <typename H, typename S, typename L> std::ostream& operator<<(std::ostream& ostr, const hsl_<H,S,L>& c); - /// Addition. - /// { + /*! \brief Addition with HSL. + \relates hsl_ + */ template <typename H, typename S, typename L> hsl_<H,S,L> operator+(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs); - /// \} - /// Subtraction. - /// \{ + /*! \brief Substraction with HSL. + \relates hsl_ + */ template <typename H, typename S, typename L> hsl_<H,S,L> operator-(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs); - /// \} - /// Product. - /// \{ + /*! \brief Product with HSL. + \relates hsl_ + */ template <typename H, typename S, typename L, typename S2> hsl_<H,S,L> operator*(const hsl_<H,S,L>& lhs, const mln::value::scalar_<S2>& s); - /// \} - /// Division. - /// \{ + /*! \brief Division with HSL. + \relates hsl_ + */ template <typename H, typename S, typename L, typename S2> hsl_<H,S,L> operator/(const hsl_<H,S,L>& lhs, const mln::value::scalar_<S2>& s); /// \} - /// Comparison. - /// \{ + /*! \brief Comparison with HSL. + \relates hsl_ + */ template <typename H, typename S, typename L> bool operator==(const hsl_<H,S,L>& lhs, const hsl_<H,S,L>& rhs); - /// \} /// \cond INTERNAL_API // Conversions - /// \internal Conversion: hsl -> qt::rgb32. + /*! + \brief Conversion: hsl -> qt::rgb32. + \ingroup fromto + */ template <typename H, typename S, typename L> void from_to_(const hsl_<H,S,L>& from, qt::rgb32& to); - /// \internal Conversion: hsl -> rgb8. + /*! + \brief Conversion: hsl -> rgb8. + \ingroup fromto + */ template <typename H, typename S, typename L> void from_to_(const value::hsl_<H,S,L>&, value::rgb<8>& to); /// \endcond diff --git a/milena/mln/value/int_u.hh b/milena/mln/value/int_u.hh index 8e1e0ec..cfe2252 100644 --- a/milena/mln/value/int_u.hh +++ b/milena/mln/value/int_u.hh @@ -188,31 +188,49 @@ namespace mln // Conversions - /// \internal Conversion: int_u -> unsigned. + /*! + \brief Conversion: int_u -> unsigned. + \ingroup fromto + */ template <unsigned n> void from_to_(const int_u<n>& from, unsigned& to_); - /// \internal Conversion: int_u -> bool. + /*! + \brief Conversion: int_u -> bool. + \ingroup fromto + */ template <unsigned n> void from_to_(const int_u<n>& from, bool& to_); - /// \internal Conversion: int_u -> float. + /*! + \brief Conversion: int_u -> float. + \ingroup fromto + */ template <unsigned n> void from_to_(const int_u<n>& from, float& to_); - /// \internal Conversion: int_u -> double. + /*! + \brief Conversion: int_u -> double. + \ingroup fromto + */ template <unsigned n> void from_to_(const int_u<n>& from, double& to_); - /// \internal Conversion: Conversion: int_u -> rgb. + /*! + \brief Conversion: Conversion: int_u -> rgb. + \ingroup fromto + */ template <unsigned m> void from_to_(const int_u<m>& from, qt::rgb32& to); - /// \internal Conversion: int_u -> rgb. + /*! + \brief Conversion: int_u -> rgb. + \ingroup fromto + */ template <unsigned m> void from_to_(const int_u<m>& from, rgb<m>& to); diff --git a/milena/mln/value/label.hh b/milena/mln/value/label.hh index b43a927..b928099 100644 --- a/milena/mln/value/label.hh +++ b/milena/mln/value/label.hh @@ -163,24 +163,39 @@ namespace mln std::ostream& operator<<(std::ostream& ostr, const label<n>& l); - /// \internal Conversion: int_u -> label. + /*! + \brief Conversion: int_u -> label. + \ingroup fromto + */ template <unsigned n> void from_to_(const value::int_u<n>& from, value::label<n>& to_); - /// \internal Conversion: label -> int_u. + /*! + \brief Conversion: label -> int_u. + \ingroup fromto + */ template <unsigned n> void from_to_(const value::label<n>& from, value::int_u<n>& to_); - /// \internal Conversion: int_u -> label. + /*! + \brief Conversion: int_u -> label. + \ingroup fromto + */ template <unsigned n, unsigned m> void from_to_(const value::int_u<n>& from, value::label<m>& to_); - /// \internal Conversion: label -> bool. + /*! + \brief Conversion: label -> bool. + \ingroup fromto + */ template <unsigned n> void from_to_(const value::label<n>& from, bool& to_); - /// \internal Conversion: label -> unsigned. + /*! + \brief Conversion: label -> unsigned. + \ingroup fromto + */ template <unsigned n> void from_to_(const value::label<n>& from, unsigned& to_); diff --git a/milena/mln/value/qt/rgb32.hh b/milena/mln/value/qt/rgb32.hh index 96404b8..329d01d 100644 --- a/milena/mln/value/qt/rgb32.hh +++ b/milena/mln/value/qt/rgb32.hh @@ -330,10 +330,16 @@ namespace mln /// \} - /// \internal Conversion: Conversion: #value::qt::rgb32 -> bool. + /*! + \brief Conversion: Conversion: #value::qt::rgb32 -> bool. + \ingroup fromto + */ void from_to_(const rgb32& from, bool& to); - /// \internal Conversion: bool -> #value::qt::rgb32. + /*! + \brief Conversion: bool -> #value::qt::rgb32. + \ingroup fromto + */ void from_to_(const bool& from, value::qt::rgb32& to); } // end of namespace mln::value::qt diff --git a/milena/mln/value/rgb.hh b/milena/mln/value/rgb.hh index b29b479..1a38c18 100644 --- a/milena/mln/value/rgb.hh +++ b/milena/mln/value/rgb.hh @@ -360,19 +360,31 @@ namespace mln namespace value { - /// \internal Conversion: rgb -> bool. + /*! + \brief Conversion: rgb -> bool. + \ingroup fromto + */ template <unsigned m> void from_to_(const value::rgb<m>& from, bool& to); - /// \internal Conversion: rgb to hsl_ + /*! + \brief Conversion: rgb to hsl_ + \ingroup fromto + */ void from_to_(const rgb<16>& from, hsl_<float,float,float>& to); - /// \internal Conversion: rgb to hsl_ + /*! + \brief Conversion: rgb to hsl_ + \ingroup fromto + */ void from_to_(const rgb<8>& from, hsl_<float,float,float>& to); - /// \internal Conversion: bool -> rgb. + /*! + \brief Conversion: bool -> rgb. + \ingroup fromto + */ template <unsigned m> void from_to_(bool from, value::rgb<m>& to); -- 1.7.2.5
participants (1)
-
Guillaume Lazzara