🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
Struct.hpp
浏览该文件的文档.
1
20
21
#pragma once
22
23
#include "AstGlobal.h"
24
#include "
Field.hpp
"
25
#include <unordered_map>
26
#include <vector>
27
28
29
AST_NAMESPACE_BEGIN
30
31
class
Property;
32
36
class
AST_UTIL_API
Struct
:
public
Field
37
{
38
public
:
39
using
Field::Field;
40
41
~Struct
()
override
;
42
43
// @todo: 考虑使用StringView作为索引
44
using
PropertyMap = std::unordered_map<std::string, Property*>;
45
using
PropertyList = std::vector<Property*>;
46
47
Property
* addProperty(
StringView
name,
Property
* property);
48
52
Property
* addProperty(
Property
* property);
53
57
Property
* getProperty(
StringView
name);
58
61
const
PropertyList&
getProperties
()
const
{
return
properties_;}
62
65
std::string getModuleName()
const
;
66
67
protected
:
68
PropertyList properties_;
69
PropertyMap propertyMap_;
70
};
71
72
73
74
AST_NAMESPACE_END
Field.hpp
~
ast::Field
反射字段类
定义
Field.hpp:34
ast::Property
反射属性类
定义
Property.hpp:58
ast::StringViewBasic< char >
ast::Struct
结构体类
定义
Struct.hpp:37
ast::Struct::getProperties
const PropertyList & getProperties() const
获取属性列表
定义
Struct.hpp:61
src
AstUtil
RTTI
Reflect
Struct.hpp
制作者
1.12.0