1 #ifndef MINIMALISTIC_STUB_HXX
2 #define MINIMALISTIC_STUB_HXX
7 header is used by the client library and the server
10 // todo: why do we have to include the boost headers first?
11 // do we have to know which archive format we will use?
13 #include <boost/archive/binary_oarchive.hpp>
14 #include <boost/archive/binary_iarchive.hpp>
15 #include <boost/archive/xml_oarchive.hpp>
16 #include <boost/archive/xml_iarchive.hpp>
17 #include <boost/serialization/serialization.hpp>
18 #include <boost/serialization/string.hpp>
21 #include <t2n_exception.hxx>
22 #include <command.hxx>
25 #define LIBT2N_EXPORT __attribute((gccxml("libt2n")))
26 #define LIBT2N_EXPORT_GROUP(group) __attribute((gccxml("libt2n-"#group)))
29 #define LIBT2N_EXPORT_GROUP(group)
32 class cmd_group_example : public libt2n::command
35 friend class boost::serialization::access;
36 template<class Archive>
37 void serialize(Archive & ar, const unsigned int version)
39 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::command);
44 class testfunc_res : public libt2n::result
49 friend class boost::serialization::access;
50 template<class Archive>
51 void serialize(Archive & ar, const unsigned int version)
53 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::result);
54 ar & BOOST_SERIALIZATION_NVP(res);
61 testfunc_res(const std::string& str)
66 std::string get_data()
73 class testfunc_cmd : public cmd_group_example
78 friend class boost::serialization::access;
79 template<class Archive>
80 void serialize(Archive & ar, const unsigned int version)
82 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(cmd_group_example);
83 ar & BOOST_SERIALIZATION_NVP(param);
90 testfunc_cmd(const std::string& str)
95 libt2n::result* operator()();
99 extended_type_info_test();