|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
类型反射构建器 更多...
#include <reflect.hpp>
Public 成员函数 | |
| type_builder (string_view name) | |
| 构造函数 | |
| template<typename Base> | |
| type_builder & | base () |
| 添加基类(已解析) | |
| type_builder & | base (string_view base_name) |
| 添加基类(延迟解析) | |
| template<typename U> | |
| type_builder & | property (string_view name, U T::*member) |
| 添加属性 | |
| template<typename Ret, typename... Args> | |
| type_builder & | function (string_view name, Ret(T::*func)(Args...)) |
| 添加成员函数 | |
| template<typename Ret, typename... Args> | |
| type_builder & | function (string_view name, Ret(T::*func)(Args...) const) |
| 添加常量成员函数 | |
| template<typename Ret, typename... Args> | |
| type_builder & | static_function (string_view name, Ret(*func)(Args...)) |
| 添加静态函数 | |
| type_builder & | constructor () |
| 添加默认构造函数 | |
| template<typename... Args> | |
| type_builder & | constructor () |
| 添加带参数构造函数 | |
| NEFORCE_NODISCARD meta_type & | meta () noexcept |
| 获取元数据对象 | |
| NEFORCE_NODISCARD const meta_type & | meta () const noexcept |
| 获取常量元数据对象 | |
类型反射构建器
| T | 要注册的类型 |
提供链式API用于构建类型的反射信息。 通过反射函数创建,用于注册基类、属性、函数和构造函数。
在文件 reflect.hpp 第 31 行定义.
|
inlineexplicit |
构造函数
| name | 类型名称 |
在文件 reflect.hpp 第 45 行定义.
引用了 name().
被这些函数引用 base(), base(), constructor(), function(), function(), property() , 以及 static_function().
添加基类(已解析)
| Base | 基类类型 |
在文件 reflect.hpp 第 54 行定义.
引用了 registry::instance() , 以及 type_builder().
|
inline |
|
inline |
添加带参数构造函数
| Args | 参数类型列表 |
要求类型可从Args类型列表构造。
在文件 reflect.hpp 第 167 行定义.
引用了 constructor(), is_constructible_v, vector< T, Alloc >::size() , 以及 type_builder().
|
inline |
添加默认构造函数
要求类型是默认可构造的。
在文件 reflect.hpp 第 153 行定义.
引用了 constructor(), is_default_constructible_v , 以及 type_builder().
被这些函数引用 constructor().
|
inline |
添加常量成员函数
| Ret | 返回值类型 |
| Args | 参数类型列表 |
| name | 函数名称 |
| func | 常量成员函数指针 |
在文件 reflect.hpp 第 122 行定义.
引用了 move(), name() , 以及 type_builder().
|
inline |
添加成员函数
| Ret | 返回值类型 |
| Args | 参数类型列表 |
| name | 函数名称 |
| func | 成员函数指针 |
在文件 reflect.hpp 第 104 行定义.
引用了 move(), name() , 以及 type_builder().
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
添加属性
| U | 属性类型 |
| name | 属性名称 |
| member | 成员指针 |
在文件 reflect.hpp 第 77 行定义.
引用了 move(), name(), type_builder() , 以及 type_name_v.
|
inline |
添加静态函数
| Ret | 返回值类型 |
| Args | 参数类型列表 |
| name | 函数名称 |
| func | 函数指针 |
在文件 reflect.hpp 第 140 行定义.
引用了 move(), name() , 以及 type_builder().