10#define TICKLE_MANAGER_FLAG_DESTROY 0x01
20 m_interval = p_interval;
21 m_lastUpdateTime = -m_interval;
27 while (m_clients.size() != 0) {
29 m_clients.pop_front();
39 MxTickleClientPtrList::iterator it;
41 for (it = m_clients.begin(); !(it == m_clients.end());) {
45 m_clients.erase(it++);
73 m_clients.push_back(client);
82 MxTickleClientPtrList::iterator it = m_clients.begin();
83 while (it != m_clients.end()) {
98 for (MxTickleClientPtrList::iterator it = m_clients.begin(); it != m_clients.end(); it++) {
111 MxTickleClientPtrList::iterator it = m_clients.begin();
112 while (it != m_clients.end()) {
[AI] Base virtual class for all Mindscape engine (Mx) objects.
virtual MxResult Tickle()
[AI] Called by tickle managers to allow the object to update itself.
[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.
MxTickleClient(MxCore *p_client, MxTime p_interval)
[AI] Constructs a tickle client for the given object and interval.
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.
MxLong GetTime()
Returns the current timer value in ms, depending on running state.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
MxTimer * Timer()
[AI] Returns the global simulation timer.
#define TICKLE_MANAGER_FLAG_DESTROY
#define TICKLE_MANAGER_NOT_FOUND
[AI] Returned by GetClientTickleInterval when the client is not found. [AI]