|
ShitEngine
基于 C++20 与 SDL3 的轻量级 2D 游戏引擎
|
#include <TypeRegistry.h>
Public 成员函数 | |
| void | registerType (TypeInfo info) |
| void | initBuiltinTypes () |
| void | resolveBases () |
| 解析所有未解析的基类引用(消除 SIOF) | |
| bool | unregisterType (std::string_view name) |
| 按名称卸载类型 | |
| void | setRegistrationSource (std::string_view source) |
| 设置后续注册类型的来源标记(空 = 引擎内置,插件注册前设为插件名) | |
| size_t | unregisterTypesBySource (std::string_view source) |
| 卸载指定来源注册的全部类型(插件卸载前调用,防止 factory 悬垂) | |
| const TypeInfo * | getType (std::string_view name) const |
| const TypeInfo * | getType (std::type_index ti) const |
| 按 type_index 查询(Prefab 动态克隆等场景用) | |
| template<typename T> | |
| const TypeInfo * | getType () const |
| void | forEach (std::function< void(const TypeInfo &)> callback) const |
| size_t | count () const |
| TypeRegistry (const TypeRegistry &)=delete | |
| TypeRegistry & | operator= (const TypeRegistry &)=delete |
| TypeRegistry (TypeRegistry &&)=delete | |
| TypeRegistry & | operator= (TypeRegistry &&)=delete |
静态 Public 成员函数 | |
| static TypeRegistry & | GetInstance () |
| static void | Register (TypeInfo info) |
| static void | InitBuiltinTypes () |
| static void | ResolveBases () |
| static bool | UnregisterType (std::string_view name) |
| static void | SetRegistrationSource (std::string_view source) |
| static size_t | UnregisterTypesBySource (std::string_view source) |
| static const TypeInfo * | Get (std::string_view name) |
| static const TypeInfo * | Get (std::type_index ti) |
| template<typename T> | |
| static const TypeInfo * | Get () |
| static void | ForEach (std::function< void(const TypeInfo &)> callback) |
| static size_t | Count () |
友元 | |
| class | EngineContext |
| class | TypeInfoBuilder |
|
delete |
|
delete |
|
inlinestatic |
|
inlinenodiscard |
|
inlinestatic |
| void forEach | ( | std::function< void(const TypeInfo &)> | callback | ) | const |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinenodiscard |
|
nodiscard |
|
nodiscard |
按 type_index 查询(Prefab 动态克隆等场景用)
|
inlinestatic |
| void initBuiltinTypes | ( | ) |
|
delete |
|
delete |
|
inlinestatic |
| void registerType | ( | TypeInfo | info | ) |
|
inlinestatic |
| void resolveBases | ( | ) |
解析所有未解析的基类引用(消除 SIOF)
|
inlinestatic |
| void setRegistrationSource | ( | std::string_view | source | ) |
设置后续注册类型的来源标记(空 = 引擎内置,插件注册前设为插件名)
|
inlinestatic |
| bool unregisterType | ( | std::string_view | name | ) |
按名称卸载类型
|
inlinestatic |
| size_t unregisterTypesBySource | ( | std::string_view | source | ) |
卸载指定来源注册的全部类型(插件卸载前调用,防止 factory 悬垂)
|
friend |
|
friend |