AuboStudio SDK  0.6.3
expression.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_EXPRESSION_H
2#define AUBO_SCOPE_EXPRESSION_H
3
4#include <string>
5#include <vector>
6
11
12namespace arcs {
13namespace aubo_scope {
15
16/**
17 * \chinese
18 * 表达式
19 * 表达式可用于配置各种内置程序节点,例如 If 和 Wait 节点。表达式通常是条件表达式
20 *(计算结果为 true 或 false)。
21 *
22 * 表达式通过 {@link ExpressionBuilder} 接口构建。
23 * \endchinese
24 * \english
25 * Expression
26 * An expression can be used for, e.g. configuration of various built-in program
27 * nodes, such as If and Wait nodes. Expressions are typically conditional
28 * expressions (which evaluates to true or false).
29 *
30 * An Expression is built using the {@link ExpressionBuilder} interface.
31 * \endenglish
32 */
34{
35public:
38 virtual ~Expression();
39
40 std::string toString();
41
42 /**
43 * \chinese
44 * 向表达式追加字符串部分。
45 * @param expressionPart 要追加的表达式部分。
46 * \endchinese
47 * \english
48 * Append a string part of the expression.
49 * @param expressionPart the expression part to be appended.
50 * \endenglish
51 */
52 void append(const std::string &expressionPart);
53
54 /**
55 * \chinese 向表达式追加变量对象。 \endchinese
56 * \english Append a variable object to the expression. @param variable the variable. \endenglish
57 */
58 void appendVariable(VariablePtr variable);
59
60 /**
61 * \chinese 向表达式追加特征对象。 \endchinese
62 * \english Append a Feature object to the expression. @param feature the Feature. \endenglish
63 */
64 void appendFeature(FeaturePtr feature);
65
66 /**
67 * \chinese 向表达式追加路点对象。 \endchinese
68 * \english Append a waypoint to the expression. @param waypoint the waypoint. \endenglish
69 */
70 void appendWaypoint(WaypointPtr waypoint);
71
72 /**
73 * \chinese 向表达式追加I/O对象。 \endchinese
74 * \english Append an I/O object to the expression. @param io the I/O. \endenglish
75 */
76 void appendIo(IoPtr io);
77
78private:
79 friend class DataSwitch;
81 void *d_{ nullptr };
82};
83
84} // namespace aubo_scope
85} // namespace arcs
86#endif // AUBO_SCOPE_EXPRESSION_H
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
\chinese 表达式 表达式可用于配置各种内置程序节点,例如 If 和 Wait 节点。表达式通常是条件表达式 (计算结果为 true 或 false)。
void appendWaypoint(WaypointPtr waypoint)
\chinese 向表达式追加路点对象。 \endchinese \english Append a waypoint to the expression.
void append(const std::string &expressionPart)
\chinese 向表达式追加字符串部分。
void appendVariable(VariablePtr variable)
\chinese 向表达式追加变量对象。 \endchinese \english Append a variable object to the expression.
void appendIo(IoPtr io)
\chinese 向表达式追加I/O对象。 \endchinese \english Append an I/O object to the expression.
void appendFeature(FeaturePtr feature)
\chinese 向表达式追加特征对象。 \endchinese \english Append a Feature object to the expression.