DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
JsonableTest.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _JsonableTest_0_dunedaq__confmodel_0_confmodel_H_
4#define _JsonableTest_0_dunedaq__confmodel_0_confmodel_H_
5
6#include <stdint.h> // to define 64 bits types
7#include <iostream>
8#include <sstream>
9#include <string>
10#include <map>
11#include <vector>
12
14#include "conffwk/DalObject.hpp"
15
16 // include files for classes used in inheritance hierarchy
17
19
20namespace dunedaq {
21 namespace confmodel {
22
24
25 friend class conffwk::Configuration;
26 friend class conffwk::DalObject;
27 friend class conffwk::DalFactory;
28 friend class conffwk::DalRegistry;
29
30 protected:
31
33 virtual ~JsonableTest() noexcept;
34 virtual void init(bool init_children);
35
36 public:
37
40 static const std::string& s_class_name;
41
42
52 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
53
54
64 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
65
66
67 protected:
68
69 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
70
71
72 private:
73
74 uint32_t m_this;
75 uint32_t m_that;
77
78
79 public:
80
81 // attribute names
82
83 inline static const std::string s_this = "this";
84 inline static const std::string s_that = "that";
85
86 static const std::string& __get_this_str() noexcept { return s_this; }
87 static const std::string& __get_that_str() noexcept { return s_that; }
88
89
96 uint32_t
97 get_this() const
98 {
99 std::lock_guard scoped_lock(m_mutex);
100 check();
101 check_init();
102 return m_this;
103 }
104
111 void
112 set_this(uint32_t value)
113 {
114 std::lock_guard scoped_lock(m_mutex);
115 check();
116 clear();
117 p_obj.set_by_val(s_this, value);
118 }
119
120
127 uint32_t
128 get_that() const
129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 check_init();
133 return m_that;
134 }
135
142 void
143 set_that(uint32_t value)
144 {
145 std::lock_guard scoped_lock(m_mutex);
146 check();
147 clear();
148 p_obj.set_by_val(s_that, value);
149 }
150
151
152 // relationship names
153
154 inline static const std::string s_other = "other";
155
156 static const std::string& __get_other_str() noexcept { return s_other; }
157
158
166 get_other() const
167 {
168 std::lock_guard scoped_lock(m_mutex);
169 check();
170 check_init();
171 return m_other;
172 }
173
174
181 void
183
184 };
185
186 // out stream operator
187
188 inline std::ostream& operator<<(std::ostream& s, const JsonableTest& obj)
189 {
190 return obj.print_object(s);
191 }
192
193 typedef std::vector<const JsonableTest*>::const_iterator JsonableTestIterator;
194
195 }
196}
197
198#endif
void set_by_val(const std::string &name, T value)
Set attribute value.
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
ConfigObject p_obj
Config object used by given template object.
void check_init() const
Check and initialize object if necessary.
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
static const std::string s_that
void set_this(uint32_t value)
Set "this" attribute value.
virtual ~JsonableTest() noexcept
const dunedaq::confmodel::JsonableTest * m_other
static const std::string s_this
JsonableTest(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_that_str() noexcept
virtual void init(bool init_children)
static const std::string & __get_this_str() noexcept
friend class conffwk::DalFactory
uint32_t get_that() const
Get "that" attribute value.
uint32_t get_this() const
Get "this" attribute value.
void set_other(const dunedaq::confmodel::JsonableTest *value)
Set "other" relationship value.
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
static const std::string s_other
friend class conffwk::DalObject
static const std::string & s_class_name
const dunedaq::confmodel::JsonableTest * get_other() const
Get "other" relationship value.
static const std::string & __get_other_str() noexcept
void set_that(uint32_t value)
Set "that" attribute value.
conffwk entry point
double offset
std::vector< constJsonableTest * >::const_iterator JsonableTestIterator
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Including Qt Headers.