X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fother.cpp;fp=example-codegen%2Fother.cpp;h=c84fcdc74e548dd6a63f8eb3cdafdd3e7571dd45;hp=0000000000000000000000000000000000000000;hb=a96ab6288873059274d783980f70899e24bb46ce;hpb=6f6d24c02ef3e3a7600432bed1c801a611c3c918 diff --git a/example-codegen/other.cpp b/example-codegen/other.cpp new file mode 100644 index 0000000..c84fcdc --- /dev/null +++ b/example-codegen/other.cpp @@ -0,0 +1,39 @@ +#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); +} + +//! test own type +LIBT2N_EXPORT bool t3(const Foo &foo) +{ + return (foo.i==foo.j); +}