URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-10-01 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Fix gray and traits.
* mln/core/internal/image_morpher.hh: Remove debug.
* mln/pw/image.hh: Add value typedef to pw::image.
* mln/trait/images.hh: Fix.
* mln/value/gray.hh: Gray inherits now from Value.
* mln/value/graylevel.hh: Update data_kind typedef.
---
core/internal/image_morpher.hh | 1 -
pw/image.hh | 2 ++
trait/images.hh | 3 +++
value/gray.hh | 11 +++++++++--
value/graylevel.hh | 2 +-
5 files changed, 15 insertions(+), 4 deletions(-)
Index: trunk/milena/mln/trait/images.hh
===================================================================
--- trunk/milena/mln/trait/images.hh (revision 1204)
+++ trunk/milena/mln/trait/images.hh (revision 1205)
@@ -172,6 +172,9 @@
struct vectorial : any { std::string str() const { return
"value::vectorial"; } };
struct structed : any { std::string str() const { return
"value::structed"; } };
struct pointer : any { std::string str() const { return
"value::pointer"; } };
+
+ struct fixme // So FIXME!
+ : any { std::string str() const { return "space::fixme"; } };
};
Index: trunk/milena/mln/pw/image.hh
===================================================================
--- trunk/milena/mln/pw/image.hh (revision 1204)
+++ trunk/milena/mln/pw/image.hh (revision 1205)
@@ -83,6 +83,8 @@
{
typedef trait::category::primary category;
+ typedef trait::value::fixme value;
+
typedef trait::access::browsing access;
typedef trait::space::fixme space;
typedef trait::size::regular size;
Index: trunk/milena/mln/core/internal/image_morpher.hh
===================================================================
--- trunk/milena/mln/core/internal/image_morpher.hh (revision 1204)
+++ trunk/milena/mln/core/internal/image_morpher.hh (revision 1205)
@@ -161,7 +161,6 @@
typename J>
void init_(Subject s, T& target, const Image<J>& model_)
{
- std::cout << "deleg... ";
// FIXME: Precondition.
// FIXME: Properly check that J is an internal::image_morpher_.
const J& model = exact(model_);
Index: trunk/milena/mln/value/graylevel.hh
===================================================================
--- trunk/milena/mln/value/graylevel.hh (revision 1204)
+++ trunk/milena/mln/value/graylevel.hh (revision 1205)
@@ -96,7 +96,7 @@
static const graylevel<n> min() { return 0; }
static const graylevel<n> max() { return card_ - 1; }
static const unsigned nbits = n;
- typedef data_kind kind;
+ typedef trait::kind::data kind;
typedef float sum;
typedef int interop;
};
Index: trunk/milena/mln/value/gray.hh
===================================================================
--- trunk/milena/mln/value/gray.hh (revision 1204)
+++ trunk/milena/mln/value/gray.hh (revision 1205)
@@ -29,6 +29,8 @@
# define MLN_VALUE_GRAY_HH
# include <iostream>
+
+# include <mln/core/concept/value.hh>
# include <mln/value/graylevel.hh>
@@ -45,11 +47,16 @@
/// General gray-level class where n bits is not know at compile-time.
/// This class is used for exchange between gray-level types purpose.
- class gray // FIXME do we need a super class?
- //: public mln::internal::graylevel_value_< gray >
+ class gray : public Value<gray>
{
public:
+ /// Encoding associated type.
+ typedef unsigned long enc;
+
+ /// Equivalent associated type.
+ typedef unsigned long equiv;
+
/// Ctor.
gray();