#include #include #include #include #include #include "calendar_type.hpp" #include "date.hpp" #include "calendar_util.hpp" //#include "test_enum.hpp" #include "type.hpp" //#include "axis.hpp" //#include "field.hpp" #include "declare_attribute.hpp" #include "attribute_map.hpp" #include "array_new.hpp" #include "attribute_array.hpp" #include "attribute_array_impl.hpp" using namespace std ; using namespace boost::posix_time ; using namespace boost::gregorian ; using namespace xios; using namespace blitz; class CEnum_color { public: enum t_enum { rouge=0, vert, bleu} ; static const char** getStr(void) { static const char * enumStr[] = { "rouge", "vert", "bleu" } ; return enumStr ; } int getSize(void) { return 3 ; } } ; #include "enum.hpp" #include "enum_impl.hpp" #include "enum_ref_impl.hpp" #include "attribute_enum.hpp" #include "attribute_enum_impl.hpp" template class CEnum ; template class CAttributeEnum ; int main(void) { // ptime t(time_from_string("2012-02-30 15:24")) ; // std::cout << to_simple_string(t) << std::endl; CGregorianCalendar MyCalendar("2011-03-01 00:00") ; cout< MyEnum ; //MyEnum.val=CEnum::rouge ; CEnum_color::t_enum y; CType a(10) ; CType b ; a=5 ; b=10.5 ; a=a+b ; cout< c(a); cout< xx("toto") ; // test::totoatt toto ; // test::titiatt titi ; // CAxis A ; // CTest A ; // CAxis B ; // CField A ; // cout< color,color1 ; color=CEnum::rouge ; color1=color ; if (color1==CEnum::rouge) cout<<"Rouge !!"<::bleu ; if (color1==color) cout<<"Rouge !!"< toto("toto",CEnum_color::rouge) ; CAttributeEnum titi("titi",CEnum_color::vert) ; cout< A(2,2) ; CArray B(2,2) ; A=1,2,3,4 ; B = 1 ; B+=A ; cout< C ; CBufferOut out(B.size()) ; B.toBuffer(out) ; CBufferIn in(out.begin,B.size()) ; C.fromBuffer(in) ; cout< attr("toto") ; attr.resize(2,2) ; attr=C ; cout<<"attr "<