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