Isle
Loading...
Searching...
No Matches
mxticklemanager.h
Go to the documentation of this file.
1#ifndef MXTICKLEMANAGER_H
2#define MXTICKLEMANAGER_H
3
4#include "mxcore.h"
5#include "mxstl/stlcompat.h"
6#include "mxtypes.h"
7
8// SIZE 0x10
20public:
26 MxTickleClient(MxCore* p_client, MxTime p_interval);
27
31 MxCore* GetClient() const { return m_client; }
32
36 MxTime GetTickleInterval() const { return m_interval; }
37
41 MxTime GetLastUpdateTime() const { return m_lastUpdateTime; }
42
46 MxU16 GetFlags() const { return m_flags; }
47
52 void SetTickleInterval(MxTime p_interval) { m_interval = p_interval; }
53
58 void SetLastUpdateTime(MxTime p_lastUpdateTime) { m_lastUpdateTime = p_lastUpdateTime; }
59
64 void SetFlags(MxU16 p_flags) { m_flags = p_flags; }
65
66private:
67 MxCore* m_client;
68 MxTime m_interval;
69 MxTime m_lastUpdateTime;
70 MxU16 m_flags;
71};
72
74typedef list<MxTickleClient*> MxTickleClientPtrList;
75
76// VTABLE: LEGO1 0x100d86d8
77// VTABLE: BETA10 0x101bc9d0
78// SIZE 0x14
90class MxTickleManager : public MxCore {
91public:
96
101 ~MxTickleManager() override;
102
110 MxResult Tickle() override; // vtable+0x08
111
118 virtual void RegisterClient(MxCore* p_client, MxTime p_interval); // vtable+0x14
119
126 virtual void UnregisterClient(MxCore* p_client); // vtable+0x18
127
134 virtual void SetClientTickleInterval(MxCore* p_client, MxTime p_interval); // vtable+0x1c
135
141 virtual MxTime GetClientTickleInterval(MxCore* p_client); // vtable+0x20
142
143 // SYNTHETIC: LEGO1 0x1005a510
144 // SYNTHETIC: BETA10 0x100962f0
145 // MxTickleManager::`scalar deleting destructor'
146
147private:
148 MxTickleClientPtrList m_clients;
149};
150
151#define TICKLE_MANAGER_NOT_FOUND 0x80000000
152
153// TEMPLATE: LEGO1 0x1005a4a0
154// list<MxTickleClient *,allocator<MxTickleClient *> >::~list<MxTickleClient *,allocator<MxTickleClient *> >
155
156// TEMPLATE: BETA10 0x10093870
157// List<MxTickleClient *>::List<MxTickleClient *>
158
159// TEMPLATE: LEGO1 0x1005a530
160// TEMPLATE: BETA10 0x10096340
161// List<MxTickleClient *>::~List<MxTickleClient *>
162
163#endif // MXTICKLEMANAGER_H
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Associates an MxCore object with tickle timing/interval information.
MxCore * GetClient() const
[AI] Returns the managed MxCore object.
MxTime GetLastUpdateTime() const
[AI] Returns the timestamp of the last tickle.
void SetFlags(MxU16 p_flags)
[AI] Sets the flags for this client (e.g., destruction flag).
MxTime GetTickleInterval() const
[AI] Returns the tickle interval in milliseconds.
MxU16 GetFlags() const
[AI] Returns the internal flags for this tickle client.
void SetLastUpdateTime(MxTime p_lastUpdateTime)
[AI] Sets the last tickle time (updates the timestamp).
void SetTickleInterval(MxTime p_interval)
[AI] Sets the tickle interval for this client.
[AI] Manages ticking ("tickling") a set of MxCore objects at specified intervals.
virtual void UnregisterClient(MxCore *p_client)
[AI] Unregisters (marks for destruction) a previously registered client.
virtual void SetClientTickleInterval(MxCore *p_client, MxTime p_interval)
[AI] Changes the tickle interval of an already registered client.
MxResult Tickle() override
[AI] Iterates over registered clients and invokes their Tickle() methods as needed.
virtual MxTime GetClientTickleInterval(MxCore *p_client)
[AI] Looks up the tickle interval of a registered client.
virtual void RegisterClient(MxCore *p_client, MxTime p_interval)
[AI] Registers an MxCore object to receive periodic tickles.
~MxTickleManager() override
[AI] Destroys the tickle manager, unregistering and freeing all clients.
MxTickleManager()
[AI] Constructs an empty tickle manager.
list< MxTickleClient * > MxTickleClientPtrList
[AI] List type for holding multiple MxTickleClient pointers (the tickle registry)....
MxLong MxResult
[AI]
Definition: mxtypes.h:106
MxS32 MxTime
[AI]
Definition: mxtypes.h:100
unsigned short MxU16
[AI]
Definition: mxtypes.h:20
[AI] STL compatibility layer header to provide consistent STL (Standard Template Library) types and a...