🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
ExprRange.hpp
浏览该文件的文档.
1
20
21
#pragma once
22
23
#include "AstGlobal.h"
24
#include "
Expr.hpp
"
25
#include "AstUtil/SharedPtr.hpp"
26
27
AST_NAMESPACE_BEGIN
28
29
35
class
ExprRange
:
public
Expr
36
{
37
public
:
38
AST_EXPR(
ExprRange
)
39
40
44
ExprRange
(
Expr
* start,
Expr
* stop,
Expr
* step=
nullptr
);
45
~ExprRange
()
override
=
default
;
46
49
Expr
*
start
()
const
{
return
start_.get(); }
50
53
Expr
*
stop
()
const
{
return
stop_.get(); }
54
58
Expr
*
step
()
const
{
return
step_.get(); }
59
60
63
Value
* eval()
const override
;
64
65
69
std::string getExpression(
Object
*context)
const override
;
70
71
protected
:
72
SharedPtr<Expr>
start_;
73
SharedPtr<Expr>
stop_;
74
SharedPtr<Expr>
step_;
75
};
76
77
78
AST_NAMESPACE_END
Expr.hpp
~
ast::ExprRange
范围表达式
定义
ExprRange.hpp:36
ast::ExprRange::step
Expr * step() const
获取范围的步长表达式
定义
ExprRange.hpp:58
ast::ExprRange::stop
Expr * stop() const
获取范围的结束值表达式
定义
ExprRange.hpp:53
ast::ExprRange::start
Expr * start() const
获取范围的起始值表达式
定义
ExprRange.hpp:49
ast::Expr
表达式基类
定义
Expr.hpp:39
ast::Object
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义
Object.hpp:81
ast::SharedPtr
共享指针
定义
SharedPtr.hpp:33
ast::Value
值对象基类
定义
Value.hpp:36
src
AstScript
Expression
ExprRange.hpp
制作者
1.12.0