DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
NetworkConnectionRule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _NetworkConnectionRule_0_dunedaq__appmodel_0_appmodel_H_
4#define _NetworkConnectionRule_0_dunedaq__appmodel_0_appmodel_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
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace appmodel {
21 class NetworkConnectionDescriptor;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
29 class NetworkConnectionRule : public virtual dunedaq::conffwk::DalObject {
30
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
35
36 protected:
37
39 virtual ~NetworkConnectionRule() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
82
83
84 public:
85
86 // attribute names
87
88 inline static const std::string s_endpoint_class = "endpoint_class";
89
90 static const std::string& __get_endpoint_class_str() noexcept { return s_endpoint_class; }
91
92
99 const std::string&
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_endpoint_class;
106 }
107
114 void
115 set_endpoint_class(const std::string& value)
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 clear();
121 }
122
123
124 // relationship names
125
126 inline static const std::string s_descriptor = "descriptor";
127
128 static const std::string& __get_descriptor_str() noexcept { return s_descriptor; }
129
130
139 {
140 std::lock_guard scoped_lock(m_mutex);
141 check();
142 check_init();
143 if (!m_descriptor)
144 {
145 std::ostringstream text;
146 text << "relationship \"" << s_descriptor << "\" of object " << this << " is not set";
147 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
148 }
149 return m_descriptor;
150 }
151
152
159 void
161
162 };
163
164 // out stream operator
165
166 inline std::ostream& operator<<(std::ostream& s, const NetworkConnectionRule& obj)
167 {
168 return obj.print_object(s);
169 }
170
171 typedef std::vector<const NetworkConnectionRule*>::const_iterator NetworkConnectionRuleIterator;
172
173 }
174}
175
176#endif
#define ERS_HERE
static const std::string & __get_descriptor_str() noexcept
const dunedaq::appmodel::NetworkConnectionDescriptor * m_descriptor
NetworkConnectionRule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const std::string & get_endpoint_class() const
Get "endpoint_class" attribute value.
void set_endpoint_class(const std::string &value)
Set "endpoint_class" attribute 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...
const dunedaq::appmodel::NetworkConnectionDescriptor * get_descriptor() const
Get "descriptor" relationship value.
static const std::string & __get_endpoint_class_str() noexcept
void set_descriptor(const dunedaq::appmodel::NetworkConnectionDescriptor *value)
Set "descriptor" relationship value.
void set_class(const std::string &name, const std::string &value)
Set attribute class 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...
Generic configuration exception.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constNetworkConnectionRule * >::const_iterator NetworkConnectionRuleIterator
Including Qt Headers.