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;