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

#include <Property.hpp>

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

Public 类型

enum  EPropertyFlag { eReadable = 0x01 , eWritable = 0x02 }
 

Public 成员函数

 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
 
- 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 成员函数

A_ALWAYS_INLINE errc_t getValue (void *container, void *value)
 
A_ALWAYS_INLINE errc_t setValue (void *container, const void *value)
 

Protected 属性

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

详细描述

反射属性类

成员枚举类型说明

◆ EPropertyFlag

属性标志位

枚举值
eReadable 

可读属性

eWritable 

可写属性

成员函数说明

◆ accept()

virtual errc_t ast::Property::accept ( PropertyVisitor & visitor,
const void * container )
pure virtual

接受访问者

参数
visitor访问者对象
container容器对象指针
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyObject, ast::PropertyPOD, ast::PropertyQuantity, ast::PropertyString, ast::PropertyStruct , 以及 ast::PropertyTimePoint 内被实现.

◆ getValue()

A_ALWAYS_INLINE errc_t ast::Property::getValue ( void * container,
void * value )
inlineprotected

获取属性值

参数
container容器对象指针
value指向void类型变量的指针,用于存储属性值
返回
errc_t 错误码

◆ getValueBool()

virtual errc_t ast::Property::getValueBool ( const void * container,
bool & value )
pure virtual

获取属性值(bool类型)

参数
container容器对象指针
value指向bool类型变量的引用,用于存储属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ getValueDouble()

virtual errc_t ast::Property::getValueDouble ( const void * container,
double & value )
pure virtual
参数
container容器对象指针
value指向double类型变量的引用,用于存储属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ getValueInt()

virtual errc_t ast::Property::getValueInt ( const void * container,
int & value )
pure virtual

获取属性值(int类型)

参数
container容器对象指针
value指向int类型变量的引用,用于存储属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ getValueString()

virtual errc_t ast::Property::getValueString ( const void * container,
std::string & value )
pure virtual

获取属性值(String类型)

参数
container容器对象指针
value指向std::string类型变量的引用,用于存储属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyQuantity, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ setValue()

A_ALWAYS_INLINE errc_t ast::Property::setValue ( void * container,
const void * value )
inlineprotected

设置属性值

参数
container容器对象指针
value指向void类型变量的指针,用于设置属性值
返回
errc_t 错误码

◆ setValueBool()

virtual errc_t ast::Property::setValueBool ( void * container,
bool value )
pure virtual

设置属性值(bool类型)

参数
container容器对象指针
valuebool类型变量,用于设置属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ setValueDouble()

virtual errc_t ast::Property::setValueDouble ( void * container,
double value )
pure virtual

设置属性值(double类型)

参数
container容器对象指针
valuedouble类型变量,用于设置属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ setValueInt()

virtual errc_t ast::Property::setValueInt ( void * container,
int value )
pure virtual

设置属性值(int类型)

参数
container容器对象指针
valueint类型变量,用于设置属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.

◆ setValueString()

virtual errc_t ast::Property::setValueString ( void * container,
StringView value )
pure virtual

设置属性值(String类型)

参数
container容器对象指针
valueStringView类型变量,用于设置属性值
返回
errc_t 错误码

ast::PropertyBool, ast::PropertyDouble, ast::PropertyInt, ast::PropertyNoop, ast::PropertyQuantity, ast::PropertyString , 以及 ast::PropertyTimePoint 内被实现.


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