AuboStudio SDK
0.6.3
persisted_variable.h
浏览该文件的文档.
1
#ifndef AUBO_SCOPE_PERSISTED_VARIABLE_H
2
#define AUBO_SCOPE_PERSISTED_VARIABLE_H
3
4
#include <
aubo_caps/domain/variable/variable.h
>
5
6
namespace
arcs
{
7
namespace
aubo_scope
{
8
ARCS_CLASS_FORWARD
(
PersistedVariable
);
9
10
/**
11
* ingroup ApplicationApi
12
* This interface represents variables stored with the installation. These
13
* variables are defined in the installation and will exist even when a robot is
14
* turned off and on.
15
*/
16
class
ARCS_ABI_EXPORT
PersistedVariable
:
public
Variable
17
{
18
public
:
19
PersistedVariable
(
PersistedVariable
&f);
20
PersistedVariable
(
PersistedVariable
&&f);
21
virtual
~PersistedVariable
();
22
23
/**
24
* @ingroup PersistedVariable
25
* \chinese
26
* 持久化变量无法保证始终存在。当终端用户加载不包含该变量的不同安装或删除该变量时,
27
* 持久化变量将不可用。如果变量无法解析,存储了PersistedVariable的程序节点将变
28
* 为未定义。
29
* @return 如果持久化变量可解析(即存在于当前安装中)返回<code>true</code>。
30
* \endchinese
31
* \english
32
* A persisted variable can not be guaranteed to be present. This method can
33
* be used to determine, if the variable is present.
34
*
35
* The persisted variable will not be present, if the end user loads a
36
* different installation which does not contain the variable, or if the
37
* variable is deleted by the end user.
38
*
39
* A program node storing a <code>PersistedVariable</code> in its Data
40
* Model will be undefined if the variable cannot be resolved (i.e. the
41
* variable is not present).
42
*
43
* @return <code>true</code>, if this persisted variable is resolvable (i.e.
44
* present in the current installation).
45
* \endenglish
46
*/
47
bool
isResolvable
();
48
49
protected
:
50
PersistedVariable
();
51
52
private
:
53
friend
class
DataSwitch
;
54
void
*
d_
{
nullptr
};
55
};
56
57
struct
PersistedVariableFilter
58
{
59
bool
operator()
(VariablePtr var)
60
{
61
return
std::dynamic_pointer_cast<PersistedVariable>(var) !=
nullptr
&&
62
var->getType() ==
Variable::VALUE_PERSISTED
;
63
}
64
};
65
66
}
// namespace aubo_scope
67
}
// namespace arcs
68
#endif
// AUBO_SCOPE_PERSISTED_VARIABLE_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::PersistedVariable
ingroup ApplicationApi This interface represents variables stored with the installation.
定义
persisted_variable.h:17
arcs::aubo_scope::PersistedVariable::isResolvable
bool isResolvable()
\chinese 持久化变量无法保证始终存在。当终端用户加载不包含该变量的不同安装或删除该变量时, 持久化变量将不可用。如果变量无法解析,存储了PersistedVariable的程序节点将变 为未定义...
arcs::aubo_scope::PersistedVariable::PersistedVariable
PersistedVariable()
arcs::aubo_scope::PersistedVariable::DataSwitch
friend class DataSwitch
定义
persisted_variable.h:53
arcs::aubo_scope::PersistedVariable::d_
void * d_
定义
persisted_variable.h:54
arcs::aubo_scope::PersistedVariable::PersistedVariable
PersistedVariable(PersistedVariable &&f)
arcs::aubo_scope::PersistedVariable::~PersistedVariable
virtual ~PersistedVariable()
arcs::aubo_scope::PersistedVariable::PersistedVariable
PersistedVariable(PersistedVariable &f)
arcs::aubo_scope::Variable::VALUE_PERSISTED
@ VALUE_PERSISTED
定义
variable.h:56
arcs::aubo_scope::Variable::Variable
Variable(Variable &f)
arcs::aubo_scope
定义
contribution_provider.h:8
arcs
定义
contribution_provider.h:7
arcs::aubo_scope::PersistedVariableFilter
定义
persisted_variable.h:58
arcs::aubo_scope::PersistedVariableFilter::operator()
bool operator()(VariablePtr var)
定义
persisted_variable.h:59
variable.h
include
aubo_caps
domain
variable
persisted_variable.h
制作者
1.16.1