AuboStudio SDK 0.6.3

feature_variable.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_FEATURE_VARIABLE_H
2 #define AUBO_SCOPE_FEATURE_VARIABLE_H
3
4 #include <aubo_caps/domain/variable/persisted_variable.h>
5
6 namespace arcs {
7 namespace aubo_scope {
8 ARCS_CLASS_FORWARD(FeatureVariable);
9
10 /**
11 * A Feature marked as a Variable in the installation will exist even when a
12 * robot is turned off and on.
13 */
14 class ARCS_ABI_EXPORT FeatureVariable : public PersistedVariable
15 {
16 public:
17 FeatureVariable(FeatureVariable &f);
18 FeatureVariable(FeatureVariable &&f);
19 virtual ~FeatureVariable();
20
21 private:
22 friend class DataSwitch;
23 FeatureVariable();
24 void *d_{ nullptr };
25 };
26
27 struct FeatureVariableFilter
28 {
29 bool operator()(VariablePtr var)
30 {
31 return std::dynamic_pointer_cast<FeatureVariable>(var) != nullptr &&
32 var->getType() == Variable::FEATURE;
33 }
34 };
35
36 } // namespace aubo_scope
37 } // namespace arcs
38 #endif // AUBO_SCOPE_FEATURE_VARIABLE_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::FeatureVariable
A Feature marked as a Variable in the installation will exist even when a robot is turned off and on.
Definition: feature_variable.h:15
arcs::aubo_scope::FeatureVariable::~FeatureVariable
virtual ~FeatureVariable()
arcs::aubo_scope::FeatureVariable::FeatureVariable
FeatureVariable(FeatureVariable &f)
arcs::aubo_scope::FeatureVariable::FeatureVariable
FeatureVariable(FeatureVariable &&f)
arcs::aubo_scope::FeatureVariable::FeatureVariable
FeatureVariable()
arcs::aubo_scope::PersistedVariable
This interface represents variables stored with the installation.
Definition: persisted_variable.h:16
arcs::aubo_scope::Variable::FEATURE
@ FEATURE
Definition: variable.h:59
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
persisted_variable.h
arcs::aubo_scope::FeatureVariableFilter
Definition: feature_variable.h:28
arcs::aubo_scope::FeatureVariableFilter::operator()
bool operator()(VariablePtr var)
Definition: feature_variable.h:29