|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
反射类型注册表 更多...
#include <registry.hpp>
Public 成员函数 | |
| template<typename T> | |
| meta_type & | register_type (string_view name) |
| 注册类型 | |
| meta_type * | find_unlocked (string_view name) |
| 查找类型 | |
| meta_type * | find (string_view name) |
| 查找类型 | |
| meta_type * | find (type_id id) |
| 查找类型 | |
| template<typename Func> | |
| void | for_each (Func &&func) |
| 遍历所有注册的类型 | |
| void | resolve_all_bases () |
| 解析所有类型的基类关系 | |
静态 Public 成员函数 | |
| static registry & | instance () |
| 获取单例实例 | |
|
inline |
|
inline |
查找类型
| name | 类型名称 |
在文件 registry.hpp 第 76 行定义.
引用了 name().
被这些函数引用 find().
|
inline |
|
inlinestatic |
|
inline |
注册类型
| T | 要注册的类型 |
| name | 类型名称 |
如果类型已注册,返回现有元数据;否则创建新的元数据。
在文件 registry.hpp 第 56 行定义.
引用了 make_unique() , 以及 name().
|
inline |