From: Gerd v. Egidy Date: Wed, 27 Aug 2008 13:58:48 +0000 (+0000) Subject: libt2n: (gerd) adapt codegen to new command_client interface, fix codegen-examples X-Git-Tag: v0.4~8 X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=commitdiff_plain;h=f6d1a1e3b9d04b63158288ebf2917d9fd47afff8 libt2n: (gerd) adapt codegen to new command_client interface, fix codegen-examples --- diff --git a/codegen/main.cpp b/codegen/main.cpp index 7df215a..2e377ec 100644 --- a/codegen/main.cpp +++ b/codegen/main.cpp @@ -492,7 +492,7 @@ void output_client_hpp(std::ostream &o, const std::string &group, const std::lis o << "class " << groupClass(group) << "_client : public libt2n::command_client\n" << "{\n" << "public:\n" - << groupClass(group) << "_client(libt2n::client_connection &_c,\n" + << groupClass(group) << "_client(libt2n::client_connection *_c,\n" << " long long _command_timeout_usec=command_timeout_usec_default,\n" << " long long _hello_timeout_usec=hello_timeout_usec_default)\n" << " : libt2n::command_client(_c,_command_timeout_usec,_hello_timeout_usec)\n" diff --git a/examples-codegen/example1-client/client.cpp b/examples-codegen/example1-client/client.cpp index d0a5ebe..cc71bb0 100644 --- a/examples-codegen/example1-client/client.cpp +++ b/examples-codegen/example1-client/client.cpp @@ -10,7 +10,7 @@ int main(int argc, char** argv) // if you want to connect to a tcp/ip server you pass the port and server name to the constructor libt2n::socket_client_connection sc("./socket"); // this generated class has a method for each of our exported procedures - cmd_group_t2nexample_client cc(sc); + cmd_group_t2nexample_client cc(&sc); bool throwok=false; diff --git a/examples-codegen/example1/server.cpp b/examples-codegen/example1/server.cpp index 528eabc..e636173 100644 --- a/examples-codegen/example1/server.cpp +++ b/examples-codegen/example1/server.cpp @@ -1,3 +1,5 @@ +#include + #include #include // for group_command_server diff --git a/examples-codegen/example2-client/client.cpp b/examples-codegen/example2-client/client.cpp index bba7e07..861af9c 100644 --- a/examples-codegen/example2-client/client.cpp +++ b/examples-codegen/example2-client/client.cpp @@ -1,6 +1,6 @@ /* - Copyright (C) 2006 - intra2net.com + Copyright (C) 2006 + intra2net.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ int main(int argc, char** argv) { libt2n::socket_client_connection sc("./socket"); - cmd_group_default_client cc(sc); + cmd_group_default_client cc(&sc); bool throwok=false; try diff --git a/examples-codegen/example2/client.cpp b/examples-codegen/example2/client.cpp index 1ed845b..dfddf83 100644 --- a/examples-codegen/example2/client.cpp +++ b/examples-codegen/example2/client.cpp @@ -1,6 +1,6 @@ /* - Copyright (C) 2006 - intra2net.com + Copyright (C) 2006 + intra2net.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,8 +33,8 @@ int main(int argc, char** argv) { libt2n::socket_client_connection sc("./socket"); libt2n::socket_client_connection sc_other("./socket_other"); - cmd_group_default_client cc(sc); - cmd_group_other_client cc_other(sc_other); + cmd_group_default_client cc(&sc); + cmd_group_other_client cc_other(&sc_other); bool throwok=false; try diff --git a/examples-codegen/example2/server.cpp b/examples-codegen/example2/server.cpp index f7ce0f7..267e823 100644 --- a/examples-codegen/example2/server.cpp +++ b/examples-codegen/example2/server.cpp @@ -16,6 +16,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #include #include