AuboCaps  0.6.0
expression.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_EXPRESSION_H
2 #define AUBO_SCOPE_EXPRESSION_H
3 
4 #include <string>
5 #include <vector>
6 
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  */
26 {
27 public:
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_CLASS_FORWARD(GripForceCapability)
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16