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 155 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 151 of file ConfigurationImpl.cpp.

156 :
157 p_name (name),
158 p_description (description),
159 p_schema_path (schema_path),
160 p_abstract (is_abstract)
161 { ; }
std::string p_description
Definition Schema.hpp:158
std::string p_schema_path
Definition Schema.hpp:159

◆ class_t() [2/2]

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

Default constructor for Python binding

Definition at line 178 of file Schema.hpp.

178{ ; }

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 163 of file ConfigurationImpl.cpp.

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

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 160 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 163 of file Schema.hpp.

◆ p_description

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

the description text of class

Definition at line 158 of file Schema.hpp.

◆ p_name

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

the class name

Definition at line 157 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 164 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 159 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 162 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 161 of file Schema.hpp.


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