| Commit | Line | Data |
|---|---|---|
| db49c2f9 JT |
1 | #include "minimalistic-client-stub.hxx" |
| 2 | #include "minimalistic-stub.hxx" | |
| 3 | ||
| 4 | // fake | |
| 5 | libt2n::result* testfunc_cmd::operator()() | |
| 6 | { | |
| 7 | return NULL; | |
| 8 | } | |
| 9 | ||
| 10 | std::string cmd_group_example_client::testfunc(const std::string& str) | |
| 11 | { | |
| 12 | libt2n::result_container rc; | |
| 13 | send_command(new testfunc_cmd(str),rc); | |
| 14 | ||
| 15 | testfunc_res* res=dynamic_cast<testfunc_res*>(rc.get_result()); | |
| 16 | if (!res) | |
| ec979c57 | 17 | // TODO: another exception and details |
| db49c2f9 JT |
18 | throw libt2n::t2n_communication_error("result object of wrong type"); |
| 19 | return res->get_data(); | |
| 20 | } | |
| 21 | ||
| 22 | // include in this compilation unit to ensure the compilation unit is used | |
| 23 | // see also: | |
| 24 | // http://www.google.de/search?q=g%2B%2B+static+initializer+in+static+library | |
| c0a5c771 | 25 | #include "minimalistic-stub-once.hxx" |