![]() |
Kiwano Engine v1.3.x
|
程序运行器 更多...
#include <Runner.h>
Public 成员函数 | |
| Runner (const Settings &settings) | |
| 创建程序运行器 更多... | |
| virtual void | OnReady () |
| 初始化完成处理 更多... | |
| virtual void | OnDestroy () |
| 应用程序销毁处理 更多... | |
| virtual bool | OnClose () |
| 应用程序关闭处理 更多... | |
| bool | MainLoop (Duration dt) |
| 应用程序主循环 更多... | |
| RefPtr< Window > | GetWindow () const |
| 获取窗口 | |
| Settings | GetSettings () const |
| 获取设置 | |
| RefPtr< Ticker > | GetFrameTicker () const |
| 获取帧报时器 | |
| void | SetFrameTicker (RefPtr< Ticker > ticker) |
| 设置帧报时器 | |
Public 成员函数 继承自 kiwano::ObjectBase | |
| ObjectBase () | |
| 构造基础对象 | |
| void | SetName (StringView name) |
| 设置对象名 | |
| StringView | GetName () const |
| 获取对象名 | |
| bool | IsName (StringView name) const |
| 判断对象的名称是否相同 更多... | |
| void * | GetUserData () const |
| 获取用户数据 | |
| void | SetUserData (void *data) |
| 设置用户数据 更多... | |
| void | Hold (RefPtr< ObjectBase > other) |
| 持有一个对象并管理其生命周期 更多... | |
| void | Unhold (RefPtr< ObjectBase > other) |
| 放弃持有的对象 更多... | |
| 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 (StringView msg, int code=ObjectStatus::fail) |
| 将对象标记为失败状态 | |
| void | ClearStatus () |
| 清除对象状态 | |
Public 成员函数 继承自 kiwano::RefObject | |
| void | Retain () |
| 增加引用计数 | |
| void | Release () |
| 减少引用计数 | |
| uint32_t | GetRefCount () const |
| 获取引用计数 | |
Public 成员函数 继承自 kiwano::Serializable | |
| Vector< uint8_t > | Serialize () const |
| 序列化为字节串 | |
| void | Deserialize (const Vector< uint8_t > &data) |
| 从字节串反序列化 | |
| virtual void | DoSerialize (Serializer *serializer) const =0 |
| 执行序列化 更多... | |
| virtual void | DoDeserialize (Deserializer *deserializer)=0 |
| 执行反序列化 更多... | |
Protected 成员函数 | |
| void | SetSettings (Settings settings) |
| 修改设置 | |
| void | SetWindow (RefPtr< Window > window) |
| 设置窗口 | |
友元 | |
| class | Application |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 kiwano::ObjectBase | |
| static void | SetObjectPolicy (const ObjectPolicyFunc &policy) |
| 设置对象处理策略 | |
| static bool | IsTracingLeaks () |
| 是否启用了内存泄漏追踪 | |
| static void | StartTracingLeaks () |
| 开始追踪内存泄漏 | |
| static void | StopTracingLeaks () |
| 停止追踪内存泄漏 | |
| static void | DumpTracingObjects () |
| 打印所有追踪中的对象信息 | |
| static Vector< ObjectBase * > & | GetTracingObjects () |
| 获取所有追踪中的对象 | |
静态 Public 成员函数 继承自 kiwano::RefObject | |
| 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::Runner::Runner | ( | const Settings & | settings | ) |
创建程序运行器
| main_window | 主窗口 |
| bool kiwano::Runner::MainLoop | ( | Duration | dt | ) |
应用程序主循环
| dt | 时间间隔 |
重载该函数以控制程序主循环
|
inlinevirtual |
应用程序关闭处理
重载该函数以处理用户关闭应用程序时的行为,如保存用户数据等
|
inlinevirtual |
应用程序销毁处理
重载该函数以处理应用程序销毁时的行为,如完成资源回收等
|
inlinevirtual |
初始化完成处理
重载该函数以在应用程序初始化完成后自动执行