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 * <p>
18 * An expression can be used for, e.g. configuration of various built-in program
19 * nodes, such as If and Wait nodes. Expressions are typically conditional
20 * expressions (which evaluates to true or false).
21 * </p>
22 *
23 * An Expression is built using the {@link ExpressionBuilder} interface.
24 */
26{
27public:
30 virtual ~Expression();
31
32 std::string toString();
33
34 /**
35 * Append a string part of the expression. This can be anything that is
36 * valid in an expression or even the full expression if it does not contain
37 * references to any entities (such as variables and features among others).
38 *
39 * @param expressionPart the expression part to be appended.
40 * @return the ExpressionBuilder
41 */
42 void append(const std::string &expressionPart);
43
44 /**
45 * Append a variable object to the expression.
46 *
47 * @param variable the variable to append.
48 * @return the ExpressionBuilder
49 */
50 void appendVariable(VariablePtr variable);
51
52 /**
53 * Append a Feature object to the expression. When this part is evaluated
54 * the pose of the Feature is used.
55 *
56 * @param feature the Feature to append
57 * @return the ExpressionBuilder
58 */
59 void appendFeature(FeaturePtr feature);
60
61 /**
62 * Append a waypoint to the expression. When this part is evaluated the pose
63 * of the waypoint is used.
64 *
65 * @param waypoint the waypoint to append
66 * @return the ExpressionBuilder
67 */
68 void appendWaypoint(WaypointPtr waypoint);
69
70 /**
71 * Append an I/O object to the expression.
72 *
73 * @param io the I/O to append.
74 * @return the ExpressionBuilder
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...
void appendWaypoint(WaypointPtr waypoint)
Append a waypoint to the expression.
void append(const std::string &expressionPart)
Append a string part of the expression.
void appendVariable(VariablePtr variable)
Append a variable object to the expression.
void appendIo(IoPtr io)
Append an I/O object to the expression.
void appendFeature(FeaturePtr feature)
Append a Feature object to the expression.