https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Add a `neighb' trait for images.
* mln/trait/images.hh (mln_trait_image_neighb): New macro.
(mln::trait::undefined_image_::neighb)
(mln::trait::default_image_::neighb)
(mln::trait::default_image_morpher_::neighb):
New typedefs.
* mln/trait/image/props.hh
(mln::trait::image::neighb)
(mln::trait::image::neighb::any)
(mln::trait::image::neighb::none)
(mln::trait::image::neighb::some):
New structs.
image/props.hh | 8 ++++++++
images.hh | 6 ++++++
2 files changed, 14 insertions(+)
Index: mln/trait/images.hh
--- mln/trait/images.hh (revision 1684)
+++ mln/trait/images.hh (working copy)
@@ -60,6 +60,7 @@
# define mln_trait_image_support(I) typename mln::trait::image_< I >::support
# define mln_trait_image_border(I) typename mln::trait::image_< I >::border
+# define mln_trait_image_neighb(I) typename mln::trait::image_< I >::neighb
# define mln_trait_image_data(I) typename mln::trait::image_< I >::data
# define mln_trait_image_io(I) typename mln::trait::image_< I >::io
# define mln_trait_image_speed(I) typename mln::trait::image_< I >::speed
@@ -124,6 +125,7 @@
// global
typedef undef border; // none, { stored, computed } < some
+ typedef undef neighb; // none, some
typedef undef data; // raw < linear < stored, computed
typedef undef io; // read_only < read, write_only < write, read_write
< both read'n write
typedef undef speed; // slow, fast, or fastest
@@ -158,6 +160,9 @@
// speed is fast by default (neither "fastest" nor "slow")
typedef trait::image::speed::fast speed;
+
+ // neighb is absent by default.
+ typedef trait::image::neighb::none neighb;
};
@@ -177,6 +182,7 @@
// mostly global-related => delegation
typedef typename image_<D>::border border;
+ typedef typename image_<D>::neighb neighb;
typedef typename image_<D>::data data;
typedef typename image_<D>::io io;
};
Index: mln/trait/image/props.hh
--- mln/trait/image/props.hh (revision 1684)
+++ mln/trait/image/props.hh (working copy)
@@ -69,6 +69,7 @@
// // global
// typedef undef border; // none, { stored, computed } < some
+ // typedef undef neighb; // none, some
// typedef undef data; // raw < linear < stored, computed
// typedef undef io; // read_only < read, write_only < write,
read_write < both read'n write
// typedef undef speed; // slow, fast, or fastest
@@ -172,6 +173,13 @@
struct computed : some { std::string name() const { return "border::computed";
} };
};
+ struct neighb
+ {
+ struct any {};
+ struct none : any { std::string name() const { return "neighb::none"; }
};
+ struct some : any { std::string name() const { return "neighb::some"; }
};
+ };
+
struct io
{
struct any {};