cMsg Messaging System  5.2
 All Classes Namespaces Files Functions Variables Friends
cMsgDispatcher< T > Class Template Reference

This class provides a cMsg C callback method that dispatchs to a member function of another object, used internally. More...

#include <cMsgPrivate.hxx>

Inheritance diagram for cMsgDispatcher< T >:

Public Member Functions

 cMsgDispatcher (T *t, void(T::*mfp)(cMsgMessage *msg, void *userArg)) throw (cMsgException*)
 Constructor stores object pointer and member function pointer. More...
 
void callback (cMsgMessage *msg, void *userArg) throw (cMsgException)
 Callback method dispatches to member function. More...
 

Detailed Description

template<class T>
class cMsgDispatcher< T >

This class provides a cMsg C callback method that dispatchs to a member function of another object, used internally.

This object extends cMsgCallback and thus has a callback method. It further stores a pointer to another object and to a member function of the object. That member function is invoked by the callback method of this object.

Definition at line 32 of file cMsgPrivate.hxx.

Constructor & Destructor Documentation

template<class T >
cMsgDispatcher< T >::cMsgDispatcher ( T *  t,
void(T::*)(cMsgMessage *msg, void *userArg)  mfp 
)
throw (cMsgException *
)
inline

Constructor stores object pointer and member function pointer.

Parameters
tObject pointer
mfpMember function pointer

Definition at line 45 of file cMsgPrivate.hxx.

Member Function Documentation

template<class T >
void cMsgDispatcher< T >::callback ( cMsgMessage *  msg,
void *  userArg 
)
throw (cMsgException
)
inline

Callback method dispatches to member function.

Parameters
msgMessage.
userArgUser arg.

Definition at line 53 of file cMsgPrivate.hxx.


The documentation for this class was generated from the following file: