25#include "AstUtil/Object.hpp"
26#include <unordered_map>
47 using PropertyMap = std::unordered_map<std::string, Property*>;
48 using PropertyList = std::vector<Property*>;
51 const std::string&
getName() const final {
return name_;}
58 const std::string&
desc()
const{
return desc_;}
86 std::string getModuleName()
const;
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:86
Property * getProperty(StringView fieldName) const
获取属性元信息
定义 Object.cpp:205
PropertyList properties_
属性列表
定义 Struct.hpp:91
std::string name_
名称
定义 Struct.hpp:89
PropertyMap propertyMap_
属性映射表
定义 Struct.hpp:92
const PropertyList & getProperties() const
获取属性列表
定义 Struct.hpp:82
const std::string & desc() const
获取字段描述
定义 Struct.hpp:58
void setName(StringView name) final
设置字段名称
定义 Struct.hpp:55
std::string desc_
描述
定义 Struct.hpp:90
void setDesc(StringView desc)
设置字段描述
定义 Struct.hpp:62
const std::string & getName() const final
获取字段名称
定义 Struct.hpp:51
constexpr initial_strong_ref_t initial_strong_ref
初始化强引用计数的标记值
定义 Object.hpp:80