DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
config_reference_copy.hpp
Go to the documentation of this file.
1/************************************************************
2 * config_reference_copy.hpp
3 *
4 * Created on: Feb 4, 2016
5 * Author: Leonidas Georgopoulos
6 ************************************************************/
7
8#ifndef DBE_CONFIG_REFERENCE_COPY_HPP_
9#define DBE_CONFIG_REFERENCE_COPY_HPP_
10
13
14#include <functional>
15
16namespace dbe
17{
18
19namespace inner
20{
21
22namespace configobject
23{
24
25//------------------------------------------------------------------------------------------
32template<typename T = config_object_linker> class aref: ref_interface<aref<T>>
33{
34private:
35 // A reference to the current reference in the database, which may have been removed
37
38 // The copy of the object
40
41 const tref & ref() const
42 {
43 return this_object_ref;
44 }
45
46public:
47 aref ( tref const & o )
48 : this_object_ref ( o ),
50 {
51 }
52
53 friend class ref_interface<aref> ;
54 friend class inner::dbcontroller;
55};
56//------------------------------------------------------------------------------------------
57
58//------------------------------------------------------------------------------------------
67template<typename T = config_object_linker> class gref
68{
69public:
70 typedef T t_extractor;
71 typedef std::function<void ( dref const ) > config_action_notifiable;
72
78 bool is_null() const;
79
87 void notify ( config_action_notifiable tele );
88
89private:
90 typedef std::deque<t_extractor> type_extractor_stack;
91 typedef std::vector<dbe::tref> type_ref_container;
92
93
100 tref rebuild();
101
107 void record ( tref const & obj );
108
112 void post();
113
114
117
119};
120//------------------------------------------------------------------------------------------
121
122} // namespace configobject
123
124} // namespace inner
125
126} // namespace dbe
127
128#endif /* DBE_CONFIG_REFERENCE_COPY_HPP_ */
void record(tref const &obj)
std::function< void(dref const) > config_action_notifiable
std::vector< dbe::tref > type_ref_container
std::deque< t_extractor > type_extractor_stack
void notify(config_action_notifiable tele)
Include QT Headers.
inner::configobject::aref< config_object_linked< std::string > > aref
Definition tref.hpp:32