c84fcdc74e548dd6a63f8eb3cdafdd3e7571dd45
[libt2n] / example-codegen / other.cpp
1 #include <string>
2 // serialization of string
3 #include <boost/serialization/string.hpp>
4 // serialization of pair
5 #include <boost/serialization/utility.hpp>
6
7 // std::vector
8 #include <vector>
9 #include <boost/serialization/vector.hpp>
10
11 #include "foo.hxx"
12
13 #include "other_common.hxx"
14
15 using namespace std;
16
17 //! test function overload
18 LIBT2N_EXPORT int t3(int i)
19 {
20     return i;
21 }
22
23 //! test pair, multiple arguments and namespace
24 LIBT2N_EXPORT bool t3(int i, float f, const string &s, const pair<int, float> &p)
25 {
26     return (i==p.first) && (f==p.second) && (s=="hello");
27 }
28
29 //! test std::vector
30 LIBT2N_EXPORT bool t3(const std::vector<int> &i)
31 {
32     return (i.size()==1) && (i[0]==10);
33 }
34
35 //! test own type
36 LIBT2N_EXPORT bool t3(const Foo &foo)
37 {
38     return (foo.i==foo.j);
39 }