https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Misc clean up in mln::value::.
* mln/value/graylevel.hh, mln/value/graylevel_f.hh,
* mln/value/int_s.hh, mln/value/int_u.hh,
* mln/value/rgb.hh:
Use fully qualified type names to help swig wrap typedefs (later).
* mln/value/int_s8.hh, mln/value/int_s16.hh,
* mln/value/int_u8.hh, mln/value/int_u16.hh:
Typos in comments.
* mln/value/int_s32.hh, mln/value/int_u32.hh: New files.
graylevel.hh | 24 ++++++++++++------------
graylevel_f.hh | 24 ++++++++++++------------
int_s.hh | 16 ++++++++--------
int_s16.hh | 2 +-
int_s32.hh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
int_s8.hh | 2 +-
int_u.hh | 16 ++++++++--------
int_u16.hh | 2 +-
int_u32.hh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
int_u8.hh | 2 +-
rgb.hh | 20 ++++++++++----------
11 files changed, 164 insertions(+), 54 deletions(-)
Index: mln/value/int_s32.hh
--- mln/value/int_s32.hh (revision 0)
+++ mln/value/int_s32.hh (revision 0)
@@ -0,0 +1,55 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_VALUE_INT_S32_HH
+# define MLN_VALUE_INT_S32_HH
+
+/*! \file mln/value/int_s32.hh
+ *
+ * \brief Define the alias value::int_s32.
+ */
+
+# include <mln/value/int_s.hh>
+
+
+namespace mln
+{
+
+ namespace value
+ {
+
+
+ /// Alias for signed 32-bit integers.
+ typedef int_s<32> int_s32;
+
+
+ } // end of namespace mln::value
+
+} // end of namespace mln
+
+
+#endif // ! MLN_VALUE_INT_S32_HH
Index: mln/value/int_s16.hh
--- mln/value/int_s16.hh (revision 2128)
+++ mln/value/int_s16.hh (working copy)
@@ -43,7 +43,7 @@
{
- /// Alias for signed 16 bit integers.
+ /// Alias for signed 16-bit integers.
typedef int_s<16> int_s16;
Index: mln/value/int_u32.hh
--- mln/value/int_u32.hh (revision 0)
+++ mln/value/int_u32.hh (revision 0)
@@ -0,0 +1,55 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_VALUE_INT_U32_HH
+# define MLN_VALUE_INT_U32_HH
+
+/*! \file mln/value/int_u32.hh
+ *
+ * \brief Define the alias value::int_u32.
+ */
+
+# include <mln/value/int_u.hh>
+
+
+namespace mln
+{
+
+ namespace value
+ {
+
+
+ /// Alias for unsigned 32-bit integers.
+ typedef mln::value::int_u<32> int_u32;
+
+
+ } // end of namespace mln::value
+
+} // end of namespace mln
+
+
+#endif // ! MLN_VALUE_INT_U32_HH
Index: mln/value/int_u16.hh
--- mln/value/int_u16.hh (revision 2128)
+++ mln/value/int_u16.hh (working copy)
@@ -43,7 +43,7 @@
{
- /// Alias for unsigned 16 bit integers.
+ /// Alias for unsigned 16-bit integers.
typedef int_u<16> int_u16;
Index: mln/value/graylevel.hh
--- mln/value/graylevel.hh (revision 2128)
+++ mln/value/graylevel.hh (working copy)
@@ -285,17 +285,17 @@
/// Ctors with literals.
/// \{
- graylevel(const literal::black_t&);
- graylevel(const literal::medium_gray_t&);
- graylevel(const literal::white_t&);
+ graylevel(const mln::literal::black_t&);
+ graylevel(const mln::literal::medium_gray_t&);
+ graylevel(const mln::literal::white_t&);
/// \}
/// Assigment with literals.
/// \{
- graylevel<n>& operator=(const literal::black_t&);
- graylevel<n>& operator=(const literal::medium_gray_t&);
- graylevel<n>& operator=(const literal::white_t&);
+ graylevel<n>& operator=(const mln::literal::black_t&);
+ graylevel<n>& operator=(const mln::literal::medium_gray_t&);
+ graylevel<n>& operator=(const mln::literal::white_t&);
/// \}
@@ -496,7 +496,7 @@
template <unsigned n>
inline
- graylevel<n>::graylevel(const literal::black_t&)
+ graylevel<n>::graylevel(const mln::literal::black_t&)
{
this->v_ = 0;
}
@@ -504,7 +504,7 @@
template <unsigned n>
inline
graylevel<n>&
- graylevel<n>::operator=(const literal::black_t&)
+ graylevel<n>::operator=(const mln::literal::black_t&)
{
this->v_ = 0;
return *this;
@@ -512,7 +512,7 @@
template <unsigned n>
inline
- graylevel<n>::graylevel(const literal::medium_gray_t&)
+ graylevel<n>::graylevel(const mln::literal::medium_gray_t&)
{
this->v_ = metal::math::pow_int<2, n - 1>::value;
}
@@ -520,7 +520,7 @@
template <unsigned n>
inline
graylevel<n>&
- graylevel<n>::operator=(const literal::medium_gray_t&)
+ graylevel<n>::operator=(const mln::literal::medium_gray_t&)
{
this->v_ = metal::math::pow_int<2, n - 1>::value;
return *this;
@@ -529,7 +529,7 @@
template <unsigned n>
inline
- graylevel<n>::graylevel(const literal::white_t&)
+ graylevel<n>::graylevel(const mln::literal::white_t&)
{
this->v_ = mln_max(mln_enc(int_u<n>));
}
@@ -537,7 +537,7 @@
template <unsigned n>
inline
graylevel<n>&
- graylevel<n>::operator=(const literal::white_t&)
+ graylevel<n>::operator=(const mln::literal::white_t&)
{
this->v_ = mln_max(mln_enc(int_u<n>));
return *this;
Index: mln/value/graylevel_f.hh
--- mln/value/graylevel_f.hh (revision 2128)
+++ mln/value/graylevel_f.hh (working copy)
@@ -221,16 +221,16 @@
/// Ctors with literals.
/// \{
- graylevel_f(const literal::black_t&);
- graylevel_f(const literal::medium_gray_t&);
- graylevel_f(const literal::white_t&);
+ graylevel_f(const mln::literal::black_t&);
+ graylevel_f(const mln::literal::medium_gray_t&);
+ graylevel_f(const mln::literal::white_t&);
/// \}
/// Assigment with literals.
/// \{
- graylevel_f& operator=(const literal::black_t&);
- graylevel_f& operator=(const literal::medium_gray_t&);
- graylevel_f& operator=(const literal::white_t&);
+ graylevel_f& operator=(const mln::literal::black_t&);
+ graylevel_f& operator=(const mln::literal::medium_gray_t&);
+ graylevel_f& operator=(const mln::literal::white_t&);
/// \}
/// Convertion to graylevel<n>.
@@ -397,42 +397,42 @@
}
inline
- graylevel_f::graylevel_f(const literal::black_t&)
+ graylevel_f::graylevel_f(const mln::literal::black_t&)
{
this->v_ = 0.0f;
}
inline
graylevel_f&
- graylevel_f::operator=(const literal::black_t&)
+ graylevel_f::operator=(const mln::literal::black_t&)
{
this->v_ = 0.0f;
return *this;
}
inline
- graylevel_f::graylevel_f(const literal::medium_gray_t&)
+ graylevel_f::graylevel_f(const mln::literal::medium_gray_t&)
{
this->v_ = 0.5f;
}
inline
graylevel_f&
- graylevel_f::operator=(const literal::medium_gray_t&)
+ graylevel_f::operator=(const mln::literal::medium_gray_t&)
{
this->v_ = 0.5f;
return *this;
}
inline
- graylevel_f::graylevel_f(const literal::white_t&)
+ graylevel_f::graylevel_f(const mln::literal::white_t&)
{
this->v_ = 1.0f;
}
inline
graylevel_f&
- graylevel_f::operator=(const literal::white_t&)
+ graylevel_f::operator=(const mln::literal::white_t&)
{
this->v_ = 1.0f;
return *this;
Index: mln/value/int_s.hh
--- mln/value/int_s.hh (revision 2128)
+++ mln/value/int_s.hh (working copy)
@@ -122,10 +122,10 @@
int_s(int i);
/// \{ Constructors/assignments with literals.
- int_s(const literal::zero_t&);
- int_s& operator=(const literal::zero_t&);
- int_s(const literal::one_t&);
- int_s& operator=(const literal::one_t&);
+ int_s(const mln::literal::zero_t&);
+ int_s& operator=(const mln::literal::zero_t&);
+ int_s(const mln::literal::one_t&);
+ int_s& operator=(const mln::literal::one_t&);
/// \}
/// Conversion to an integer.
@@ -202,7 +202,7 @@
template <unsigned n>
inline
- int_s<n>::int_s(const literal::zero_t&)
+ int_s<n>::int_s(const mln::literal::zero_t&)
{
this->v_ = 0;
}
@@ -210,7 +210,7 @@
template <unsigned n>
inline
int_s<n>&
- int_s<n>::operator=(const literal::zero_t&)
+ int_s<n>::operator=(const mln::literal::zero_t&)
{
this->v_ = 0;
return *this;
@@ -218,7 +218,7 @@
template <unsigned n>
inline
- int_s<n>::int_s(const literal::one_t&)
+ int_s<n>::int_s(const mln::literal::one_t&)
{
this->v_ = 1;
}
@@ -226,7 +226,7 @@
template <unsigned n>
inline
int_s<n>&
- int_s<n>::operator=(const literal::one_t&)
+ int_s<n>::operator=(const mln::literal::one_t&)
{
this->v_ = 1;
return *this;
Index: mln/value/int_u.hh
--- mln/value/int_u.hh (revision 2128)
+++ mln/value/int_u.hh (working copy)
@@ -131,10 +131,10 @@
int_u(int i);
/// \{ Constructors/assignments with literals.
- int_u(const literal::zero_t&);
- int_u& operator=(const literal::zero_t&);
- int_u(const literal::one_t&);
- int_u& operator=(const literal::one_t&);
+ int_u(const mln::literal::zero_t&);
+ int_u& operator=(const mln::literal::zero_t&);
+ int_u(const mln::literal::one_t&);
+ int_u& operator=(const mln::literal::one_t&);
/// \}
/// Conversion to an unsigned integer.
@@ -189,7 +189,7 @@
template <unsigned n>
inline
- int_u<n>::int_u(const literal::zero_t&)
+ int_u<n>::int_u(const mln::literal::zero_t&)
{
this->v_ = 0;
}
@@ -197,7 +197,7 @@
template <unsigned n>
inline
int_u<n>&
- int_u<n>::operator=(const literal::zero_t&)
+ int_u<n>::operator=(const mln::literal::zero_t&)
{
this->v_ = 0;
return *this;
@@ -205,7 +205,7 @@
template <unsigned n>
inline
- int_u<n>::int_u(const literal::one_t&)
+ int_u<n>::int_u(const mln::literal::one_t&)
{
this->v_ = 1;
}
@@ -213,7 +213,7 @@
template <unsigned n>
inline
int_u<n>&
- int_u<n>::operator=(const literal::one_t&)
+ int_u<n>::operator=(const mln::literal::one_t&)
{
this->v_ = 1;
return *this;
Index: mln/value/int_s8.hh
--- mln/value/int_s8.hh (revision 2128)
+++ mln/value/int_s8.hh (working copy)
@@ -43,7 +43,7 @@
{
- /// Alias for signed 8 bit integers.
+ /// Alias for signed 8-bit integers.
typedef int_s<8> int_s8;
Index: mln/value/int_u8.hh
--- mln/value/int_u8.hh (revision 2128)
+++ mln/value/int_u8.hh (working copy)
@@ -43,7 +43,7 @@
{
- /// Alias for unsigned 8 bit integers.
+ /// Alias for unsigned 8-bit integers.
typedef mln::value::int_u<8> int_u8;
Index: mln/value/rgb.hh
--- mln/value/rgb.hh (revision 2128)
+++ mln/value/rgb.hh (working copy)
@@ -194,12 +194,12 @@
operator algebra::vec<3, float>() const { return this->v_; }
/// \{ Constructors with literals.
- rgb<n>(const literal::white_t&);
- rgb<n>(const literal::black_t&);
+ rgb<n>(const mln::literal::white_t&);
+ rgb<n>(const mln::literal::black_t&);
- rgb<n>(const literal::blue_t&);
- rgb<n>(const literal::red_t&);
- rgb<n>(const literal::green_t&);
+ rgb<n>(const mln::literal::blue_t&);
+ rgb<n>(const mln::literal::red_t&);
+ rgb<n>(const mln::literal::green_t&);
/// \}
/// Assignment.
@@ -333,7 +333,7 @@
template <unsigned n>
inline
- rgb<n>::rgb(const literal::white_t&)
+ rgb<n>::rgb(const mln::literal::white_t&)
{
this->v_[0] = mln_max(int_u<n>);
this->v_[1] = mln_max(int_u<n>);
@@ -342,7 +342,7 @@
template <unsigned n>
inline
- rgb<n>::rgb(const literal::black_t&)
+ rgb<n>::rgb(const mln::literal::black_t&)
{
this->v_[0] = 0;
this->v_[1] = 0;
@@ -351,7 +351,7 @@
template <unsigned n>
inline
- rgb<n>::rgb(const literal::red_t&)
+ rgb<n>::rgb(const mln::literal::red_t&)
{
this->v_[0] = mln_max(int_u<n>);
this->v_[1] = 0;
@@ -360,7 +360,7 @@
template <unsigned n>
inline
- rgb<n>::rgb(const literal::green_t&)
+ rgb<n>::rgb(const mln::literal::green_t&)
{
this->v_[0] = 0;
this->v_[1] = mln_max(int_u<n>);
@@ -369,7 +369,7 @@
template <unsigned n>
inline
- rgb<n>::rgb(const literal::blue_t&)
+ rgb<n>::rgb(const mln::literal::blue_t&)
{
this->v_[0] = 0;
this->v_[1] = 0;