diff options
Diffstat (limited to 'ipc/ipc_message.h')
-rw-r--r-- | ipc/ipc_message.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h index 5ffddde..accb2e3 100644 --- a/ipc/ipc_message.h +++ b/ipc/ipc_message.h @@ -130,27 +130,29 @@ class Message : public Pickle { header()->routing = new_id; } - template<class T> - static bool Dispatch(const Message* msg, T* obj, void (T::*func)()) { + template<class T, class S> + static bool Dispatch(const Message* msg, T* obj, S* sender, + void (T::*func)()) { (obj->*func)(); return true; } - template<class T> - static bool Dispatch(const Message* msg, T* obj, void (T::*func)() const) { + template<class T, class S> + static bool Dispatch(const Message* msg, T* obj, S* sender, + void (T::*func)() const) { (obj->*func)(); return true; } - template<class T> - static bool Dispatch(const Message* msg, T* obj, + template<class T, class S> + static bool Dispatch(const Message* msg, T* obj, S* sender, void (T::*func)(const Message&)) { (obj->*func)(*msg); return true; } - template<class T> - static bool Dispatch(const Message* msg, T* obj, + template<class T, class S> + static bool Dispatch(const Message* msg, T* obj, S* sender, void (T::*func)(const Message&) const) { (obj->*func)(*msg); return true; |