![]() |
Kiwano Engine
v1.2.x
|
事件报时器 更多...
#include <EventTicker.h>
Public 成员函数 | |
EventTicker (Duration interval, int tick_count=-1) | |
创建事件报时器 更多... | |
bool | Tick (Duration dt) override |
计时 更多... | |
![]() | |
Ticker (Duration interval, int tick_count=-1) | |
创建报时器 更多... | |
virtual bool | Tick () |
计时 更多... | |
Duration | GetDeltaTime () |
获取时间增量 | |
bool | IsPausing () const |
获取暂停状态 | |
void | Pause () |
暂停报时器 | |
void | Resume () |
继续报时器 | |
int | GetTickedCount () const |
获取报时器报时次数 | |
int | GetTotalTickCount () const |
获取报时器总报时次数 | |
void | SetTotalTickCount (int count) |
设置报时器总报时次数 | |
Duration | GetInterval () const |
获取报时间隔 | |
void | SetInterval (Duration interval) |
设置报时间隔 | |
Duration | GetErrorTime () const |
获取时间误差 | |
TimerPtr | GetTimer () |
获取计时器 | |
void | SetTimer (TimerPtr timer) |
设置计时器 | |
void | Reset () |
重置报时器 | |
![]() | |
ObjectBase () | |
构造基础对象 | |
void | SetName (const String &name) |
设置对象名 | |
String | GetName () const |
获取对象名 | |
bool | IsName (const String &name) const |
判断对象的名称是否相同 更多... | |
void * | GetUserData () const |
获取用户数据 | |
void | SetUserData (void *data) |
设置用户数据 | |
uint64_t | GetObjectID () const |
获取对象ID | |
void | DoSerialize (Serializer *serializer) const override |
序列化 | |
void | DoDeserialize (Deserializer *deserializer) override |
反序列化 | |
virtual bool | IsValid () const |
判断对象是否有效 | |
ObjectStatus * | GetStatus () const |
获取对象状态 | |
void | SetStatus (const ObjectStatus &status) |
设置对象状态 | |
void | Fail (const String &msg, int code=ObjectStatus::fail) |
将对象标记为失败状态 | |
void | ClearStatus () |
清除对象状态 | |
![]() | |
void | Retain () |
增加引用计数 | |
void | Release () |
减少引用计数 | |
uint32_t | GetRefCount () const |
获取引用计数 | |
![]() | |
Vector< uint8_t > | Serialize () const |
序列化为字节串 | |
void | Deserialize (const Vector< uint8_t > &data) |
从字节串反序列化 | |
![]() | |
EventListener * | AddListener (EventListenerPtr listener) |
添加监听器 | |
EventListener * | AddListener (EventType type, EventListener::Callback callback) |
添加监听器 更多... | |
EventListener * | AddListener (const String &name, EventType type, EventListener::Callback callback) |
添加监听器 更多... | |
template<typename _EventTy > | |
EventListener * | AddListener (EventListener::Callback callback) |
添加监听器 更多... | |
template<typename _EventTy > | |
EventListener * | AddListener (const String &name, EventListener::Callback callback) |
添加监听器 更多... | |
void | StartListeners (const String &name) |
启动监听器 更多... | |
void | StopListeners (const String &name) |
停止监听器 更多... | |
void | RemoveListeners (const String &name) |
移除监听器 更多... | |
void | StartAllListeners () |
启动所有监听器 | |
void | StopAllListeners () |
停止所有监听器 | |
void | RemoveAllListeners () |
移除所有监听器 | |
const ListenerList & | GetAllListeners () const |
获取所有监听器 | |
bool | DispatchEvent (Event *evt) |
分发事件 更多... | |
额外继承的成员函数 | |
![]() | |
static void | SetObjectPolicy (const ObjectPolicyFunc &policy) |
设置对象处理策略 | |
static bool | IsTracingLeaks () |
是否启用了内存泄漏追踪 | |
static void | StartTracingLeaks () |
开始追踪内存泄漏 | |
static void | StopTracingLeaks () |
停止追踪内存泄漏 | |
static void | DumpTracingObjects () |
打印所有追踪中的对象信息 | |
static Vector< ObjectBase * > & | GetTracingObjects () |
获取所有追踪中的对象 | |
![]() | |
static void * | operator new (size_t size) |
static void | operator delete (void *ptr) |
static void * | operator new (size_t size, std::nothrow_t const &) noexcept |
static void | operator delete (void *ptr, std::nothrow_t const &) noexcept |
static void * | operator new (size_t size, void *ptr) noexcept |
static void | operator delete (void *ptr, void *place) noexcept |
事件报时器
kiwano::EventTicker::EventTicker | ( | Duration | interval, |
int | tick_count = -1 |
||
) |
创建事件报时器
interval | 报时间隔 |
tick_count | 报时次数(设 -1 为永久) |
|
overridevirtual |