Line data Source code
1 : #include "dbe/SchemaCustomMethodModel.hpp"
2 :
3 : using namespace dunedaq::oks;
4 :
5 0 : dbse::CustomMethodModel::CustomMethodModel ( OksClass * ClassInfo, QStringList Headers,
6 0 : bool Derived )
7 : : CustomModelInterface ( Headers ),
8 0 : SchemaClass ( ClassInfo ),
9 0 : SchemaDerived ( Derived )
10 : {
11 0 : setupModel();
12 0 : }
13 :
14 0 : void dbse::CustomMethodModel::setupModel()
15 : {
16 0 : Data.clear();
17 0 : const std::list<OksMethod *> * MethodList;
18 :
19 0 : if ( SchemaDerived )
20 : {
21 0 : MethodList = SchemaClass->all_methods();
22 : }
23 : else
24 : {
25 0 : MethodList = SchemaClass->direct_methods();
26 : }
27 :
28 0 : if ( MethodList )
29 : {
30 0 : for ( OksMethod * Method : *MethodList )
31 : {
32 0 : QStringList Row;
33 0 : Row.append ( QString::fromStdString ( Method->get_name() ) );
34 0 : Data.append ( Row );
35 0 : }
36 : }
37 0 : }
38 :
39 0 : dbse::CustomMethodModel::~CustomMethodModel() = default;
|