DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
config_reference_copy.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4// Renamed since fork: yes (from dbe/config_reference_copy.hpp to include/dbe/config_reference_copy.hpp).
5
6/************************************************************
7 * config_reference_copy.hpp
8 *
9 * Created on: Feb 4, 2016
10 * Author: Leonidas Georgopoulos
11 ************************************************************/
12
13#ifndef DBE_CONFIG_REFERENCE_COPY_HPP_
14#define DBE_CONFIG_REFERENCE_COPY_HPP_
15
18
19#include <functional>
20
21namespace dbe
22{
23
24namespace inner
25{
26
27namespace configobject
28{
29
30//------------------------------------------------------------------------------------------
37template<typename T = config_object_linker> class aref: ref_interface<aref<T>>
38{
39private:
40 // A reference to the current reference in the database, which may have been removed
42
43 // The copy of the object
45
46 const tref & ref() const
47 {
48 return this_object_ref;
49 }
50
51public:
52 aref ( tref const & o )
53 : this_object_ref ( o ),
55 {
56 }
57
58 friend class ref_interface<aref> ;
59 friend class inner::dbcontroller;
60};
61//------------------------------------------------------------------------------------------
62
63//------------------------------------------------------------------------------------------
72template<typename T = config_object_linker> class gref
73{
74public:
75 typedef T t_extractor;
76 typedef std::function<void ( dref const ) > config_action_notifiable;
77
83 bool is_null() const;
84
93
94private:
95 typedef std::deque<t_extractor> type_extractor_stack;
96 typedef std::vector<dbe::tref> type_ref_container;
97
98
106
112 void record ( tref const & obj );
113
117 void post();
118
119
122
124};
125//------------------------------------------------------------------------------------------
126
127} // namespace configobject
128
129} // namespace inner
130
131} // namespace dbe
132
133#endif /* DBE_CONFIG_REFERENCE_COPY_HPP_ */
void record(tref const &obj)
std::function< void(dref const) > config_action_notifiable
std::deque< t_extractor > type_extractor_stack
std::vector< dbe::tref > type_ref_container
void notify(config_action_notifiable tele)
friend class dbe::inner::configobject::tref
Include QT Headers.
config_object_description dref