AuboStudio SDK 0.6.3

global_variable.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_GLOBAL_VARIABLE_H
2 #define AUBO_SCOPE_GLOBAL_VARIABLE_H
3
4 #include <aubo_caps/domain/variable/variable.h>
5
6 namespace arcs {
7 namespace aubo_scope {
8 ARCS_CLASS_FORWARD(GlobalVariable);
9
10 /**
11 * Global variables are available everywhere in a program.
12 */
13 class ARCS_ABI_EXPORT GlobalVariable : public Variable
14 {
15 public:
16 GlobalVariable(GlobalVariable &f);
17 GlobalVariable(GlobalVariable &&f);
18 virtual ~GlobalVariable();
19
20 protected:
21 GlobalVariable();
22
23 private:
24 friend class DataSwitch;
25 void *d_{ nullptr };
26 };
27
28 struct GlobalVariableFilter
29 {
30 bool operator()(VariablePtr var)
31 {
32 return std::dynamic_pointer_cast<GlobalVariable>(var) != nullptr &&
33 var->getType() == Variable::GLOBAL;
34 }
35 };
36
37 } // namespace aubo_scope
38 } // namespace arcs
39
40 #endif // AUBO_SCOPE_GLOBAL_VARIABLE_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::GlobalVariable
Global variables are available everywhere in a program.
Definition: global_variable.h:14
arcs::aubo_scope::GlobalVariable::GlobalVariable
GlobalVariable(GlobalVariable &f)
arcs::aubo_scope::GlobalVariable::GlobalVariable
GlobalVariable(GlobalVariable &&f)
arcs::aubo_scope::GlobalVariable::GlobalVariable
GlobalVariable()
arcs::aubo_scope::GlobalVariable::~GlobalVariable
virtual ~GlobalVariable()
arcs::aubo_scope::Variable
Definition: variable.h:17
arcs::aubo_scope::Variable::GLOBAL
@ GLOBAL
Definition: variable.h:37
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
arcs::aubo_scope::GlobalVariableFilter
Definition: global_variable.h:29
arcs::aubo_scope::GlobalVariableFilter::operator()
bool operator()(VariablePtr var)
Definition: global_variable.h:30
variable.h