54 template <
class T,
typename Tcallback>
55 struct registerConfigureCallback_f :
public std::unary_function<T, void> {
56 registerConfigureCallback_f(
const std::string& _id,
const Tcallback _callback)
57 : id(_id), callback(_callback)
62 void operator()(T& x) { x->i()->registerConfigureCallback(
id, callback); }
64 const Tcallback callback;
67 template <
class T,
typename Tcallback>
68 struct unregisterConfigureCallback_f :
public std::unary_function<T, void> {
69 unregisterConfigureCallback_f(
const std::string& _id) : id(_id) { ; }
71 void operator()(T& x) { x->i()->unregisterConfigureCallback(
id); }
75 template <
class T,
typename Tcallback>
76 struct registerQueryCallback_f :
public std::unary_function<T, void> {
77 registerQueryCallback_f(
const std::string& _id,
const Tcallback _callback)
78 : id(_id), callback(_callback)
83 void operator()(T& x) { x->i()->registerQueryCallback(
id, callback); }
85 const Tcallback callback;
88 template <
class T,
typename Tcallback>
89 struct unregisterQueryCallback_f :
public std::unary_function<T, void> {
90 unregisterQueryCallback_f(
const std::string& _id) : id(_id) { ; }
92 void operator()(T& x) { x->i()->unregisterQueryCallback(
id); }
97 template <
class T,
typename Tcallback>
98 struct registerHandlerCallback_f :
public std::unary_function<T, void> {
99 registerHandlerCallback_f(
const std::string& _id,
const Tcallback _callback)
100 : id(_id), callback(_callback)
105 void operator()(T& x) { x->i()->registerHandlerCallback(
id, callback); }
106 const std::string id;
107 const Tcallback callback;
110 template <
class T,
typename Tcallback>
111 struct unregisterHandlerCallback_f :
public std::unary_function<T, void> {
112 unregisterHandlerCallback_f(
const std::string& _id) : id(_id) { ; }
114 void operator()(T& x) { x->i()->unregisterHandlerCallback(
id); }
115 const std::string id;
119 const std::string d_type;
120 typedef std::vector<rpcmanager_base::rpcserver_booter_base_sptr> rpcServerMap_t;
121 std::vector<std::string> d_registeredServers;
122 rpcServerMap_t d_serverlist;