🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
PropertyQuantity.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/Quantity.hpp"
25#include "AstUtil/PropertyDouble.hpp"
26#include "AstUtil/Dimension.hpp"
27
28AST_NAMESPACE_BEGIN
29
39class AST_UTIL_API PropertyQuantity: public PropertyDouble
40{
41public:
42 PropertyQuantity(FPropertyGet getter, FPropertySet setter, Dimension dimension);
43 PropertyQuantity(StringView name, StringView desc, FPropertyGet getter, FPropertySet setter, Dimension dimension);
44
45 errc_t accept(PropertyVisitor& visitor, const void* container) override;
46 errc_t getValueString(const void* container, std::string& value) override;
47 errc_t setValueString(void* container, StringView value) override;
48protected:
49 Dimension dimension_{Dimension::Unit()};
50};
51
54AST_NAMESPACE_END
量纲
定义 Dimension.hpp:354
static constexpr Dimension Unit()
获取单位量纲
定义 Dimension.hpp:363
双精度浮点数属性
定义 PropertyDouble.hpp:32
errc_t setValueString(void *container, StringView value) override
设置属性值(String类型)
定义 PropertyDouble.cpp:72
errc_t getValueString(const void *container, std::string &value) override
获取属性值(String类型)
定义 PropertyDouble.cpp:61
errc_t accept(PropertyVisitor &visitor, const void *container) override
接受访问者
定义 PropertyDouble.cpp:93
数量值属性
定义 PropertyQuantity.hpp:40
定义 PropertyVisitor.hpp:44
errc_t(* FPropertySet)(void *obj, void const *value)
设置属性值的函数指针
定义 ReflectAPI.hpp:59
errc_t(* FPropertyGet)(const void *obj, void *value)
获取属性值的函数指针
定义 ReflectAPI.hpp:58