Isle
Loading...
Searching...
No Matches
mxnotificationmanager.h
Go to the documentation of this file.
1#ifndef MXNOTIFICATIONMANAGER_H
2#define MXNOTIFICATIONMANAGER_H
3
4#include "mxcore.h"
5#include "mxcriticalsection.h"
6#include "mxstl/stlcompat.h"
7#include "mxtypes.h"
8
10
16public:
23 MxNotification(MxCore* p_target, const MxNotificationParam& p_param);
24
29
34 MxCore* GetTarget() { return m_target; }
35
40 MxNotificationParam* GetParam() { return m_param; }
41
42private:
43 MxCore* m_target;
44 MxNotificationParam* m_param;
45};
46
51class MxIdList : public list<MxU32> {};
52
57class MxNotificationPtrList : public list<MxNotification*> {};
58
59// VTABLE: LEGO1 0x100dc078
60
67private:
68 MxNotificationPtrList* m_queue;
69 MxNotificationPtrList* m_sendList;
70 MxCriticalSection m_lock;
71 MxS32 m_unk0x2c;
72 MxIdList m_listenerIds;
73 MxBool m_active;
74
75public:
80
84 ~MxNotificationManager() override; // vtable+0x00 (scalar deleting destructor)
85
90 MxResult Tickle() override; // vtable+0x08
91
98 virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x14
99
105 void Register(MxCore* p_listener);
106
112 void Unregister(MxCore* p_listener);
113
120 MxResult Send(MxCore* p_listener, const MxNotificationParam& p_param);
121
126 MxNotificationPtrList* GetQueue() { return m_queue; }
127
132 void SetActive(MxBool p_active) { m_active = p_active; }
133
138 MxBool IsEmpty() const { return m_queue ? m_queue->empty() : TRUE; }
139
140 // SYNTHETIC: LEGO1 0x100ac390
141 // MxNotificationManager::`scalar deleting destructor'
142
143private:
149 void FlushPending(MxCore* p_listener);
150};
151
152// TEMPLATE: LEGO1 0x100ac320
153// list<unsigned int,allocator<unsigned int> >::~list<unsigned int,allocator<unsigned int> >
154
155// FUNCTION: LEGO1 0x100ac3b0
156// MxIdList::~MxIdList
157
158// TEMPLATE: LEGO1 0x100ac400
159// List<unsigned int>::~List<unsigned int>
160
161// TEMPLATE: LEGO1 0x100ac540
162// List<MxNotification *>::~List<MxNotification *>
163
164// TEMPLATE: LEGO1 0x100ac590
165// list<MxNotification *,allocator<MxNotification *> >::~list<MxNotification *,allocator<MxNotification *> >
166
167// TEMPLATE: LEGO1 0x100acbf0
168// list<MxNotification *,allocator<MxNotification *> >::begin
169
170// TEMPLATE: LEGO1 0x100acc00
171// list<MxNotification *,allocator<MxNotification *> >::insert
172
173// TEMPLATE: LEGO1 0x100acc50
174// list<MxNotification *,allocator<MxNotification *> >::erase
175
176// TEMPLATE: LEGO1 0x100acca0
177// list<MxNotification *,allocator<MxNotification *> >::_Buynode
178
179// SYNTHETIC: LEGO1 0x100accd0
180// MxNotificationPtrList::~MxNotificationPtrList
181
182// TEMPLATE: BETA10 0x10129670
183// list<MxNotification *,allocator<MxNotification *> >::empty
184
185#endif // MXNOTIFICATIONMANAGER_H
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Provides a critical section object for mutual exclusion with optional use of OS mutex.
[AI] List of object IDs used to track registered notification listeners.
[AI] Central registry and dispatcher of asynchronous notifications between MxCore objects.
MxNotificationManager()
[AI] Constructs a new NotificationManager, initializing all state to defaults.
MxResult Tickle() override
[AI] Processes and dispatches all queued notifications to their targets.
~MxNotificationManager() override
[AI] Destroys the NotificationManager.
void Unregister(MxCore *p_listener)
[AI] Removes a previously registered listener and flushes any pending notifications for it.
MxNotificationPtrList * GetQueue()
[AI] Returns a pointer to the current notification queue (for debug/inspection).
void Register(MxCore *p_listener)
[AI] Registers a listener object to receive notifications.
void SetActive(MxBool p_active)
[AI] Sets the notification manager active or inactive.
MxBool IsEmpty() const
[AI] Returns whether the notification queue is empty.
MxResult Send(MxCore *p_listener, const MxNotificationParam &p_param)
[AI] Queues a notification to be sent to a specific registered listener.
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread)
[AI] Initializes the notification manager, setting up queues and optionally registering with the tick...
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
[AI] List of notification pointers used to queue notifications for delivery.
[AI] Carries a notification to be sent to a target MxCore object.
MxCore * GetTarget()
[AI] Returns the target of this notification.
~MxNotification()
[AI] Destructor for MxNotification.
MxNotificationParam * GetParam()
[AI] Returns the notification parameter (cloned by the notification).
#define TRUE
Definition: d3drmdef.h:28
#define list
[AI] Macro alias for List<T>, replacing std::list<T>.
Definition: mxstl.h:410
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed int MxS32
[AI]
Definition: mxtypes.h:38
unsigned int MxU32
[AI]
Definition: mxtypes.h:32
[AI] STL compatibility layer header to provide consistent STL (Standard Template Library) types and a...