2 // serialization of string
3 #include <boost/serialization/string.hpp>
4 // serialization of pair
5 #include <boost/serialization/utility.hpp>
9 #include <boost/serialization/vector.hpp>
13 #include "codegen_common.hxx"
15 LIBT2N_SET_DEFAULTGROUP(default);
18 LIBT2N_EXPORT std::string testfunc(std::string str)
22 throw libt2n::t2n_runtime_error("throw me around");
24 ret.insert(0,100*1024,'x');
26 ret=str+", testfunc() was here";
30 //! test pass by const reference
31 LIBT2N_EXPORT std::string testfunc_ref(const std::string &str)
35 throw libt2n::t2n_runtime_error("throw me around");
37 ret.insert(0,100*1024,'x');
39 ret=str+", testfunc() was here";
44 LIBT2N_EXPORT int t2(int i)
51 //! test pair, multiple arguments and namespace
52 LIBT2N_EXPORT_GROUP(other) bool t3(int i, float f, const string &s, const pair<int, float> &p)
54 return (i==p.first) && (f==p.second) && (s=="hello");
57 //! test function overload
58 LIBT2N_EXPORT_GROUP(other) int t3(int i)
64 LIBT2N_EXPORT_GROUP(other) bool t3(const std::vector<int> &i)
66 return (i.size()==1) && (i[0]==10);
69 //! test own type and seperate declaration and definition
70 LIBT2N_EXPORT_GROUP(other) bool t3(const Foo &foo);