#include <client_wrapper.hxx>

Static Public Member Functions | |
| static void | set_connection (std::auto_ptr< ConnectionWrapper > wrappedConnection) |
| tell the wrapper which connection to use | |
| static ConnectionWrapper * | get_connection_wrapper (void) |
| return a pointer to the ConnectionWrapper currently in use | |
| static void | ensure_singleton_there (void) |
| manually establish the connection without actually executing a call | |
Static Protected Attributes | |
| static const char * | NotInitializedMessage = "T2nSingletonWrapper used before setting initializing connection" |
Private Member Functions | |
| T2nSingletonWrapper (std::auto_ptr< Client > stub) | |
Static Private Member Functions | |
| static void | init () |
| template<typename R> | |
| static detail::TypeWrap< R >::type | real_exec (boost::function< R(Client *) > f) |
Private Attributes | |
| std::auto_ptr< Client > | Stub |
Static Private Attributes | |
| static std::auto_ptr < T2nSingletonWrapper > | SingletonObject |
| static std::auto_ptr < ConnectionWrapper > | WrappedConnection |
Template class to access a process-wide singleton server-connection and to wrap all calls using this connection with an error-handling strategy (e.g. to reconnect when the connection broke). The source looks very complicated due to heavy use of templates, look at the 3rd codegen example to see how to use it.
t2n_exec(&cmd_group_t2nexample_client::testfunc)("the answer is %d",42)
| libt2n::T2nSingletonWrapper< Client >::T2nSingletonWrapper | ( | std::auto_ptr< Client > | stub | ) | [inline, private] |
References libt2n::T2nSingletonWrapper< Client >::Stub.
Referenced by libt2n::T2nSingletonWrapper< Client >::init().
| static void libt2n::T2nSingletonWrapper< Client >::init | ( | ) | [inline, static, private] |
| static detail::TypeWrap<R>::type libt2n::T2nSingletonWrapper< Client >::real_exec | ( | boost::function< R(Client *) > | f | ) | [inline, static, private] |
| static void libt2n::T2nSingletonWrapper< Client >::set_connection | ( | std::auto_ptr< ConnectionWrapper > | wrappedConnection | ) | [inline, static] |
tell the wrapper which connection to use
| wrappedConnection | the connection to establish when needed |
| static ConnectionWrapper* libt2n::T2nSingletonWrapper< Client >::get_connection_wrapper | ( | void | ) | [inline, static] |
return a pointer to the ConnectionWrapper currently in use
| static void libt2n::T2nSingletonWrapper< Client >::ensure_singleton_there | ( | void | ) | [inline, static] |
manually establish the connection without actually executing a call
Referenced by libt2n::T2nSingletonWrapper< Client >::real_exec().
std::auto_ptr<Client> libt2n::T2nSingletonWrapper< Client >::Stub [private] |
Referenced by libt2n::T2nSingletonWrapper< Client >::T2nSingletonWrapper().
std::auto_ptr<T2nSingletonWrapper> libt2n::T2nSingletonWrapper< Client >::SingletonObject [static, private] |
std::auto_ptr<ConnectionWrapper> libt2n::T2nSingletonWrapper< Client >::WrappedConnection [static, private] |
const char * libt2n::T2nSingletonWrapperMessages::NotInitializedMessage = "T2nSingletonWrapper used before setting initializing connection" [static, protected, inherited] |
Referenced by libt2n::T2nSingletonWrapper< Client >::init().
1.5.6