DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomRelationshipModel.cpp
Go to the documentation of this file.
2
3using namespace dunedaq::oks;
4
6 QStringList Headers, bool Derived )
7 : CustomModelInterface ( Headers ),
8 SchemaClass ( ClassInfo ),
9 SchemaDerived ( Derived )
10{
11 setupModel();
12}
13
15{
16 Data.clear();
17 const std::list<OksRelationship *> * RelationshipList;
18
19 if ( SchemaDerived )
20 {
21 RelationshipList = SchemaClass->all_relationships();
22 }
23 else
24 {
25 RelationshipList = SchemaClass->direct_relationships();
26 }
27
28 if ( RelationshipList )
29 {
30 for ( OksRelationship * Relationship : *RelationshipList )
31 {
32 QStringList Row;
33 Row.append ( QString::fromStdString ( Relationship->get_name() ) );
34 Row.append ( QString::fromStdString ( Relationship->get_type() ) );
35 Row.append (
36 QString ( Relationship->card2str ( Relationship->get_low_cardinality_constraint() ) ) );
37 Row.append (
38 QString ( Relationship->card2str ( Relationship->get_high_cardinality_constraint() ) ) );
39 Data.append ( Row );
40 }
41 }
42}
43
CustomRelationshipModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
The OKS class.
Definition class.hpp:200