AuboStudio SDK 0.6.3

assignment_node.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_ASSIGNMENT_NODE_H
2 #define AUBO_SCOPE_ASSIGNMENT_NODE_H
3
4 #include <aubo_caps/domain/program/nodes/program_node.h>
5 #include <aubo_caps/domain/variable/variable.h>
6 #include <aubo_caps/domain/value/expression/expression.h>
7
8 namespace arcs {
9 namespace aubo_scope {
10 ARCS_CLASS_FORWARD(AssignmentNode);
11
12 class ARCS_ABI_EXPORT AssignmentNode : public ProgramNode
13 {
14 public:
15 /**
16 * The configuration type used to determine which type of configuration this
17 * instance is.
18 */
19 enum ConfigType
20 {
21 /**
22 * <p>
23 * Expression assignment has been selected.
24 * </p>
25 *
26 * The config instance can be cast to {@link
27 * ExpressionAssignmentNodeConfig}.
28 */
29 EXPRESSION,
30
31 /**
32 * Operator assignment has been selected. This type has no further
33 * information. Setting this type of config will be ignored and will
34 * have no effect on the node.
35 */
36 OPERATOR
37 };
38
39 enum InputMode
40 {
41 INPUT_BOOL,
42 INPUT_INTEGER,
43 INPUT_FLOAT,
44 INPUT_STRING,
45 };
46
47 AssignmentNode(AssignmentNode &f);
48 AssignmentNode(AssignmentNode &&f);
49 virtual ~AssignmentNode();
50
51 /**
52 * <p>
53 *
54 * </p>
55 * @return
56 */
57 ConfigType getConfigType();
58 void setConfigType(ConfigType type);
59
60 /**
61 *
62 * @return the variable assigned to the expression evaluation.
63 */
64 VariablePtr getVariable();
65 void setVariable(VariablePtr var);
66
67 /**
68 *
69 * @return the expression whose evaluation is assigned to the variable.
70 */
71 ExpressionPtr getExpression();
72 void setExpression(ExpressionPtr exp);
73
74 private:
75 friend class DataSwitch;
76 AssignmentNode();
77 void *d_{ nullptr };
78 };
79
80 } // namespace aubo_scope
81 } // namespace arcs
82 #endif // AUBO_SCOPE_ASSIGNMENT_NODE_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::AssignmentNode
Definition: assignment_node.h:13
arcs::aubo_scope::AssignmentNode::InputMode
InputMode
Definition: assignment_node.h:40
arcs::aubo_scope::AssignmentNode::INPUT_INTEGER
@ INPUT_INTEGER
Definition: assignment_node.h:42
arcs::aubo_scope::AssignmentNode::INPUT_STRING
@ INPUT_STRING
Definition: assignment_node.h:44
arcs::aubo_scope::AssignmentNode::INPUT_BOOL
@ INPUT_BOOL
Definition: assignment_node.h:41
arcs::aubo_scope::AssignmentNode::INPUT_FLOAT
@ INPUT_FLOAT
Definition: assignment_node.h:43
arcs::aubo_scope::AssignmentNode::getExpression
ExpressionPtr getExpression()
arcs::aubo_scope::AssignmentNode::setVariable
void setVariable(VariablePtr var)
arcs::aubo_scope::AssignmentNode::setExpression
void setExpression(ExpressionPtr exp)
arcs::aubo_scope::AssignmentNode::AssignmentNode
AssignmentNode(AssignmentNode &f)
arcs::aubo_scope::AssignmentNode::AssignmentNode
AssignmentNode(AssignmentNode &&f)
arcs::aubo_scope::AssignmentNode::ConfigType
ConfigType
The configuration type used to determine which type of configuration this instance is.
Definition: assignment_node.h:20
arcs::aubo_scope::AssignmentNode::EXPRESSION
@ EXPRESSION
Definition: assignment_node.h:29
arcs::aubo_scope::AssignmentNode::setConfigType
void setConfigType(ConfigType type)
arcs::aubo_scope::AssignmentNode::getConfigType
ConfigType getConfigType()
arcs::aubo_scope::AssignmentNode::getVariable
VariablePtr getVariable()
arcs::aubo_scope::AssignmentNode::AssignmentNode
AssignmentNode()
arcs::aubo_scope::AssignmentNode::~AssignmentNode
virtual ~AssignmentNode()
arcs::aubo_scope::ProgramNode
Definition: program_node.h:19
expression.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
program_node.h
variable.h