Template message receiver class. More...
#include <UTMessageReceiver.h>
Public Member Functions | |
MessageReceiver_t (void(TASK_TYPE::*receiver_function)(const MESSAGE_TYPE *)) | |
void | SetReceiverFunction (void(TASK_TYPE::*receiver_function)(const MESSAGE_TYPE *)) |
Template message receiver class. When a message is received, a receiver function is called in the Task_t subclass which owns this message receiver, and whose type must match the template TASK_TYPE. For dispatch purposes, the message must be the same type as, or derived from, the template MESSAGE_TYPE. Otherwise, the message could not be cast to the correct type for calling the message receiver function. If the required dynamic cast is not possible, an assertion failure will occur, but use of the MessageDestination_t template, which is also a template of MESSAGE_TYPE, makes that unlikely. See MessageLoop_t for a comprehensive explanation of the UT messaging architecture.
Definition at line 78 of file UTMessageReceiver.h.
MessageReceiver_t< TASK_TYPE, MESSAGE_TYPE >::MessageReceiver_t | ( | void(TASK_TYPE::*)(const MESSAGE_TYPE *) | receiver_function | ) | [inline] |
Constructor for a message receiver where the specified receiver_function in a task of tbe specified type will be called when it receives a message.
Definition at line 140 of file UTMessageReceiver.h.
void MessageReceiver_t< TASK_TYPE, MESSAGE_TYPE >::SetReceiverFunction | ( | void(TASK_TYPE::*)(const MESSAGE_TYPE *) | receiver_function | ) | [inline] |
Changes the registered receiver function.
Definition at line 149 of file UTMessageReceiver.h.