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/SchemaCustomMethodImplementationModel.cpp to apps/SchemaEditor/SchemaCustomMethodImplementationModel.cpp).
5 :
6 : #include "dbe/SchemaCustomMethodImplementationModel.hpp"
7 :
8 : using namespace dunedaq::oks;
9 :
10 0 : dbse::CustomMethodImplementationModel::CustomMethodImplementationModel ( OksMethod * Method,
11 0 : QStringList Headers )
12 : : CustomModelInterface ( Headers ),
13 0 : SchemaMethod ( Method )
14 : {
15 0 : setupModel();
16 0 : }
17 :
18 0 : void dbse::CustomMethodImplementationModel::setupModel()
19 : {
20 0 : Data.clear();
21 0 : const std::list<OksMethodImplementation *> * ImplementationList =
22 0 : SchemaMethod->implementations();
23 :
24 0 : if ( ImplementationList )
25 : {
26 0 : for ( OksMethodImplementation * Implementation : *ImplementationList )
27 : {
28 0 : QStringList Row;
29 0 : Row.append ( QString::fromStdString ( Implementation->get_language() ) );
30 0 : Row.append ( QString::fromStdString ( Implementation->get_prototype() ) );
31 0 : Data.append ( Row );
32 0 : }
33 : }
34 0 : }
35 :
36 0 : dbse::CustomMethodImplementationModel::~CustomMethodImplementationModel() = default;
|