Psyllid  v1.12.4
Project 8 Data Acquisisition Software
control_access.hh
Go to the documentation of this file.
1 /*
2  * control_access.hh
3  *
4  * Created on: Feb 23, 2016
5  * Author: nsoblath
6  */
7 
8 #ifndef PSYLLID_CONTROL_ACCESS_HH_
9 #define PSYLLID_CONTROL_ACCESS_HH_
10 
11 #include <memory>
12 
13 namespace psyllid
14 {
15  class daq_control;
16 
27  {
28  public:
29  typedef std::shared_ptr< daq_control > dc_ptr_t;
30 
31  public:
33  virtual ~control_access();
34 
35  static void set_daq_control( std::weak_ptr< daq_control > a_daq_control );
36 
37  protected:
38  static std::weak_ptr< daq_control > f_daq_control;
39 
40  dc_ptr_t use_daq_control() {return control_access::f_daq_control.lock();}
41 
43  };
44 
45 } /* namespace psyllid */
46 
47 #endif /* PSYLLID_CONTROL_ACCESS_HH_ */
static std::weak_ptr< daq_control > f_daq_control
Gives other classes access to daq_control.
static void set_daq_control(std::weak_ptr< daq_control > a_daq_control)
std::shared_ptr< daq_control > dc_ptr_t