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_SET_DEFAULTGROUP(x) namespace { typedef __attribute((gccxml(#x))) int libt2n_default; }
26 #define LIBT2N_EXPORT __attribute((gccxml("libt2n-default")))
27 #define LIBT2N_EXPORT_GROUP(group) __attribute((gccxml("libt2n-"#group)))
29 #define LIBT2N_SET_DEFAULTGROUP(x)
31 #define LIBT2N_EXPORT_GROUP(group)
34 class cmd_group_example : public libt2n::command
37 friend class boost::serialization::access;
38 template<class Archive>
39 void serialize(Archive & ar, const unsigned int version)
41 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::command);
46 class testfunc_res : public libt2n::result
51 friend class boost::serialization::access;
52 template<class Archive>
53 void serialize(Archive & ar, const unsigned int version)
55 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::result);
56 ar & BOOST_SERIALIZATION_NVP(res);
63 testfunc_res(const std::string& str)
68 std::string get_data()
75 class testfunc_cmd : public cmd_group_example
80 friend class boost::serialization::access;
81 template<class Archive>
82 void serialize(Archive & ar, const unsigned int version)
84 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(cmd_group_example);
85 ar & BOOST_SERIALIZATION_NVP(param);
92 testfunc_cmd(const std::string& str)
97 libt2n::result* operator()();
101 extended_type_info_test();