25#include "AstUtil/Object.hpp"
26#include <unordered_map>
47 this->setReadOnly(
true);
53 using PropertyMap = std::unordered_map<std::string, Property*>;
54 using PropertyList = std::vector<Property*>;
57 const std::string&
getName() const final {
return name_;}
64 const std::string&
desc()
const{
return desc_;}
92 std::string getModuleName()
const;
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:95
Property * getProperty(StringView fieldName) const
获取属性元信息
定义 Object.cpp:213
PropertyList properties_
属性列表
定义 Struct.hpp:97
std::string name_
名称
定义 Struct.hpp:95
PropertyMap propertyMap_
属性映射表
定义 Struct.hpp:98
const PropertyList & getProperties() const
获取属性列表
定义 Struct.hpp:88
const std::string & desc() const
获取字段描述
定义 Struct.hpp:64
void setName(StringView name) final
设置字段名称
定义 Struct.hpp:61
std::string desc_
描述
定义 Struct.hpp:96
void setDesc(StringView desc)
设置字段描述
定义 Struct.hpp:68
const std::string & getName() const final
获取字段名称
定义 Struct.hpp:57
constexpr initial_strong_ref_t initial_strong_ref
初始化强引用计数的标记值
定义 Referenced.hpp:38