From: Jens Thiele Date: Tue, 14 Nov 2006 18:03:58 +0000 (+0000) Subject: added LIBT2N_SET_DEFAULTGROUP X-Git-Tag: v0.2~122 X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=commitdiff_plain;h=ec979c575be157f2c9b1b6ca3be1fb816ad671d9 added LIBT2N_SET_DEFAULTGROUP --- diff --git a/examples/TODO b/examples/TODO index d6a808d..6a7aba4 100644 --- a/examples/TODO +++ b/examples/TODO @@ -1 +1,28 @@ - function to command group mapping? + +code generator: +gccxml output: type of function arguments is a bit tricky: + + + + + +=> _1550: + + +=> _1506c: +: + +=> _1506: + + +=> _1505: + diff --git a/examples/minimalistic-client-stub.cpp b/examples/minimalistic-client-stub.cpp index b12b642..d6ec553 100644 --- a/examples/minimalistic-client-stub.cpp +++ b/examples/minimalistic-client-stub.cpp @@ -14,6 +14,7 @@ std::string cmd_group_example_client::testfunc(const std::string& str) testfunc_res* res=dynamic_cast(rc.get_result()); if (!res) + // TODO: another exception and details throw libt2n::t2n_communication_error("result object of wrong type"); return res->get_data(); } diff --git a/examples/minimalistic-server.cpp b/examples/minimalistic-server.cpp index 1b5e3a2..90dbc22 100644 --- a/examples/minimalistic-server.cpp +++ b/examples/minimalistic-server.cpp @@ -12,7 +12,9 @@ using namespace std; -LIBT2N_EXPORT_GROUP(example) string testfunc(const string& str) +LIBT2N_SET_DEFAULTGROUP(example) + +LIBT2N_EXPORT string testfunc(const string& str) { string ret; if (str=="throw") diff --git a/examples/minimalistic-stub.hxx b/examples/minimalistic-stub.hxx index f6e7de1..7516a31 100644 --- a/examples/minimalistic-stub.hxx +++ b/examples/minimalistic-stub.hxx @@ -22,9 +22,11 @@ #include #ifdef __GCCXML__ -#define LIBT2N_EXPORT __attribute((gccxml("libt2n"))) +#define LIBT2N_SET_DEFAULTGROUP(x) namespace { typedef __attribute((gccxml(#x))) int libt2n_default; } +#define LIBT2N_EXPORT __attribute((gccxml("libt2n-default"))) #define LIBT2N_EXPORT_GROUP(group) __attribute((gccxml("libt2n-"#group))) #else +#define LIBT2N_SET_DEFAULTGROUP(x) #define LIBT2N_EXPORT #define LIBT2N_EXPORT_GROUP(group) #endif