AuboStudio SDK
0.6.3
variable.h
浏览该文件的文档.
1
#ifndef AUBO_SCOPE_VARIABLE_H
2
#define AUBO_SCOPE_VARIABLE_H
3
4
#include <string>
5
#include <
aubo_caps/class_forward.h
>
6
7
namespace
arcs
{
8
namespace
aubo_scope
{
9
ARCS_CLASS_FORWARD
(
Variable
);
10
11
/**
12
* @ingroup ApplicationApi
13
* \chinese
14
* 变量接口
15
* 表示 AuboScope 中的变量。变量可用于在程序中存储和传递数据。
16
* \endchinese
17
* \english
18
* Variable
19
* Represents a variable in AuboScope. Variables can be used to store and pass
20
* data in programs.
21
* \endenglish
22
*/
23
24
class
ARCS_ABI_EXPORT
Variable
25
{
26
public
:
27
Variable
(
Variable
&f);
28
Variable
(
Variable
&&f);
29
virtual
~Variable
();
30
31
/**
32
* The variable type used to determine which type of variable this instance
33
* is.
34
*/
35
enum
Type
:
int
36
{
37
38
/**
39
* <p>
40
* GLOBAL means that the variable is available everywhere in a program.
41
* </p>
42
*
43
* This variable instance can be cast to {@link GlobalVariable}.
44
*/
45
GLOBAL
,
46
47
/**
48
* <p>
49
* VALUE_PERSISTED means that the variable is stored with the
50
* installation. These variables are defined in the installation and
51
* will retain their values even when a robot is turned off and on.
52
* </p>
53
*
54
* This variable instance can be cast to {@link ValuePersistedVariable}.
55
*/
56
VALUE_PERSISTED
,
57
58
/**
59
* <p>
60
* FEATURE means that a Feature is marked as a variable. The variable is
61
* defined in the installation and will exist even when a robot is
62
* turned off and on.
63
* </p>
64
*
65
* This variable instance can be cast to {@link FeatureVariable}.
66
*/
67
FEATURE
68
};
69
70
/**
71
* @ingroup Variable
72
* \chinese
73
* 获取变量类型
74
* @return 变量类型枚举。
75
* \endchinese
76
* \english
77
* Returns the type of variable.
78
* @return the type of variable.
79
* \endenglish
80
*/
81
Type
getType
();
82
83
/**
84
* @ingroup Variable
85
* \chinese
86
* 获取变量显示名称。注意:变量可随时被重命名。
87
* @return 变量显示名称。
88
* \endchinese
89
* \english
90
* Note: The variable can be renamed at any time.
91
* @return the display name of the variable.
92
* \endenglish
93
*/
94
std::string
getDisplayName
();
95
96
/**
97
* @ingroup Variable
98
* \chinese
99
* 判断是否引用相同的内部变量
100
* @return 如果对象引用相同的内部变量返回true。
101
* \endchinese
102
* \english
103
* Checks if the object references the same internal Variable.
104
* @return true if object references the same internal Variable.
105
* \endenglish
106
*/
107
bool
equals
(VariablePtr
object
);
108
109
/**
110
* @ingroup Variable
111
* \chinese
112
* 获取哈希码
113
* @return 此对象的哈希码。
114
* \endchinese
115
* \english
116
* Returns the hash code for this object.
117
* @return hashCode for this object.
118
* \endenglish
119
*/
120
size_t
hashCode
();
121
122
/**
123
* @ingroup Variable
124
* \chinese
125
* 获取变量的字符串表示
126
* @return 变量的字符串表示。
127
* \endchinese
128
* \english
129
* Returns a string representation of the variable.
130
* @return a string representation of the variable.
131
* \endenglish
132
*/
133
std::string
toString
();
134
135
protected
:
136
Variable
();
137
138
private
:
139
friend
class
DataSwitch
;
140
void
*
d_
{
nullptr
};
141
};
142
143
}
// namespace aubo_scope
144
}
// namespace arcs
145
#endif
// AUBO_SCOPE_VARIABLE_H
class_forward.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
定义
class_forward.h:16
ARCS_CLASS_FORWARD
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
定义
class_forward.h:68
arcs::aubo_scope::Variable
\chinese 变量接口 表示 AuboScope 中的变量。变量可用于在程序中存储和传递数据。 \endchinese \english Variable Represents a variable...
定义
variable.h:25
arcs::aubo_scope::Variable::Variable
Variable()
arcs::aubo_scope::Variable::d_
void * d_
定义
variable.h:140
arcs::aubo_scope::Variable::getType
Type getType()
\chinese 获取变量类型
arcs::aubo_scope::Variable::Type
Type
The variable type used to determine which type of variable this instance is.
定义
variable.h:36
arcs::aubo_scope::Variable::GLOBAL
@ GLOBAL
定义
variable.h:45
arcs::aubo_scope::Variable::VALUE_PERSISTED
@ VALUE_PERSISTED
定义
variable.h:56
arcs::aubo_scope::Variable::FEATURE
@ FEATURE
定义
variable.h:67
arcs::aubo_scope::Variable::DataSwitch
friend class DataSwitch
定义
variable.h:139
arcs::aubo_scope::Variable::Variable
Variable(Variable &&f)
arcs::aubo_scope::Variable::toString
std::string toString()
\chinese 获取变量的字符串表示
arcs::aubo_scope::Variable::getDisplayName
std::string getDisplayName()
\chinese 获取变量显示名称。注意:变量可随时被重命名。
arcs::aubo_scope::Variable::hashCode
size_t hashCode()
\chinese 获取哈希码
arcs::aubo_scope::Variable::~Variable
virtual ~Variable()
arcs::aubo_scope::Variable::Variable
Variable(Variable &f)
arcs::aubo_scope::Variable::equals
bool equals(VariablePtr object)
\chinese 判断是否引用相同的内部变量
arcs::aubo_scope
定义
contribution_provider.h:8
arcs
定义
contribution_provider.h:7
include
aubo_caps
domain
variable
variable.h
制作者
1.16.1