AuboCaps  0.6.0
global_variable.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_GLOBAL_VARIABLE_H
2 #define AUBO_SCOPE_GLOBAL_VARIABLE_H
3 
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  */
14 {
15 public:
18  virtual ~GlobalVariable();
19 
20 protected:
22 
23 private:
24  friend class DataSwitch;
25  void *d_{ nullptr };
26 };
27 
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_CLASS_FORWARD(GripForceCapability)
Global variables are available everywhere in a program.
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16