#include <PropertyQuantity.hpp>
|
|
| PropertyQuantity (FPropertyGet getter, FPropertySet setter, Dimension dimension) |
| |
|
| PropertyQuantity (StringView name, StringView desc, FPropertyGet getter, FPropertySet setter, Dimension dimension) |
| |
| errc_t | accept (PropertyVisitor &visitor, const void *container) override |
| |
| errc_t | getValueString (const void *container, std::string &value) override |
| |
| errc_t | setValueString (void *container, StringView value) override |
| |
| errc_t | getValueBool (const void *container, bool &value) override |
| |
| errc_t | setValueBool (void *container, bool value) override |
| |
| errc_t | getValueInt (const void *container, int &value) override |
| |
| errc_t | setValueInt (void *container, int value) override |
| |
| errc_t | getValueDouble (const void *container, double &value) override |
| |
| errc_t | setValueDouble (void *container, double value) override |
| |
|
| Property (StringView name, StringView desc, FPropertyGet getter, FPropertySet setter) |
| |
|
| Property (FPropertyGet getter, FPropertySet setter) |
| |
|
| Property ()=default |
| |
|
| Property (StringView name, StringView desc, FPropertyGet getter, FPropertySet setter) |
| |
|
| Property (FPropertyGet getter, FPropertySet setter) |
| |
|
| Field (StringView name, StringView desc="") |
| |
|
const std::string & | name () const |
| |
| void | setName (StringView name) |
| |
|
const std::string & | desc () const |
| |
| void | setDesc (StringView desc) |
| |
|
|
using | InputType = double |
| |
|
using | OutputType = double |
| |
| enum | EPropertyFlag { eReadable = 0x01
, eWritable = 0x02
} |
| |
| A_ALWAYS_INLINE errc_t | setValue (void *container, const InputType *value) |
| |
| A_ALWAYS_INLINE errc_t | getValue (const void *container, OutputType *value) |
| |
| A_ALWAYS_INLINE errc_t | getValue (void *container, void *value) |
| |
| A_ALWAYS_INLINE errc_t | setValue (void *container, const void *value) |
| |
数量值属性
数量值属性,包含属性的名称、描述等信息
◆ accept()
| errc_t ast::PropertyQuantity::accept |
( |
PropertyVisitor & | visitor, |
|
|
const void * | container ) |
|
overridevirtual |
◆ getValueString()
| errc_t ast::PropertyQuantity::getValueString |
( |
const void * | container, |
|
|
std::string & | value ) |
|
overridevirtual |
获取属性值(String类型)
- 参数
-
| container | 容器对象指针 |
| value | 指向std::string类型变量的引用,用于存储属性值 |
- 返回
- errc_t 错误码
- 待办事项
- 这里需要一个通过量纲获取国际制单位的函数
重载 ast::PropertyDouble .
◆ setValueString()
| errc_t ast::PropertyQuantity::setValueString |
( |
void * | container, |
|
|
StringView | value ) |
|
overridevirtual |
设置属性值(String类型)
- 参数
-
| container | 容器对象指针 |
| value | StringView类型变量,用于设置属性值 |
- 返回
- errc_t 错误码
重载 ast::PropertyDouble .
该类的文档由以下文件生成: