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
11/**
12 * @ingroup ApplicationApi
13 * @brief The Variable class
14 */
15
17{
18public:
21 virtual ~Variable();
22
23 /**
24 * The variable type used to determine which type of variable this instance
25 * is.
26 */
27 enum Type : int
28 {
29
30 /**
31 * <p>
32 * GLOBAL means that the variable is available everywhere in a program.
33 * </p>
34 *
35 * This variable instance can be cast to {@link GlobalVariable}.
36 */
38
39 /**
40 * <p>
41 * VALUE_PERSISTED means that the variable is stored with the
42 * installation. These variables are defined in the installation and
43 * will retain their values even when a robot is turned off and on.
44 * </p>
45 *
46 * This variable instance can be cast to {@link ValuePersistedVariable}.
47 */
49
50 /**
51 * <p>
52 * FEATURE means that a Feature is marked as a variable. The variable is
53 * defined in the installation and will exist even when a robot is
54 * turned off and on.
55 * </p>
56 *
57 * This variable instance can be cast to {@link FeatureVariable}.
58 */
60 };
61
62 /**
63 * @ingroup Variable
64 * @return the type of variable.
65 */
67
68 /**
69 * @ingroup Variable
70 * Note: The variable can be renamed at any time.
71 *
72 * @return the display name of the variable.
73 */
74 std::string getDisplayName();
75
76 /**
77 * @ingroup Variable
78 * @return true if object references the same internal Variable.
79 */
80 bool equals(VariablePtr object);
81
82 /**
83 * @ingroup Variable
84 * @return hashCode for this object.
85 */
86 size_t hashCode();
87
88 /**
89 * @ingroup Variable
90 * @return a string representation of the variable.
91 */
92 std::string toString();
93
94protected:
96
97private:
98 friend class DataSwitch;
99 void *d_{ nullptr };
100};
101
102} // namespace aubo_scope
103} // namespace arcs
104#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)