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