🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::PropertyNamedVector类 参考

#include <PropertyNamedVector.hpp>

+ 类 ast::PropertyNamedVector 继承关系图:

Public 成员函数

 PropertyNamedVector (FPropertyGetItemByString getterByString, FPropertyGetItemByIndex getterByIndex)
 
errc_t getItem (const void *container, StringView key, Object *&value)
 
errc_t getItem (const void *container, size_t key, Object *&value)
 
- Public 成员函数 继承自 ast::Property
 Property (StringView name, StringView desc, FPropertyGet getter, FPropertySet setter)
 
 Property (FPropertyGet getter, FPropertySet setter)
 
virtual errc_t accept (PropertyVisitor &visitor, const void *container)=0
 
virtual errc_t getValueDouble (const void *container, double &value)=0
 
virtual errc_t setValueDouble (void *container, double value)=0
 
virtual errc_t getValueInt (const void *container, int &value)=0
 
virtual errc_t setValueInt (void *container, int value)=0
 
virtual errc_t getValueBool (const void *container, bool &value)=0
 
virtual errc_t setValueBool (void *container, bool value)=0
 
virtual errc_t getValueString (const void *container, std::string &value)=0
 
virtual errc_t setValueString (void *container, StringView value)=0
 
virtual EValueType getValueType () const =0
 
double getValueDouble (const void *container)
 
int getValueInt (const void *container)
 
bool getValueBool (const void *container)
 
std::string getValueString (const void *container)
 
template<typename T >
getValue (const void *container)
 
bool isObject () const
 
errc_t setValueObject (void *container, Object *value)
 
errc_t getValueObject (const void *container, Object *&value)
 
bool readOnly () const
 
bool writeOnly () const
 
template<>
double getValue (const void *container)
 
template<>
int getValue (const void *container)
 
template<>
bool getValue (const void *container)
 
- Public 成员函数 继承自 ast::Field
 Field (StringView name, StringView desc="")
 
const std::string & name () const
 
void setName (StringView name)
 
const std::string & desc () const
 
void setDesc (StringView desc)
 

Protected 属性

FPropertyGetItemByString getterByString_
 
FPropertyGetItemByIndex getterByIndex_
 
- Protected 属性 继承自 ast::Property
FPropertyGet getter_ {nullptr}
 
FPropertySet setter_ {nullptr}
 
- Protected 属性 继承自 ast::Field
std::string name_
 
std::string desc_
 

额外继承的成员函数

- Public 类型 继承自 ast::Property
enum  EPropertyFlag { eReadable = 0x01 , eWritable = 0x02 }
 
- Protected 成员函数 继承自 ast::Property
A_ALWAYS_INLINE errc_t getValue (void *container, void *value)
 
A_ALWAYS_INLINE errc_t setValue (void *container, const void *value)
 

详细描述

命名向量属性

构造及析构函数说明

◆ PropertyNamedVector()

ast::PropertyNamedVector::PropertyNamedVector ( FPropertyGetItemByString getterByString,
FPropertyGetItemByIndex getterByIndex )
inline

构造函数

参数
getterByString获取属性值的函数指针,用于根据属性键获取属性值
getterByIndex获取属性值的函数指针,用于根据属性索引获取属性值

成员函数说明

◆ getItem() [1/2]

errc_t ast::PropertyNamedVector::getItem ( const void * container,
size_t key,
Object *& value )

获取属性值

参数
container容器指针
key属性索引
value属性值

◆ getItem() [2/2]

errc_t ast::PropertyNamedVector::getItem ( const void * container,
StringView key,
Object *& value )

获取属性值

参数
container容器指针
key属性键
value属性值

该类的文档由以下文件生成: