X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fother-1.cpp;fp=example-codegen%2Fother-1.cpp;h=568082d5479fddfd490fc084127276dcfe710d24;hp=0000000000000000000000000000000000000000;hb=c5e54ff222d1174d0c99265f2812cd84fa320986;hpb=0cfa3fb24104428b6e6d8881b1f94fcad825c7ef diff --git a/example-codegen/other-1.cpp b/example-codegen/other-1.cpp new file mode 100644 index 0000000..568082d --- /dev/null +++ b/example-codegen/other-1.cpp @@ -0,0 +1,33 @@ +#include +// serialization of string +#include +// serialization of pair +#include + +// std::vector +#include +#include + +#include "foo.hxx" + +#include "other_common.hxx" + +using namespace std; + +//! test function overload +LIBT2N_EXPORT int t3(int i) +{ + return i; +} + +//! test pair, multiple arguments and namespace +LIBT2N_EXPORT bool t3(int i, float f, const string &s, const pair &p) +{ + return (i==p.first) && (f==p.second) && (s=="hello"); +} + +//! test std::vector +LIBT2N_EXPORT bool t3(const std::vector &i) +{ + return (i.size()==1) && (i[0]==10); +}