Add traits so that dump images of unspecified types can be load and save.
* milena/mln/trait/value/kind.hh,
* milena/mln/trait/value_.hh: Add "unknown" name for default types.
---
milena/ChangeLog | 7 +++++++
milena/mln/trait/value/kind.hh | 2 +-
milena/mln/trait/value_.hh | 8 ++++++++
3 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 9065378..0fafe4a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,4 +1,11 @@
2011-03-02 edwin carlinet <carlinet(a)lrde.epita.fr>
+
+Add traits so that dump images of unspecified types can be load and save.
+
+ * milena/mln/trait/value/kind.hh,
+ * milena/mln/trait/value_.hh: Add "unknown" name for default types.
+
+2011-03-02 edwin carlinet <carlinet(a)lrde.epita.fr>
Minor updates to make things compile.
* milena/mln/core/alias/dpoint2d.hh: add typedef dpoint2df.
diff --git a/milena/mln/trait/value/kind.hh b/milena/mln/trait/value/kind.hh
index a92e631..5f75ab6 100644
--- a/milena/mln/trait/value/kind.hh
+++ b/milena/mln/trait/value/kind.hh
@@ -58,7 +58,7 @@ namespace mln
// FIXME: Why not?
// label logic
// \ / \
- // \ nary_logic \
+ // \ nary_logic g \
// \ / \ \
// binary ternary fuzzy
*/
diff --git a/milena/mln/trait/value_.hh b/milena/mln/trait/value_.hh
index 404b204..b33d216 100644
--- a/milena/mln/trait/value_.hh
+++ b/milena/mln/trait/value_.hh
@@ -137,6 +137,14 @@ namespace mln
* typedef ? comp_1;
* ...
*/
+
+ // FIXME: hack to allow dumping/loading non-native type.
+ static const char* name()
+ {
+ static std::string s = std::string("unknown");
+ return s.c_str();
+ }
+
};
--
1.5.6.5