The MessageMethod class delivers a message of a specified type to a class method, see MessageThread. More...
#include "murl_util_message_callback.h"
Public Types | |
| using | Method = Bool(ObjectClass::*)(AutoPointer< MessageClass >) |
| Definition of the method pointer to call. | |
Public Member Functions | |
| MessageMethod (ObjectClass *instance, Method method) | |
| The constructor. More... | |
| Bool | Execute (Message::AutoPtr &message) override |
| The callback to deliver a message. More... | |
Protected Attributes | |
| ObjectClass * | mInstance |
| The instance pointer of the class to call. | |
| Method | mMethod |
| The method pointer to call. | |
Detailed Description
template<class MessageClass, class ObjectClass>
class Murl::Util::MessageMethod< MessageClass, ObjectClass >
The MessageMethod class delivers a message of a specified type to a class method, see MessageThread.
Constructor & Destructor Documentation
◆ MessageMethod()
|
inline |
The constructor.
- Template Parameters
-
MessageClass The type of the message class. ObjectClass The type of the class to call the method.
- Parameters
-
instance The instance pointer of the class to call the method. method The method pointer to call.
Member Function Documentation
◆ Execute()
|
inlineoverridevirtual |
The callback to deliver a message.
The method pointer of the ObjectClass instance which was passed to the constructor is called with the message parameter casted to the MessageClass type.
- Parameters
-
message The message to deliver.
- Returns
- true if successful.
Implements Murl::Util::MessageCallBack.
References Murl::String::Begin(), Murl::System::DemangleTypeName(), Murl::Debug::Error(), Murl::Util::MessageMethod< MessageClass, ObjectClass >::mInstance, and Murl::Util::MessageMethod< MessageClass, ObjectClass >::mMethod.
The documentation for this class was generated from the following file:
- murl_util_message_callback.h
Public Types inherited from