🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
MockObject.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/Object.hpp"
25
26AST_NAMESPACE_BEGIN
27
33class AST_MOCK_API MockObject: public Object
34{
35public:
36 AST_OBJECT(MockObject)
37 MockObject() = default;
38 ~MockObject() = default;
39PROPERTIES:
40 length_d x() const { return x_; }
41 void setX(length_d x) { x_ = x; }
42 time_d duration() const { return duration_; }
43 void setDuration(time_d duration) { duration_ = duration; }
44 double factor() const { return factor_; }
45 void setFactor(double factor) { factor_ = factor; }
46private:
47 length_d x_{0.0};
48 time_d duration_{0.0};
49 double factor_{1.0};
50};
51
54AST_NAMESPACE_END
定义 MockObject.hpp:34
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:81