diff options
Diffstat (limited to 'ipc/ipc_message.h')
-rw-r--r-- | ipc/ipc_message.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h index 1b13d67..ea6cda6 100644 --- a/ipc/ipc_message.h +++ b/ipc/ipc_message.h @@ -141,31 +141,17 @@ class IPC_EXPORT Message : public Pickle { // call. void SetHeaderValues(int32 routing, uint32 type, uint32 flags); - template<class T, class S> - static bool Dispatch(const Message* msg, T* obj, S* sender, + template<class T, class S, class P> + static bool Dispatch(const Message* msg, T* obj, S* sender, P* parameter, void (T::*func)()) { (obj->*func)(); return true; } - 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, 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, class S> - static bool Dispatch(const Message* msg, T* obj, S* sender, - void (T::*func)(const Message&) const) { - (obj->*func)(*msg); + template<class T, class S, class P> + static bool Dispatch(const Message* msg, T* obj, S* sender, P* parameter, + void (T::*func)(P*)) { + (obj->*func)(parameter); return true; } |