|
| | meta_type (string_view name, reflect::type_id id, size_t size) |
| | 构造函数
|
|
reflect::type_id | type_id () const noexcept |
| | 获取类型ID
|
|
string_view | name () const noexcept |
| | 获取类型名称
|
| string_view | table_name () const noexcept |
| | 获取数据库表名
|
| meta_type & | set_table_name (string_view table) |
| | 设置数据库表名
|
|
size_t | size () const noexcept |
| | 获取类型大小
|
|
const vector< meta_type * > & | base_types () const |
| | 获取基类列表
|
| meta_type & | base_type (meta_type *base) |
| | 添加基类(已解析)
|
| meta_type & | base_type (string_view base_name) |
| | 添加基类(延迟解析)
|
| bool | is_derived_from (reflect::type_id base_id) const |
| | 检查是否派生自指定类型
|
| bool | is_derived_from (string_view base_name) const |
| | 检查是否派生自指定类型
|
| meta_type & | property (string_view name, reflect::type_id prop_type_id, meta_property::getter getter, meta_property::setter setter, const uint16_t attrs=PROP_NONE) |
| | 添加属性
|
| meta_function * | function (string_view name, meta_function::invoker invoker) |
| | 添加函数
|
| meta_type & | constructor (constructor_func ctor) |
| | 设置构造函数
|
| meta_type & | cloner (clone_func cloner) |
| | 设置克隆函数
|
| meta_any | clone (const void *src) const |
| | 克隆对象
|
| const meta_enum * | enum_info () const noexcept |
| | 获取枚举信息
|
|
bool | is_enum () const noexcept |
| | 是否为枚举类型
|
| meta_type & | enum_info (unique_ptr< meta_enum > info) |
| | 设置枚举信息
|
|
container_kind | container () const noexcept |
| | 获取容器类型
|
| meta_type & | container (container_kind kind) |
| | 设置容器信息
|
|
reflect::type_id | element_type_id () const noexcept |
| | 获取元素类型 ID(顺序容器)
|
|
meta_type & | element_type_id (reflect::type_id id) |
| | 设置元素类型 ID
|
|
reflect::type_id | key_type_id () const noexcept |
| | 获取键类型 ID(关联容器)
|
|
meta_type & | key_type_id (reflect::type_id id) |
| | 设置键类型 ID
|
|
reflect::type_id | mapped_type_id () const noexcept |
| | 获取值类型 ID(关联容器)
|
|
meta_type & | mapped_type_id (reflect::type_id id) |
| | 设置值类型 ID
|
|
meta_type & | container_size (container_size_func func) |
| | 设置容器大小查询函数
|
| size_t | container_element_count (const void *container_ptr) const |
| | 获取容器元素数量
|
|
meta_type & | container_get (container_get_func func) |
| | 设置按索引获取元素的函数
|
| meta_any | container_element_at (const void *container_ptr, size_t index) const |
| | 获取容器中指定索引的元素
|
|
meta_type & | container_insert (container_insert_func func) |
| | 设置插入元素函数(顺序容器)
|
|
void | container_push_back (void *container_ptr, const meta_any &value) const |
| | 向容器追加元素
|
|
meta_type & | container_insert_kv (container_insert_kv_func func) |
| | 设置插入键值对函数(关联容器)
|
|
void | container_insert_pair (void *container_ptr, const meta_any &key, const meta_any &value) const |
| | 向关联容器插入键值对
|
|
bool | is_container () const noexcept |
| | 是否为容器类型
|
| const meta_property * | get_property (string_view name) const |
| | 获取属性
|
| const meta_function * | get_function (string_view name) const |
| | 获取函数
|
| meta_type & | register_signal (string_view name) |
| | 注册信号名称
|
|
const vector< string > & | signal_names () const noexcept |
| | 获取信号名称列表
|
| void | add_property (string_view name, unique_ptr< meta_property > prop) |
| | 运行时添加属性(动态属性)
|
| meta_any | create () const |
| | 创建对象(无参构造)
|
| meta_any | create (const vector< meta_any > &args) const |
| | 创建对象(带参数)
|
| const auto & | properties () const |
| | 获取属性映射
|
| const auto & | functions () const |
| | 获取函数映射
|
| vector< pair< string, const meta_property * > > | all_properties () const |
| | 获取所有属性(包括继承的属性)
|
| vector< pair< string, const meta_function * > > | all_functions () const |
| | 获取所有函数(包括继承的函数)
|
| void | resolve_bases (registry *registry) |
| | 解析待解析的基类名称
|
| void | resolve_bases_unlocked (registry *registry) |
| | 解析待解析的基类名称(无需加锁版本)
|
|
bool | has_pending_bases () const noexcept |
| | 是否有待解析的基类
|