AuboStudio SDK  0.6.3
variable.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_VARIABLE_H
2#define AUBO_SCOPE_VARIABLE_H
3
4#include <string>
6
7namespace arcs {
8namespace aubo_scope {
10
12{
13public:
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 */
55 };
56
57 /**
58 * @return the type of variable.
59 */
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
84protected:
86
87private:
88 friend class DataSwitch;
89 void *d_{ nullptr };
90};
91
92} // namespace aubo_scope
93} // namespace arcs
94#endif // AUBO_SCOPE_VARIABLE_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...
Type
The variable type used to determine which type of variable this instance is.
std::string getDisplayName()
Note: The variable can be renamed at any time.
bool equals(VariablePtr object)