LCOV - code coverage report
Current view: top level - dbe/apps/SchemaEditor - SchemaCustomRelationshipModel.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 0.0 % 22 0
Test Date: 2026-10-11 15:05:20 Functions: 0.0 % 3 0

            Line data    Source code
       1              : // DUNE DAQ modification notice:
       2              : // This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
       3              : // Fork baseline commit: dbe-02-12-17 (2022-05-12).
       4              : // Renamed since fork: yes (from src/SchemaEditor/SchemaCustomRelationshipModel.cpp to
       5              : // apps/SchemaEditor/SchemaCustomRelationshipModel.cpp).
       6              : 
       7              : #include "dbe/SchemaCustomRelationshipModel.hpp"
       8              : 
       9              : using namespace dunedaq::oks;
      10              : 
      11            0 : dbse::CustomRelationshipModel::CustomRelationshipModel(OksClass* ClassInfo, QStringList Headers, bool Derived)
      12              :   : CustomModelInterface(Headers)
      13            0 :   , SchemaClass(ClassInfo)
      14            0 :   , SchemaDerived(Derived)
      15              : {
      16            0 :   setupModel();
      17            0 : }
      18              : 
      19              : void
      20            0 : dbse::CustomRelationshipModel::setupModel()
      21              : {
      22            0 :   Data.clear();
      23            0 :   const std::list<OksRelationship*>* RelationshipList;
      24              : 
      25            0 :   if (SchemaDerived) {
      26            0 :     RelationshipList = SchemaClass->all_relationships();
      27              :   } else {
      28            0 :     RelationshipList = SchemaClass->direct_relationships();
      29              :   }
      30              : 
      31            0 :   if (RelationshipList) {
      32            0 :     for (OksRelationship* Relationship : *RelationshipList) {
      33            0 :       QStringList Row;
      34            0 :       Row.append(QString::fromStdString(Relationship->get_name()));
      35            0 :       Row.append(QString::fromStdString(Relationship->get_type()));
      36            0 :       Row.append(QString(Relationship->card2str(Relationship->get_low_cardinality_constraint())));
      37            0 :       Row.append(QString(Relationship->card2str(Relationship->get_high_cardinality_constraint())));
      38            0 :       Data.append(Row);
      39            0 :     }
      40              :   }
      41            0 : }
      42              : 
      43            0 : dbse::CustomRelationshipModel::~CustomRelationshipModel() = default;
        

Generated by: LCOV version 2.0-1