23 #ifndef RPCSERVER_AGGREGATOR_H
24 #define RPCSERVER_AGGREGATOR_H
45 const std::string&
type();
50 template<
class T,
typename Tcallback>
51 struct registerConfigureCallback_f:
public std::unary_function<T,void>
53 registerConfigureCallback_f(
const std::string &_id,
const Tcallback _callback)
54 : id(_id), callback(_callback)
57 void operator()(T& x) { x->i()->registerConfigureCallback(
id, callback); }
58 const std::string& id;
const Tcallback& callback;
61 template<
class T,
typename Tcallback>
62 struct unregisterConfigureCallback_f:
public std::unary_function<T,void>
64 unregisterConfigureCallback_f(
const std::string &_id)
68 void operator()(T& x) { x->i()->unregisterConfigureCallback(
id); }
69 const std::string& id;
72 template<
class T,
typename Tcallback>
73 struct registerQueryCallback_f:
public std::unary_function<T,void>
75 registerQueryCallback_f(
const std::string &_id,
const Tcallback _callback)
76 : id(_id), callback(_callback)
79 void operator()(T& x) { x->i()->registerQueryCallback(
id, callback); }
80 const std::string& id;
const Tcallback& callback;
83 template<
class T,
typename Tcallback>
84 struct unregisterQueryCallback_f:
public std::unary_function<T,void>
86 unregisterQueryCallback_f(
const std::string &_id)
90 void operator()(T& x) { x->i()->unregisterQueryCallback(
id); }
91 const std::string& id;
94 const std::string d_type;
95 typedef std::vector<rpcmanager_base::rpcserver_booter_base_sptr> rpcServerMap_t;
96 std::vector<std::string> d_registeredServers;
97 rpcServerMap_t d_serverlist;
void registerQueryCallback(const std::string &id, const queryCallback_t callback)
Definition: rpccallbackregister_base.h:80
const std::string & type()
const std::vector< std::string > & registeredServers()
void registerServer(rpcmanager_base::rpcserver_booter_base_sptr server)
void registerConfigureCallback(const std::string &id, const configureCallback_t callback)
void unregisterQueryCallback(const std::string &id)
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
Definition: rpcserver_aggregator.h:31
Definition: rpcserver_base.h:28
void unregisterConfigureCallback(const std::string &id)
virtual ~rpcserver_aggregator()