DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Schema.hpp
Go to the documentation of this file.
1
7
8#ifndef CONFFWK_SCHEMA_H_
9#define CONFFWK_SCHEMA_H_
10
11#include <string>
12#include <vector>
13#include <iostream>
14
15namespace dunedaq {
16 namespace conffwk {
17
19
38
39
41
48
49
51
52 struct attribute_t {
53
54 std::string p_name;
56 std::string p_range;
60 std::string p_default_value;
61 std::string p_description;
62
64
66 const std::string& name,
68 const std::string& range,
69 int_format_t int_format,
70 bool is_not_null,
71 bool is_multi_value,
72 const std::string& default_value,
73 const std::string& description
74 );
75
76
78
80
81
83
84 void print(
85 std::ostream& out,
86 const std::string& prefix = ""
87 ) const;
88
90 static const char * type2str(type_t type );
91
93 static const char * type(type_t type );
94
96 static const char * format2str(int_format_t format );
97
98 };
99
100
102
109
110
112
114
115 std::string p_name;
116 std::string p_type;
119 std::string p_description;
120
122
124 const std::string& name,
125 const std::string& type,
126 bool can_be_null,
127 bool is_multi_value,
128 bool is_aggregation,
129 const std::string& description
130 );
131
132
134
136
137
139
140 void print(
141 std::ostream& out,
142 const std::string& prefix = ""
143 ) const;
144
145
147
148 static const char * card2str(cardinality_t cardinality);
149
150 };
151
152
154
155 struct class_t {
156
157 std::string p_name;
158 std::string p_description;
159 std::string p_schema_path;
161 const std::vector<std::string> p_superclasses;
162 const std::vector<std::string> p_subclasses;
163 const std::vector<attribute_t> p_attributes;
164 const std::vector<relationship_t> p_relationships;
165
167
168 class_t(
169 const std::string& name,
170 const std::string& description,
171 const std::string& schema_path,
172 bool is_abstract
173 );
174
175
177
178 class_t() { ; }
179
180
182
183 void print(
184 std::ostream& out,
185 const std::string& prefix = ""
186 ) const;
187
188 };
189
190 const char * bool2str(bool value);
191
192 std::ostream& operator<<(std::ostream& out, const attribute_t &);
193 std::ostream& operator<<(std::ostream& out, const relationship_t &);
194 std::ostream& operator<<(std::ostream& out, const class_t &);
195
196 }
197}
198
199#endif // CONFFWK_SCHEMA_H_
const char * bool2str(bool value)
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)
Including Qt Headers.
DAC value out of range
Message.
Definition DACNode.hpp:32
FELIX Initialization std::string initerror FELIX queue timed out
static const char * type(type_t type)
void print(std::ostream &out, const std::string &prefix="") const
static const char * type2str(type_t type)
static const char * format2str(int_format_t format)
attribute_t(const std::string &name, type_t type, const std::string &range, int_format_t int_format, bool is_not_null, bool is_multi_value, const std::string &default_value, const std::string &description)
const std::vector< attribute_t > p_attributes
Definition Schema.hpp:163
const std::vector< relationship_t > p_relationships
Definition Schema.hpp:164
void print(std::ostream &out, const std::string &prefix="") const
class_t(const std::string &name, const std::string &description, const std::string &schema_path, bool is_abstract)
const std::vector< std::string > p_subclasses
Definition Schema.hpp:162
std::string p_description
Definition Schema.hpp:158
std::string p_schema_path
Definition Schema.hpp:159
const std::vector< std::string > p_superclasses
Definition Schema.hpp:161
void print(std::ostream &out, const std::string &prefix="") const
static const char * card2str(cardinality_t cardinality)
relationship_t(const std::string &name, const std::string &type, bool can_be_null, bool is_multi_value, bool is_aggregation, const std::string &description)