DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::conffwk::class_t Struct Reference

#include <Schema.hpp>

Public Member Functions

 class_t (const std::string &name, const std::string &description, const std::string &schema_path, bool is_abstract)
 class_t ()
void print (std::ostream &out, const std::string &prefix="") const

Public Attributes

std::string p_name
std::string p_description
std::string p_schema_path
bool p_abstract
const std::vector< std::string > p_superclasses
const std::vector< std::string > p_subclasses
const std::vector< attribute_tp_attributes
const std::vector< relationship_tp_relationships

Detailed Description

The description of class.

Definition at line 162 of file Schema.hpp.

Constructor & Destructor Documentation

◆ class_t() [1/2]

dunedaq::conffwk::class_t::class_t ( const std::string & name,
const std::string & description,
const std::string & schema_path,
bool is_abstract )

Create class description

Definition at line 158 of file ConfigurationImpl.cpp.

163 :
164 p_name (name),
165 p_description (description),
166 p_schema_path (schema_path),
167 p_abstract (is_abstract)
168 { ; }
std::string p_description
Definition Schema.hpp:165
std::string p_schema_path
Definition Schema.hpp:166

◆ class_t() [2/2]

dunedaq::conffwk::class_t::class_t ( )
inline

Default constructor for Python binding

Definition at line 185 of file Schema.hpp.

185{ ; }

Member Function Documentation

◆ print()

void dunedaq::conffwk::class_t::print ( std::ostream & out,
const std::string & prefix = "" ) const

Print description of class to stream.

Parameters
outthe output stream
prefixoptional shift output using prefix

Definition at line 170 of file ConfigurationImpl.cpp.

171 {
172 out
173 << prefix << "class \'" << p_name << "\'\n"
174 << prefix << " is abstract: \'" << bool2str(p_abstract) << "\'\n"
175 << prefix << " description: \'" << p_description << "\'\n"
176 << prefix << " path: \'" << p_schema_path << "\'\n";
177
178 if(p_superclasses.empty()) {
179 out << prefix << " there are no superclasses\n";
180 }
181 else {
182 out << prefix << " " << p_superclasses.size() << " superclass(es):\n";
183 for(std::vector<std::string>::const_iterator i = p_superclasses.begin(); i != p_superclasses.end(); ++i) {
184 out << prefix << " \'" << *i << "\'\n";
185 }
186 }
187
188 if(p_subclasses.empty()) {
189 out << prefix << " there are no subclasses\n";
190 }
191 else {
192 out << prefix << " " << p_subclasses.size() << " subclass(es):\n";
193 for(std::vector<std::string>::const_iterator i = p_subclasses.begin(); i != p_subclasses.end(); ++i) {
194 out << prefix << " \'" << *i << "\'\n";
195 }
196 }
197
198 std::string new_prefix(prefix);
199 new_prefix += " ";
200
201 if(p_attributes.empty()) {
202 out << prefix << " there are no attributes\n";
203 }
204 else {
205 out << prefix << " " << p_attributes.size() << " attribute(s):\n";
206 for(std::vector<attribute_t>::const_iterator i = p_attributes.begin(); i != p_attributes.end(); ++i) {
207 (*i).print(out, new_prefix.c_str());
208 out << std::endl;
209 }
210 }
211
212 if(p_relationships.empty()) {
213 out << prefix << " there are no relationships\n";
214 }
215 else {
216 out << prefix << " " << p_relationships.size() << " relationship(s):\n";
217 for(std::vector<relationship_t>::const_iterator i = p_relationships.begin(); i != p_relationships.end(); ++i) {
218 (*i).print(out, new_prefix.c_str());
219 out << std::endl;
220 }
221 }
222 }
const char * bool2str(bool value)
FELIX Initialization std::string initerror FELIX queue timed out
const std::vector< attribute_t > p_attributes
Definition Schema.hpp:170
const std::vector< relationship_t > p_relationships
Definition Schema.hpp:171
const std::vector< std::string > p_subclasses
Definition Schema.hpp:169
const std::vector< std::string > p_superclasses
Definition Schema.hpp:168

Member Data Documentation

◆ p_abstract

bool dunedaq::conffwk::class_t::p_abstract

if true, the class is abstract and has no objects

Definition at line 167 of file Schema.hpp.

◆ p_attributes

const std::vector<attribute_t> dunedaq::conffwk::class_t::p_attributes

the all attributes of the class

Definition at line 170 of file Schema.hpp.

◆ p_description

std::string dunedaq::conffwk::class_t::p_description

the description text of class

Definition at line 165 of file Schema.hpp.

◆ p_name

std::string dunedaq::conffwk::class_t::p_name

the class name

Definition at line 164 of file Schema.hpp.

◆ p_relationships

const std::vector<relationship_t> dunedaq::conffwk::class_t::p_relationships

the all relationships of the class

Definition at line 171 of file Schema.hpp.

◆ p_schema_path

std::string dunedaq::conffwk::class_t::p_schema_path

the path to the schema_file

Definition at line 166 of file Schema.hpp.

◆ p_subclasses

const std::vector<std::string> dunedaq::conffwk::class_t::p_subclasses

the names of direct subclasses

Definition at line 169 of file Schema.hpp.

◆ p_superclasses

const std::vector<std::string> dunedaq::conffwk::class_t::p_superclasses

the names of direct superclasses

Definition at line 168 of file Schema.hpp.


The documentation for this struct was generated from the following files: