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
7 #include <aubo_caps/domain/variable/variable.h>
8 #include <aubo_caps/domain/feature/feature.h>
9 #include <aubo_caps/domain/waypoint/waypoint.h>
10 #include <aubo_caps/domain/io/io.h>
11
12 namespace arcs {
13 namespace aubo_scope {
14 ARCS_CLASS_FORWARD(Expression);
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 */
25 class ARCS_ABI_EXPORT Expression
26 {
27 public:
28 Expression(Expression &f);
29 Expression(Expression &&f);
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
78 private:
79 friend class DataSwitch;
80 Expression();
81 void *d_{ nullptr };
82 };
83
84 } // namespace aubo_scope
85 } // namespace arcs
86 #endif // AUBO_SCOPE_EXPRESSION_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::Expression
Definition: expression.h:26
arcs::aubo_scope::Expression::toString
std::string toString()
arcs::aubo_scope::Expression::appendWaypoint
void appendWaypoint(WaypointPtr waypoint)
Append a waypoint to the expression.
arcs::aubo_scope::Expression::~Expression
virtual ~Expression()
arcs::aubo_scope::Expression::Expression
Expression(Expression &f)
arcs::aubo_scope::Expression::Expression
Expression()
arcs::aubo_scope::Expression::append
void append(const std::string &expressionPart)
Append a string part of the expression.
arcs::aubo_scope::Expression::appendVariable
void appendVariable(VariablePtr variable)
Append a variable object to the expression.
arcs::aubo_scope::Expression::Expression
Expression(Expression &&f)
arcs::aubo_scope::Expression::appendIo
void appendIo(IoPtr io)
Append an I/O object to the expression.
arcs::aubo_scope::Expression::appendFeature
void appendFeature(FeaturePtr feature)
Append a Feature object to the expression.
feature.h
io.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
variable.h
waypoint.h