AuboCaps  0.6.0
variable.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_VARIABLE_H
2 #define AUBO_SCOPE_VARIABLE_H
3 
4 #include <string>
6 
7 namespace arcs {
8 namespace aubo_scope {
9 ARCS_CLASS_FORWARD(Variable);
10 
12 {
13 public:
14  Variable(Variable &f);
15  Variable(Variable &&f);
16  virtual ~Variable();
17 
18  /**
19  * The variable type used to determine which type of variable this instance
20  * is.
21  */
22  enum Type : int
23  {
24 
25  /**
26  * <p>
27  * GLOBAL means that the variable is available everywhere in a program.
28  * </p>
29  *
30  * This variable instance can be cast to {@link GlobalVariable}.
31  */
33 
34  /**
35  * <p>
36  * VALUE_PERSISTED means that the variable is stored with the
37  * installation. These variables are defined in the installation and
38  * will retain their values even when a robot is turned off and on.
39  * </p>
40  *
41  * This variable instance can be cast to {@link ValuePersistedVariable}.
42  */
44 
45  /**
46  * <p>
47  * FEATURE means that a Feature is marked as a variable. The variable is
48  * defined in the installation and will exist even when a robot is
49  * turned off and on.
50  * </p>
51  *
52  * This variable instance can be cast to {@link FeatureVariable}.
53  */
54  FEATURE
55  };
56 
57  /**
58  * @return the type of variable.
59  */
60  Type getType();
61 
62  /**
63  * Note: The variable can be renamed at any time.
64  *
65  * @return the display name of the variable.
66  */
67  std::string getDisplayName();
68 
69  /**
70  * @return true if object references the same internal Variable.
71  */
72  bool equals(VariablePtr object);
73 
74  /**
75  * @return hashCode for this object.
76  */
77  size_t hashCode();
78 
79  /**
80  * @return a string representation of the variable.
81  */
82  std::string toString();
83 
84 protected:
85  Variable();
86 
87 private:
88  friend class DataSwitch;
89  void *d_{ nullptr };
90 };
91 
92 } // namespace aubo_scope
93 } // namespace arcs
94 #endif // AUBO_SCOPE_VARIABLE_H
ARCS_CLASS_FORWARD(GripForceCapability)
Type
The variable type used to determine which type of variable this instance is.
Definition: variable.h:22
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16