
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox ChangeLog: 2009-03-13 Etienne FOLIO <folio@lrde.epita.fr> Add traits in pipo value type. * folio/value/pipo.hh: Add dimension and components types in the pipo type's traits. --- pipo.hh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) Index: trunk/milena/sandbox/folio/value/pipo.hh =================================================================== --- trunk/milena/sandbox/folio/value/pipo.hh (revision 3520) +++ trunk/milena/sandbox/folio/value/pipo.hh (revision 3521) @@ -12,6 +12,26 @@ namespace mln { + + namespace value { class pipo; } + + namespace trait + { + + template <> + struct value_< mln::value::pipo > + { + enum { + dim = 3 + }; + + typedef mln::value::int_s<3> comp_0; + typedef mln::value::float01_<8> comp_1; + typedef mln::value::int_u<7> comp_2; + }; + + } // end of namespace trait + namespace value { class pipo @@ -28,7 +48,6 @@ int_u<7> _c2); pipo& operator=(const pipo& rhs); - }; # ifndef MLN_INCLUDE_ONLY @@ -82,7 +101,7 @@ # endif // ! MLN_INCLUDE_ONLY - } + } // end of namespace value } #endif /* !PIPO_HH_ */