https://svn.lrde.epita.fr/svn/oln/trunk/olena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix virtual types definitions in tests/core/image_entry.
* tests/core/image_entry.cc
(oln::vtypes<my::image>::fwd_piter_type)
(oln::vtypes<my::image>::bkd_piter_type): Remove typedefs.
(oln::single_vtype<my::image, typedef_::fwd_piter_type>)
(oln::single_vtype<my::image, typedef_::bkd_piter_type>): New
image_entry.cc | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
Index: tests/core/image_entry.cc
--- tests/core/image_entry.cc (revision 660)
+++ tests/core/image_entry.cc (working copy)
@@ -41,12 +41,14 @@
struct dummy;
}
+
namespace oln
{
// Warning, this sugar might be removed in the future.
stc_set_super(my::image, oln::image_entry<my::image>);
/// Virtual types associated to my::image.
+ /// \{
template<>
struct vtypes<my::image>
{
@@ -63,16 +65,29 @@
// FIXME: Dummy values.
typedef topo2d topo_type;
typedef point2d point_type;
- typedef fwd_piter2d fwd_piter_type;
- typedef bkd_piter2d bkd_piter_type;
typedef my::image concrete_type;
typedef my::dummy morpher_type;
};
-}
+
+ template<>
+ struct single_vtype<my::image, typedef_::fwd_piter_type>
+ {
+ typedef fwd_piter2d ret;
+ };
+
+ template<>
+ struct single_vtype<my::image, typedef_::bkd_piter_type>
+ {
+ typedef bkd_piter2d ret;
+ };
+ ///\}
+
+} // end of namespace oln
+
namespace my
{
- // A very simple 1D image.
+ // A very simple 2D image.
class image : public oln::get_super_types<my::image>::ret
{
public:
@@ -82,7 +97,7 @@
typedef oln_type_of_(self_type, value) value_t;
// FIXME: Add missing typedefs.
};
-}
+} // end of namespace my
int