Isle
|
[AI] Manages ticking ("tickling") a set of MxCore objects at specified intervals. More...
#include <mxticklemanager.h>
Public Member Functions | |
MxTickleManager () | |
[AI] Constructs an empty tickle manager. More... | |
~MxTickleManager () override | |
[AI] Destroys the tickle manager, unregistering and freeing all clients. More... | |
MxResult | Tickle () override |
[AI] Iterates over registered clients and invokes their Tickle() methods as needed. More... | |
virtual void | RegisterClient (MxCore *p_client, MxTime p_interval) |
[AI] Registers an MxCore object to receive periodic tickles. More... | |
virtual void | UnregisterClient (MxCore *p_client) |
[AI] Unregisters (marks for destruction) a previously registered client. More... | |
virtual void | SetClientTickleInterval (MxCore *p_client, MxTime p_interval) |
[AI] Changes the tickle interval of an already registered client. More... | |
virtual MxTime | GetClientTickleInterval (MxCore *p_client) |
[AI] Looks up the tickle interval of a registered client. More... | |
![]() | |
MxCore () | |
[AI] Constructs a new MxCore object and assigns it a unique id. More... | |
virtual | ~MxCore () |
[AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More... | |
virtual MxLong | Notify (MxParam &p_param) |
[AI] Virtual callback notification mechanism. More... | |
virtual MxResult | Tickle () |
[AI] Called by tickle managers to allow the object to update itself. More... | |
virtual const char * | ClassName () const |
[AI] Returns the runtime class name of this object. More... | |
virtual MxBool | IsA (const char *p_name) const |
[AI] Checks whether this object's class type or parents match the given name. More... | |
MxU32 | GetId () |
[AI] Gets the unique (per-process) id assigned to this object instance. More... | |
[AI] Manages ticking ("tickling") a set of MxCore objects at specified intervals.
[AI] Forward declaration for the tickle manager, which schedules periodic updates on registered clients.
MxTickleManager maintains a list of MxTickleClient entries—each representing a client object and its tickle interval. On each Tickle() call, the manager updates all registered clients, invoking their Tickle() method as needed (if the interval has elapsed). Used throughout the engine to provide periodic updates for animation, streaming, and other time-dependent logic.
[AI] Intended to be used as a centralized update/ticking system for polymorphic objects, decoupling specific object update logic from the main game/application loop.
Definition at line 90 of file mxticklemanager.h.
|
inline |
|
override |
[AI] Destroys the tickle manager, unregistering and freeing all clients.
[AI] Calls delete on every registered MxTickleClient. [AI]
Definition at line 25 of file mxticklemanager.cpp.
[AI] Looks up the tickle interval of a registered client.
p_client | The object to query. [AI] |
Definition at line 109 of file mxticklemanager.cpp.
[AI] Registers an MxCore object to receive periodic tickles.
p_client | Object to manage. [AI] |
p_interval | Time in ms between tickles. [AI] |
[AI] If the client is not already registered, adds it to the list. [AI]
Definition at line 67 of file mxticklemanager.cpp.
[AI] Changes the tickle interval of an already registered client.
p_client | Object to update. [AI] |
p_interval | New interval in ms. [AI] |
[AI] Only updates if client is not marked for destruction. [AI]
Definition at line 96 of file mxticklemanager.cpp.
|
overridevirtual |
[AI] Iterates over registered clients and invokes their Tickle() methods as needed.
[AI] For each client whose tickle interval has elapsed, MxTickleManager calls their Tickle() method and updates their last-tickled timestamp. Clients flagged for destruction are dropped.
Reimplemented from MxCore.
Definition at line 36 of file mxticklemanager.cpp.
|
virtual |
[AI] Unregisters (marks for destruction) a previously registered client.
p_client | Object to remove. [AI] |
[AI] Sets a destruction flag on the tickle client entry, causing it to be deleted on the next tickle pass.
Definition at line 80 of file mxticklemanager.cpp.