AuboCaps
0.5.0
Main Page
Namespaces
Classes
Files
File List
File Members
include
aubo_caps
domain
variable
persisted_variable.h
Go to the documentation of this file.
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
* This interface represents variables stored with the installation. These
12
* variables are defined in the installation and will exist even when a robot is
13
* turned off and on.
14
*/
15
class
ARCS_ABI_EXPORT
PersistedVariable
:
public
Variable
16
{
17
public
:
18
PersistedVariable
(
PersistedVariable
&f);
19
PersistedVariable
(
PersistedVariable
&&f);
20
virtual
~
PersistedVariable
();
21
22
/**
23
* A persisted variable can not be guaranteed to be present. This method can
24
* be used to determine, if the variable is present.
25
*
26
*The persisted variable will not be present, if the end user loads a
27
*different installation which does not contain the variable, or if the
28
*variable is deleted by the end user.
29
*
30
* A program node storing a <code>PersistedVariable</code> in its Data
31
*Model will be undefined if the variable cannot be resolved (i.e. the
32
*variable is not present).
33
*
34
* @return <code>true</code>, if this persisted variable is resolvable (i.e.
35
* present in the current installation).
36
*/
37
bool
isResolvable();
38
39
private
:
40
friend
class
DataSwitch;
41
PersistedVariable
();
42
void
*d_{
nullptr
};
43
};
44
45
struct
PersistedVariableFilter
46
{
47
bool
operator()
(VariablePtr var)
48
{
49
return
std::dynamic_pointer_cast<
PersistedVariable
>(var) !=
nullptr
&&
50
var->
getType
() ==
Variable::VALUE_PERSISTED
;
51
}
52
};
53
54
}
// namespace aubo_scope
55
}
// namespace arcs
56
#endif // AUBO_SCOPE_PERSISTED_VARIABLE_H
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs::aubo_scope::Variable
Definition:
variable.h:11
arcs::aubo_scope::PersistedVariableFilter
Definition:
persisted_variable.h:45
arcs::aubo_scope::PersistedVariableFilter::operator()
bool operator()(VariablePtr var)
Definition:
persisted_variable.h:47
arcs::aubo_scope::PersistedVariable
This interface represents variables stored with the installation.
Definition:
persisted_variable.h:15
arcs::aubo_scope::Variable::VALUE_PERSISTED
Definition:
variable.h:43
arcs::aubo_scope::Variable::getType
Type getType()
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition:
class_forward.h:16
variable.h
arcs
Definition:
contribution_provider.h:7
Generated by
1.8.11