MessageDispatcher Class Reference
#include <MessageDispatcher.h>
![](../class_message_dispatcher.png)
# Public Member Functions | |
void | setClock (Clock clock) |
bool | dispatchDelayedMessages () |
Dispatch the delayed messages whose delay has expired. | |
bool | discardDelayedMessagesWithClock (Clock clock) |
# Static Public Member Functions | |
static bool | dispatchMessage (uint32 delay, ListenerObject sender, ListenerObject receiver, int32 message, void *extraInfo) |
static bool | discardDelayedMessagesFromSender (ListenerObject sender, int32 message) |
static bool | discardDelayedMessagesForReceiver (ListenerObject receiver, int32 message) |
static bool | discardAllDelayedMessagesFromSender (ListenerObject sender) |
static bool | discardAllDelayedMessagesForReceiver (ListenerObject receiver) |
static bool | discardAllDelayedMessages (ListenerObject listenerObject) |
static void | print (int32 x, int32 y) |
static void | printAllDelayedMessagesFromSender (ListenerObject sender, int16 x, int16 y) |
# Protected Attributes | |
Clock | clock |
Clock to use for delayed messages. | |
VirtualList | delayedMessages |
Linked list of queued messages to be dispatched. | |
Telegram | helperTelegram |
Telegram used when there is no stacking of telegrams. | |
bool | helperTelegramIsInUse |
Flag that indicates the usage state of the helper telegram. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Detailed Description
Class MessageDispatcher
Inherits from Object
Implements a dispatcher central of message codes wrapped in a Telegram.
Definition at line 57 of file MessageDispatcher.h.
# Member Function Documentation
# discardAllDelayedMessages()
|
static |
Discard all delayed messages sent to an object.
- Parameters
-
listenerObject Object that the messages were originally sent to or sent by
Definition at line 210 of file MessageDispatcher.c.
# discardAllDelayedMessagesForReceiver()
|
static |
Discard all delayed messages sent to an object.
- Parameters
-
receiver Object that was the target of the message
- Returns
- True if any messages is discarded
Definition at line 182 of file MessageDispatcher.c.
# discardAllDelayedMessagesFromSender()
|
static |
Discard all delayed messages sent by an object.
- Parameters
-
sender Object that was the target of the message
- Returns
- True if any messages is discarded
Definition at line 154 of file MessageDispatcher.c.
# discardDelayedMessagesForReceiver()
|
static |
Discard delayed messages sent to an object.
- Parameters
-
receiver Object that was the target of the message message Message's code
- Returns
- True if any messages is discarded
Definition at line 126 of file MessageDispatcher.c.
# discardDelayedMessagesFromSender()
|
static |
Discard delayed messages sent by an object.
- Parameters
-
sender Object that originally sent the message message Message's code
- Returns
- True if any messages is discarded
Definition at line 98 of file MessageDispatcher.c.
# discardDelayedMessagesWithClock()
Discarde delayed messages associated to the given clock.
- Parameters
-
clock Clock to search in delayed messages to discard
- Returns
- True if any messages is discarded
Definition at line 380 of file MessageDispatcher.c.
# dispatchDelayedMessages()
secure bool MessageDispatcher::dispatchDelayedMessages | ( | ) |
Dispatch the delayed messages whose delay has expired.
Definition at line 294 of file MessageDispatcher.c.
# dispatchMessage()
|
static |
Dispatch a message
- Parameters
-
delay Milliseconds to wait before dispatching the message sender Object that sends the message receiver Object that receives the message message Message's code extraInfo Pointer to any extra data that must accompany the message
- Returns
- Boolean indicating the status of the processing of the message if immediately dispatched
Definition at line 38 of file MessageDispatcher.c.
# print()
Print all delayed messages sent by an object.
- Parameters
-
x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 239 of file MessageDispatcher.c.
# printAllDelayedMessagesFromSender()
|
static |
Print all delayed messages sent by an object.
- Parameters
-
sender Object that originally sent the message x Screen x coordinate where to print y Screen y coordinate where to print
Definition at line 252 of file MessageDispatcher.c.
# setClock()
secure void MessageDispatcher::setClock | ( | Clock | clock | ) |
Set the clock to use for new delayed messages.
- Parameters
-
clock Clock to use
Definition at line 287 of file MessageDispatcher.c.
# Member Data Documentation
# clock
|
protected |
Clock to use for delayed messages.
Definition at line 62 of file MessageDispatcher.h.
# delayedMessages
|
protected |
Linked list of queued messages to be dispatched.
Definition at line 65 of file MessageDispatcher.h.
# helperTelegram
|
protected |
Telegram used when there is no stacking of telegrams.
Definition at line 68 of file MessageDispatcher.h.
# helperTelegramIsInUse
|
protected |
Flag that indicates the usage state of the helper telegram.
Definition at line 71 of file MessageDispatcher.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Misc/Messaging/MessageDispatcher.h
- VUEngine-Core/source/Misc/Messaging/MessageDispatcher.c