DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbse::KernelWrapper Class Reference

#include <SchemaKernelWrapper.hpp>

Inheritance diagram for dbse::KernelWrapper:
[legend]
Collaboration diagram for dbse::KernelWrapper:
[legend]

Signals

void ClassCreated (QString ClassName)
void ClassRemoved (QString ClassName)
void ClassUpdated (QString ClassName)
void RebuildAttributeModel ()
void active_updated ()

Public Member Functions

dunedaq::oks::OksKernel * GetKernel ()
void SetActiveSchema (const std::string &ActiveSchema)
void GetClassList (std::vector< dunedaq::oks::OksClass * > &ClassList) const
void GetClassListString (QStringList &ClassListString) const
void GetSchemaFiles (std::vector< std::string > &SchemaFiles)
void GetSchemaFiles (std::vector< dunedaq::oks::OksFile * > &SchemaFiles)
std::vector< dunedaq::oks::OksClass * > get_schema_classes (std::string &filename)
void GetIncludedList (const std::string &FileName, std::set< std::string > &IncludedFiles)
void get_direct_includes (const std::string &FileName, std::set< std::string > &IncludedFiles)
void get_all_includes (const std::string &FileName, std::set< std::string > &IncludedFiles)
bool IsFileWritable (const std::string &FileName) const
bool is_file_modified (const std::string &FileName) const
bool IsActive () const
dunedaq::oks::OksClass * FindClass (std::string ClassName) const
dunedaq::oks::OksFile * LoadSchema (const std::string &SchemaName) const
void SaveAllSchema () const
void SaveSchema (const std::string &file) const
std::vector< std::string > get_modified_schema_files () const
std::string ModifiedSchemaFiles () const
std::string SaveModifiedSchema () const
std::string GetActiveSchema () const
void AddInclude (std::string schemaFile, std::string IncludeFile) const
void RemoveInclude (std::string schemaFile, std::string IncludeFile) const
void CloseAllSchema () const
void CreateNewSchema (const std::string &SchemaName) const
bool AnyClassReferenceThis (dunedaq::oks::OksClass *SchemaClass)
QString GetCardinalityStringRelationship (dunedaq::oks::OksRelationship *SchemaRelationship) const
void SetInheritanceMode (bool Mode)
 Editor Functions.
bool GetInheritanceMode () const
QUndoStack * GetUndoStack ()
 Stack Functions.
void PushSetAbstractClassCommand (dunedaq::oks::OksClass *Class, bool Value)
void PushSetDescriptionClassCommand (dunedaq::oks::OksClass *Class, std::string Description)
void PushAddSuperClassCommand (dunedaq::oks::OksClass *Class, std::string SuperClass)
void PushRemoveSuperClassCommand (dunedaq::oks::OksClass *Class, std::string SuperClass)
void PushCreateClassCommand (std::string ClassName, std::string ClassDescription, bool Abstract)
void PushRemoveClassCommand (dunedaq::oks::OksClass *Class, std::string ClassName, std::string ClassDescription, bool Abstract)
void PushSetNameRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name)
 Relationship commands.
void PushSetClassTypeRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string ClassType)
void PushSetDescriptionRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Description)
void PushSetLowCcRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)
void PushSetHighCcRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)
void PushSetIsCompositeRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
void PushSetIsDependentRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
void PushSetIsExclusiveRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
void PushAddRelationship (dunedaq::oks::OksClass *Class, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)
void PushRemoveRelationship (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)
void PushSetMethodImplementationLanguage (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Language)
 Method implementation commands.
void PushSetMethodImplementationPrototype (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Prototype)
void PushSetMethodImplementationBody (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Body)
void PushAddMethodImplementationComand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
void PushRemoveMethodImplementationComand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
void PushSetNameMethodCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name)
 Method commands.
void PushSetDescriptionMethodCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string description)
void PushAddMethodCommand (dunedaq::oks::OksClass *Class, std::string name, std::string description)
void PushRemoveMethodCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name, std::string description)
void PushSetAttributeNameCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewName)
 Attribute commands.
void PushSetAttributeDescriptionCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewDescription)
void PushSetAttributeTypeCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewType)
void PushSetAttributeRangeCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewRange)
void PushSetAttributeFormatCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, dunedaq::oks::OksAttribute::Format NewFormat)
void PushSetAttributeMultiCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsMulti)
void PushSetAttributeIsNullCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsNull)
void PushSetAttributeInitialValuesCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewValues)
void PushAddAttributeCommand (dunedaq::oks::OksClass *Class, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)
void PushRemoveAttributeCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)

Static Public Member Functions

static KernelWrapper & GetInstance ()

Private Member Functions

 KernelWrapper (QObject *parent=nullptr)

Private Attributes

dunedaq::oks::OksKernel * Kernel
QUndoStack * CommandStack
bool InheritanceMode

Friends

class SchemaMainWindow
class SchemaClassEditor
class SchemaAttributeEditor
class SchemaMethodEditor
class SchemaRelationshipEditor

Detailed Description

Definition at line 25 of file SchemaKernelWrapper.hpp.

Constructor & Destructor Documentation

◆ KernelWrapper()

dbse::KernelWrapper::KernelWrapper ( QObject * parent = nullptr)
private

Definition at line 752 of file SchemaKernelWrapper.cpp.

753 : QObject(parent)
754 , Kernel(new OksKernel())
755 , CommandStack(new QUndoStack())
756 , InheritanceMode(false)
757{
758}
dunedaq::oks::OksKernel * Kernel
OksKernel(bool silence_mode=false, bool verbose_mode=false, bool profiling_mode=false, bool allow_repository=true, const char *version=nullptr, std::string branch_name="")
Constructor to build OksKernel object.
Definition kernel.cpp:675

Member Function Documentation

◆ active_updated

void dbse::KernelWrapper::active_updated ( )
signal

◆ AddInclude()

void dbse::KernelWrapper::AddInclude ( std::string schemaFile,
std::string IncludeFile ) const

Definition at line 82 of file SchemaKernelWrapper.cpp.

83{
84 auto ParentSchema = Kernel->find_schema_file(schemaFile);
85 if (ParentSchema != nullptr) {
86 ParentSchema->add_include_file(IncludeFile);
87 Kernel->load_schema(IncludeFile, ParentSchema);
88 }
89}
OksFile * find_schema_file(const std::string &s) const
Finds OKS schema file.
Definition kernel.cpp:2113
OksFile * load_schema(const std::string &name, const OksFile *parent=0)
Load OKS schema file.
Definition kernel.cpp:2129

◆ AnyClassReferenceThis()

bool dbse::KernelWrapper::AnyClassReferenceThis ( dunedaq::oks::OksClass * SchemaClass)

Definition at line 257 of file SchemaKernelWrapper.cpp.

258{
259 std::vector<OksClass*> ClassList;
260 GetClassList(ClassList);
261
262 for (OksClass* ClassInfo : ClassList) {
263 const std::list<OksRelationship*>* RelationshipList = ClassInfo->direct_relationships();
264
265 if (RelationshipList != nullptr) {
266 for (OksRelationship* RelationshipInfo : *RelationshipList) {
267 if (RelationshipInfo->get_class_type()->get_name() == SchemaClass->get_name()) {
268 return true;
269 }
270 }
271 }
272 }
273
274 return false;
275}
void GetClassList(std::vector< dunedaq::oks::OksClass * > &ClassList) const
const std::string & get_name() const noexcept
Definition class.hpp:374

◆ ClassCreated

void dbse::KernelWrapper::ClassCreated ( QString ClassName)
signal

◆ ClassRemoved

void dbse::KernelWrapper::ClassRemoved ( QString ClassName)
signal

◆ ClassUpdated

void dbse::KernelWrapper::ClassUpdated ( QString ClassName)
signal

◆ CloseAllSchema()

void dbse::KernelWrapper::CloseAllSchema ( ) const

Definition at line 245 of file SchemaKernelWrapper.cpp.

246{
248}
void close_all_schema()
Close all OKS schema files.
Definition kernel.cpp:2679

◆ CreateNewSchema()

void dbse::KernelWrapper::CreateNewSchema ( const std::string & SchemaName) const

Definition at line 251 of file SchemaKernelWrapper.cpp.

252{
253 Kernel->new_schema(SchemaName);
254}
OksFile * new_schema(const std::string &name)
Create OKS schema file.
Definition kernel.cpp:2307

◆ FindClass()

OksClass * dbse::KernelWrapper::FindClass ( std::string ClassName) const

Definition at line 183 of file SchemaKernelWrapper.cpp.

184{
185 return Kernel->find_class(ClassName);
186}
OksClass * find_class(const std::string &class_name) const
Find class by name (C++ string).
Definition kernel.hpp:1754

◆ get_all_includes()

void dbse::KernelWrapper::get_all_includes ( const std::string & FileName,
std::set< std::string > & IncludedFiles )

Definition at line 137 of file SchemaKernelWrapper.cpp.

138{
139 auto parentschema = Kernel->find_schema_file(filename);
140 if (parentschema != nullptr) {
141 std::set<OksFile*> includes;
142 parentschema->get_all_include_files(Kernel, includes);
143 for (auto file : includes) {
144 included_files.insert(file->get_full_file_name());
145 }
146 }
147}

◆ get_direct_includes()

void dbse::KernelWrapper::get_direct_includes ( const std::string & FileName,
std::set< std::string > & IncludedFiles )

Definition at line 150 of file SchemaKernelWrapper.cpp.

151{
152 auto parentschema = Kernel->find_schema_file(filename);
153 if (parentschema != nullptr) {
154 for (auto file : parentschema->get_include_files()) {
155 included_files.insert(file);
156 }
157 }
158}

◆ get_modified_schema_files()

std::vector< std::string > dbse::KernelWrapper::get_modified_schema_files ( ) const

Definition at line 213 of file SchemaKernelWrapper.cpp.

214{
215 std::vector<std::string> modified;
216 for (auto [name, file] : Kernel->schema_files()) {
217 if (file->is_updated()) {
218 modified.push_back(file->get_full_file_name());
219 }
220 }
221 return modified;
222}
const OksFile::Map & schema_files() const
Get all schema files.
Definition kernel.hpp:1211

◆ get_schema_classes()

std::vector< OksClass * > dbse::KernelWrapper::get_schema_classes ( std::string & filename)

Definition at line 117 of file SchemaKernelWrapper.cpp.

118{
119 auto file = Kernel->find_schema_file(filename);
120 std::vector<OksClass*> list;
121 auto klist = Kernel->create_list_of_schema_classes(file);
122 if (klist != nullptr) {
123 for (auto cls : *klist) {
124 list.push_back(cls /*->get_name()*/);
125 }
126 delete klist;
127 }
128 return list;
129}
std::list< OksClass * > * create_list_of_schema_classes(OksFile *) const
Creates list of classes which belong to given file.
Definition kernel.cpp:2743

◆ GetActiveSchema()

std::string dbse::KernelWrapper::GetActiveSchema ( ) const

Definition at line 65 of file SchemaKernelWrapper.cpp.

66{
68 if (file) {
69 return file->get_full_file_name();
70 } else {
71 return "";
72 }
73}
OksFile * get_active_schema() const
Get active OKS schema file.
Definition kernel.hpp:1199

◆ GetCardinalityStringRelationship()

QString dbse::KernelWrapper::GetCardinalityStringRelationship ( dunedaq::oks::OksRelationship * SchemaRelationship) const

Definition at line 278 of file SchemaKernelWrapper.cpp.

279{
280 QString RelationshipLowCc(OksRelationship::card2str(SchemaRelationship->get_low_cardinality_constraint()));
281 QString RelationshipHighCc(OksRelationship::card2str(SchemaRelationship->get_high_cardinality_constraint()));
282
283 if (RelationshipLowCc == "zero") {
284 RelationshipLowCc = "0";
285 } else if (RelationshipLowCc == "one") {
286 RelationshipLowCc = "1";
287 } else if (RelationshipLowCc == "many") {
288 RelationshipLowCc = "n";
289 }
290
291 if (RelationshipHighCc == "zero") {
292 RelationshipHighCc = "0";
293 } else if (RelationshipHighCc == "one") {
294 RelationshipHighCc = "1";
295 } else if (RelationshipHighCc == "many") {
296 RelationshipHighCc = "n";
297 }
298
299 return QString(RelationshipLowCc + ':' + RelationshipHighCc);
300}
CardinalityConstraint get_high_cardinality_constraint() const noexcept
Get relationship high cardinality constraint.
static const char * card2str(CardinalityConstraint) noexcept
CardinalityConstraint get_low_cardinality_constraint() const noexcept
Get relationship low cardinality constraint.

◆ GetClassList()

void dbse::KernelWrapper::GetClassList ( std::vector< dunedaq::oks::OksClass * > & ClassList) const

Definition at line 43 of file SchemaKernelWrapper.cpp.

44{
45 for (OksClass::Map::const_iterator i = Kernel->classes().begin(); i != Kernel->classes().end(); ++i) {
46 ClassList.push_back(i->second);
47 }
48}
const OksClass::Map & classes() const
Get classes.
Definition kernel.hpp:1711

◆ GetClassListString()

void dbse::KernelWrapper::GetClassListString ( QStringList & ClassListString) const

Definition at line 51 of file SchemaKernelWrapper.cpp.

52{
53 std::vector<OksClass*> ClassList;
54
55 for (OksClass::Map::const_iterator i = Kernel->classes().begin(); i != Kernel->classes().end(); ++i) {
56 ClassList.push_back(i->second);
57 }
58
59 for (OksClass* ClassInfo : ClassList) {
60 ClassListString.append(QString::fromStdString(ClassInfo->get_name()));
61 }
62}

◆ GetIncludedList()

void dbse::KernelWrapper::GetIncludedList ( const std::string & FileName,
std::set< std::string > & IncludedFiles )

Definition at line 132 of file SchemaKernelWrapper.cpp.

133{
134 Kernel->get_includes(filename, included_files);
135}
void get_includes(const std::string &file_name, std::set< std::string > &includes, bool use_repository_name=false)
Opens file and reads its shallow includes.
Definition kernel.cpp:1752

◆ GetInheritanceMode()

bool dbse::KernelWrapper::GetInheritanceMode ( ) const

Definition at line 316 of file SchemaKernelWrapper.cpp.

317{
318 return InheritanceMode;
319}

◆ GetInstance()

dbse::KernelWrapper & dbse::KernelWrapper::GetInstance ( )
static

Definition at line 19 of file SchemaKernelWrapper.cpp.

20{
21 static KernelWrapper KernelManager;
22 return KernelManager;
23}
KernelWrapper(QObject *parent=nullptr)

◆ GetKernel()

OksKernel * dbse::KernelWrapper::GetKernel ( )

Definition at line 26 of file SchemaKernelWrapper.cpp.

27{
28 return Kernel;
29}

◆ GetSchemaFiles() [1/2]

void dbse::KernelWrapper::GetSchemaFiles ( std::vector< dunedaq::oks::OksFile * > & SchemaFiles)

Definition at line 109 of file SchemaKernelWrapper.cpp.

110{
111 for (auto [name, file] : Kernel->schema_files()) {
112 SchemaFiles.push_back(file);
113 }
114}

◆ GetSchemaFiles() [2/2]

void dbse::KernelWrapper::GetSchemaFiles ( std::vector< std::string > & SchemaFiles)

Definition at line 101 of file SchemaKernelWrapper.cpp.

102{
103 for (OksFile::Map::const_iterator i = Kernel->schema_files().begin(); i != Kernel->schema_files().end(); ++i) {
104 SchemaFiles.push_back(*(i->first));
105 }
106}

◆ GetUndoStack()

QUndoStack * dbse::KernelWrapper::GetUndoStack ( )

Stack Functions.

Definition at line 322 of file SchemaKernelWrapper.cpp.

323{
324 return CommandStack;
325}

◆ is_file_modified()

bool dbse::KernelWrapper::is_file_modified ( const std::string & FileName) const

Definition at line 173 of file SchemaKernelWrapper.cpp.

174{
175 OksFile* file = Kernel->find_schema_file(FileName);
176 if (file != nullptr) {
177 return file->is_updated();
178 }
179 return false;
180}

◆ IsActive()

bool dbse::KernelWrapper::IsActive ( ) const

Definition at line 303 of file SchemaKernelWrapper.cpp.

304{
305 OksFile* ActiveSchemaFile = Kernel->get_active_schema();
306 return (ActiveSchemaFile != nullptr);
307}

◆ IsFileWritable()

bool dbse::KernelWrapper::IsFileWritable ( const std::string & FileName) const

Definition at line 161 of file SchemaKernelWrapper.cpp.

162{
163 OksFile* File = Kernel->find_schema_file(FileName);
164
165 if (File) {
166 return (!File->is_read_only());
167 }
168
169 return false;
170}
bool is_read_only() const
Return read-only status of OKS file.
Definition file.hpp:626

◆ LoadSchema()

OksFile * dbse::KernelWrapper::LoadSchema ( const std::string & SchemaName) const

Definition at line 189 of file SchemaKernelWrapper.cpp.

190{
191 return Kernel->load_schema(SchemaName);
192}

◆ ModifiedSchemaFiles()

std::string dbse::KernelWrapper::ModifiedSchemaFiles ( ) const

Definition at line 201 of file SchemaKernelWrapper.cpp.

202{
203 std::string modified{ "" };
204 for (auto [name, file] : Kernel->schema_files()) {
205 if (file->is_updated()) {
206 modified += file->get_full_file_name() + "\n\n";
207 }
208 }
209 return modified;
210}

◆ PushAddAttributeCommand()

void dbse::KernelWrapper::PushAddAttributeCommand ( dunedaq::oks::OksClass * Class,
std::string name,
std::string type,
bool is_mv,
std::string range,
std::string init_values,
std::string description,
bool is_null,
dunedaq::oks::OksAttribute::Format format = dunedaq::oks::OksAttribute::Format::Dec )

Definition at line 714 of file SchemaKernelWrapper.cpp.

723{
724 try {
725 CommandStack->push(
726 new AddAttributeCommand(Class, name, type, is_mv, range, init_values, description, is_null, format));
727 } catch (oks::exception& Ex) {
728 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
729 }
730}
AddAttributeCommand(dunedaq::oks::OksClass *Class, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)
DAC value out of range
Message.
Definition DACNode.hpp:32

◆ PushAddMethodCommand()

void dbse::KernelWrapper::PushAddMethodCommand ( dunedaq::oks::OksClass * Class,
std::string name,
std::string description )

Definition at line 605 of file SchemaKernelWrapper.cpp.

606{
607 try {
608 CommandStack->push(new AddMethodCommand(Class, name, description));
609 } catch (oks::exception& Ex) {
610 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
611 }
612}
AddMethodCommand(dunedaq::oks::OksClass *Class, std::string name, std::string description)

◆ PushAddMethodImplementationComand()

void dbse::KernelWrapper::PushAddMethodImplementationComand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string Language,
std::string Prototype,
std::string Body )

Definition at line 557 of file SchemaKernelWrapper.cpp.

562{
563 try {
564 CommandStack->push(new AddMethodImplementationComand(Class, Method, Language, Prototype, Body));
565 } catch (oks::exception& Ex) {
566 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
567 }
568}
AddMethodImplementationComand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)

◆ PushAddRelationship()

void dbse::KernelWrapper::PushAddRelationship ( dunedaq::oks::OksClass * Class,
std::string Name,
std::string Description,
std::string Type,
bool Composite,
bool Exclusive,
bool Dependent,
dunedaq::oks::OksRelationship::CardinalityConstraint LowCc,
dunedaq::oks::OksRelationship::CardinalityConstraint HighCc )

Definition at line 479 of file SchemaKernelWrapper.cpp.

488{
489 try {
490 CommandStack->push(
491 new AddRelationship(Class, Name, Description, Type, Composite, Exclusive, Dependent, LowCc, HighCc));
492 } catch (oks::exception& Ex) {
493 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
494 }
495}
AddRelationship(dunedaq::oks::OksClass *Class, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)

◆ PushAddSuperClassCommand()

void dbse::KernelWrapper::PushAddSuperClassCommand ( dunedaq::oks::OksClass * Class,
std::string SuperClass )

Definition at line 348 of file SchemaKernelWrapper.cpp.

349{
350 try {
351 CommandStack->push(new AddSuperClassCommand(Class, SuperClass));
352 } catch (oks::exception& Ex) {
353 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
354 }
355}
AddSuperClassCommand(dunedaq::oks::OksClass *Class, std::string SuperClass)

◆ PushCreateClassCommand()

void dbse::KernelWrapper::PushCreateClassCommand ( std::string ClassName,
std::string ClassDescription,
bool Abstract )

Definition at line 368 of file SchemaKernelWrapper.cpp.

369{
370 try {
371 CommandStack->push(new CreateClassCommand(ClassName, ClassDescription, Abstract));
372 } catch (...) {
373 QMessageBox::warning(0, "Schema editor", QString("Error"));
374 }
375}
CreateClassCommand(std::string ClassName, std::string ClassDescription, bool Abstract)

◆ PushRemoveAttributeCommand()

void dbse::KernelWrapper::PushRemoveAttributeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string name,
std::string type,
bool is_mv,
std::string range,
std::string init_values,
std::string description,
bool is_null,
dunedaq::oks::OksAttribute::Format format = dunedaq::oks::OksAttribute::Format::Dec )

Definition at line 733 of file SchemaKernelWrapper.cpp.

743{
744 try {
746 Class, Attribute, name, type, is_mv, range, init_values, description, is_null, format));
747 } catch (oks::exception& Ex) {
748 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
749 }
750}
RemoveAttributeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)

◆ PushRemoveClassCommand()

void dbse::KernelWrapper::PushRemoveClassCommand ( dunedaq::oks::OksClass * Class,
std::string ClassName,
std::string ClassDescription,
bool Abstract )

Definition at line 378 of file SchemaKernelWrapper.cpp.

382{
383 try {
384 CommandStack->push(new RemoveClassCommand(Class, ClassName, ClassDescription, Abstract));
385 } catch (oks::exception& Ex) {
386 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
387 }
388}
RemoveClassCommand(dunedaq::oks::OksClass *Class, std::string ClassName, std::string ClassDescription, bool Abstract)

◆ PushRemoveMethodCommand()

void dbse::KernelWrapper::PushRemoveMethodCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string name,
std::string description )

Definition at line 615 of file SchemaKernelWrapper.cpp.

619{
620 try {
621 CommandStack->push(new RemoveMethodCommand(Class, Method, name, description));
622 } catch (oks::exception& Ex) {
623 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
624 }
625}
RemoveMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name, std::string description)

◆ PushRemoveMethodImplementationComand()

void dbse::KernelWrapper::PushRemoveMethodImplementationComand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string Language,
std::string Prototype,
std::string Body )

Definition at line 571 of file SchemaKernelWrapper.cpp.

576{
577 try {
578 CommandStack->push(new RemoveMethodImplementationComand(Class, Method, Language, Prototype, Body));
579 } catch (oks::exception& Ex) {
580 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
581 }
582}
RemoveMethodImplementationComand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)

◆ PushRemoveRelationship()

void dbse::KernelWrapper::PushRemoveRelationship ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string Name,
std::string Description,
std::string Type,
bool Composite,
bool Exclusive,
bool Dependent,
dunedaq::oks::OksRelationship::CardinalityConstraint LowCc,
dunedaq::oks::OksRelationship::CardinalityConstraint HighCc )

Definition at line 498 of file SchemaKernelWrapper.cpp.

508{
509 try {
511 Class, Relationship, Name, Description, Type, Composite, Exclusive, Dependent, LowCc, HighCc));
512 } catch (oks::exception& Ex) {
513 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
514 }
515}
RemoveRelationship(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name, std::string Description, std::string Type, bool Composite, bool Exclusive, bool Dependent, dunedaq::oks::OksRelationship::CardinalityConstraint LowCc, dunedaq::oks::OksRelationship::CardinalityConstraint HighCc)

◆ PushRemoveSuperClassCommand()

void dbse::KernelWrapper::PushRemoveSuperClassCommand ( dunedaq::oks::OksClass * Class,
std::string SuperClass )

Definition at line 358 of file SchemaKernelWrapper.cpp.

359{
360 try {
361 CommandStack->push(new RemoveSuperClassCommand(Class, SuperClass));
362 } catch (oks::exception& Ex) {
363 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
364 }
365}
RemoveSuperClassCommand(dunedaq::oks::OksClass *Class, std::string SuperClass)

◆ PushSetAbstractClassCommand()

void dbse::KernelWrapper::PushSetAbstractClassCommand ( dunedaq::oks::OksClass * Class,
bool Value )

Commands Functions Class commands

Definition at line 328 of file SchemaKernelWrapper.cpp.

329{
330 try {
331 CommandStack->push(new SetAbstractClassCommand(Class, Value));
332 } catch (oks::exception& Ex) {
333 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
334 }
335}
SetAbstractClassCommand(dunedaq::oks::OksClass *Class, bool Value)

◆ PushSetAttributeDescriptionCommand()

void dbse::KernelWrapper::PushSetAttributeDescriptionCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewDescription )

Definition at line 638 of file SchemaKernelWrapper.cpp.

641{
642 try {
643 CommandStack->push(new SetAttributeDescriptionCommand(Class, Attribute, NewDescription));
644 } catch (oks::exception& Ex) {
645 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
646 }
647}
SetAttributeDescriptionCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewDescription)

◆ PushSetAttributeFormatCommand()

void dbse::KernelWrapper::PushSetAttributeFormatCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
dunedaq::oks::OksAttribute::Format NewFormat )

Definition at line 670 of file SchemaKernelWrapper.cpp.

673{
674 try {
675 CommandStack->push(new SetAttributeFormatCommand(Class, Attribute, NewFormat));
676 } catch (oks::exception& Ex) {
677 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
678 }
679}
SetAttributeFormatCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, dunedaq::oks::OksAttribute::Format NewFormat)

◆ PushSetAttributeInitialValuesCommand()

void dbse::KernelWrapper::PushSetAttributeInitialValuesCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewValues )

Definition at line 702 of file SchemaKernelWrapper.cpp.

705{
706 try {
707 CommandStack->push(new SetAttributeInitialValuesCommand(Class, Attribute, NewValues));
708 } catch (oks::exception& Ex) {
709 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
710 }
711}
SetAttributeInitialValuesCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewValues)

◆ PushSetAttributeIsNullCommand()

void dbse::KernelWrapper::PushSetAttributeIsNullCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
bool NewIsNull )

Definition at line 692 of file SchemaKernelWrapper.cpp.

693{
694 try {
695 CommandStack->push(new SetAttributeIsNullCommand(Class, Attribute, NewIsNull));
696 } catch (oks::exception& Ex) {
697 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
698 }
699}
SetAttributeIsNullCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsNull)

◆ PushSetAttributeMultiCommand()

void dbse::KernelWrapper::PushSetAttributeMultiCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
bool NewIsMulti )

Definition at line 682 of file SchemaKernelWrapper.cpp.

683{
684 try {
685 CommandStack->push(new SetAttributeMultiCommand(Class, Attribute, NewIsMulti));
686 } catch (oks::exception& Ex) {
687 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
688 }
689}
SetAttributeMultiCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsMulti)

◆ PushSetAttributeNameCommand()

void dbse::KernelWrapper::PushSetAttributeNameCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewName )

Attribute commands.

Definition at line 628 of file SchemaKernelWrapper.cpp.

629{
630 try {
631 CommandStack->push(new SetAttributeNameCommand(Class, Attribute, NewName));
632 } catch (oks::exception& Ex) {
633 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
634 }
635}
SetAttributeNameCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewName)

◆ PushSetAttributeRangeCommand()

void dbse::KernelWrapper::PushSetAttributeRangeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewRange )

Definition at line 660 of file SchemaKernelWrapper.cpp.

661{
662 try {
663 CommandStack->push(new SetAttributeRangeCommand(Class, Attribute, NewRange));
664 } catch (oks::exception& Ex) {
665 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
666 }
667}
SetAttributeRangeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewRange)

◆ PushSetAttributeTypeCommand()

void dbse::KernelWrapper::PushSetAttributeTypeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewType )

Definition at line 650 of file SchemaKernelWrapper.cpp.

651{
652 try {
653 CommandStack->push(new SetAttributeTypeCommand(Class, Attribute, NewType));
654 } catch (oks::exception& Ex) {
655 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
656 }
657}
SetAttributeTypeCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewType)

◆ PushSetClassTypeRelationshipCommand()

void dbse::KernelWrapper::PushSetClassTypeRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string ClassType )

Definition at line 401 of file SchemaKernelWrapper.cpp.

404{
405 try {
406 CommandStack->push(new SetClassTypeRelationshipCommand(Class, Relationship, ClassType));
407 } catch (oks::exception& Ex) {
408 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
409 }
410}
SetClassTypeRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string ClassType)

◆ PushSetDescriptionClassCommand()

void dbse::KernelWrapper::PushSetDescriptionClassCommand ( dunedaq::oks::OksClass * Class,
std::string Description )

Definition at line 338 of file SchemaKernelWrapper.cpp.

339{
340 try {
341 CommandStack->push(new SetDescriptionClassCommand(Class, Description));
342 } catch (oks::exception& Ex) {
343 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
344 }
345}
SetDescriptionClassCommand(dunedaq::oks::OksClass *Class, std::string Description)

◆ PushSetDescriptionMethodCommand()

void dbse::KernelWrapper::PushSetDescriptionMethodCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string description )

Definition at line 595 of file SchemaKernelWrapper.cpp.

596{
597 try {
598 CommandStack->push(new SetDescriptionMethodCommand(Class, Method, description));
599 } catch (oks::exception& Ex) {
600 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
601 }
602}
SetDescriptionMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string description)

◆ PushSetDescriptionRelationshipCommand()

void dbse::KernelWrapper::PushSetDescriptionRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string Description )

Definition at line 413 of file SchemaKernelWrapper.cpp.

416{
417 try {
418 CommandStack->push(new SetDescriptionRelationshipCommand(Class, Relationship, Description));
419 } catch (oks::exception& Ex) {
420 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
421 }
422}
SetDescriptionRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Description)

◆ PushSetHighCcRelationshipCommand()

void dbse::KernelWrapper::PushSetHighCcRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality )

Definition at line 437 of file SchemaKernelWrapper.cpp.

440{
441 try {
442 CommandStack->push(new SetHighCcRelationshipCommand(Class, Relationship, NewCardinality));
443 } catch (oks::exception& Ex) {
444 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
445 }
446}
SetHighCcRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)

◆ PushSetIsCompositeRelationshipCommand()

void dbse::KernelWrapper::PushSetIsCompositeRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
bool Value )

Definition at line 449 of file SchemaKernelWrapper.cpp.

450{
451 try {
452 CommandStack->push(new SetIsCompositeRelationshipCommand(Class, Relationship, Value));
453 } catch (oks::exception& Ex) {
454 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
455 }
456}
SetIsCompositeRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)

◆ PushSetIsDependentRelationshipCommand()

void dbse::KernelWrapper::PushSetIsDependentRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
bool Value )

Definition at line 459 of file SchemaKernelWrapper.cpp.

460{
461 try {
462 CommandStack->push(new SetIsDependentRelationshipCommand(Class, Relationship, Value));
463 } catch (oks::exception& Ex) {
464 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
465 }
466}
SetIsDependentRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)

◆ PushSetIsExclusiveRelationshipCommand()

void dbse::KernelWrapper::PushSetIsExclusiveRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
bool Value )

Definition at line 469 of file SchemaKernelWrapper.cpp.

470{
471 try {
472 CommandStack->push(new SetIsExclusiveRelationshipCommand(Class, Relationship, Value));
473 } catch (oks::exception& Ex) {
474 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
475 }
476}
SetIsExclusiveRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)

◆ PushSetLowCcRelationshipCommand()

void dbse::KernelWrapper::PushSetLowCcRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality )

Definition at line 425 of file SchemaKernelWrapper.cpp.

428{
429 try {
430 CommandStack->push(new SetLowCcRelationshipCommand(Class, Relationship, NewCardinality));
431 } catch (oks::exception& Ex) {
432 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
433 }
434}
SetLowCcRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, dunedaq::oks::OksRelationship::CardinalityConstraint NewCardinality)

◆ PushSetMethodImplementationBody()

void dbse::KernelWrapper::PushSetMethodImplementationBody ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
dunedaq::oks::OksMethodImplementation * Implementation,
std::string Body )

Definition at line 544 of file SchemaKernelWrapper.cpp.

548{
549 try {
550 CommandStack->push(new SetMethodImplementationBody(Class, Method, Implementation, Body));
551 } catch (oks::exception& Ex) {
552 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
553 }
554}
SetMethodImplementationBody(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Body)

◆ PushSetMethodImplementationLanguage()

void dbse::KernelWrapper::PushSetMethodImplementationLanguage ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
dunedaq::oks::OksMethodImplementation * Implementation,
std::string Language )

Method implementation commands.

Definition at line 518 of file SchemaKernelWrapper.cpp.

522{
523 try {
524 CommandStack->push(new SetMethodImplementationLanguage(Class, Method, Implementation, Language));
525 } catch (oks::exception& Ex) {
526 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
527 }
528}
SetMethodImplementationLanguage(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Language)

◆ PushSetMethodImplementationPrototype()

void dbse::KernelWrapper::PushSetMethodImplementationPrototype ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
dunedaq::oks::OksMethodImplementation * Implementation,
std::string Prototype )

Definition at line 531 of file SchemaKernelWrapper.cpp.

535{
536 try {
537 CommandStack->push(new SetMethodImplementationPrototype(Class, Method, Implementation, Prototype));
538 } catch (oks::exception& Ex) {
539 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
540 }
541}
SetMethodImplementationPrototype(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Prototype)

◆ PushSetNameMethodCommand()

void dbse::KernelWrapper::PushSetNameMethodCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string name )

Method commands.

Definition at line 585 of file SchemaKernelWrapper.cpp.

586{
587 try {
588 CommandStack->push(new SetNameMethodCommand(Class, Method, name));
589 } catch (oks::exception& Ex) {
590 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
591 }
592}
SetNameMethodCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name)

◆ PushSetNameRelationshipCommand()

void dbse::KernelWrapper::PushSetNameRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string Name )

Relationship commands.

Definition at line 391 of file SchemaKernelWrapper.cpp.

392{
393 try {
394 CommandStack->push(new SetNameRelationshipCommand(Class, Relationship, Name));
395 } catch (oks::exception& Ex) {
396 QMessageBox::warning(0, "Schema editor", QString("Error : \n\n %1").arg(Ex.what()));
397 }
398}
SetNameRelationshipCommand(dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string Name)

◆ RebuildAttributeModel

void dbse::KernelWrapper::RebuildAttributeModel ( )
signal

◆ RemoveInclude()

void dbse::KernelWrapper::RemoveInclude ( std::string schemaFile,
std::string IncludeFile ) const

Definition at line 92 of file SchemaKernelWrapper.cpp.

93{
94 auto ParentSchema = Kernel->find_schema_file(schemaFile);
95 if (ParentSchema != nullptr) {
96 ParentSchema->remove_include_file(IncludeFile);
97 }
98}

◆ SaveAllSchema()

void dbse::KernelWrapper::SaveAllSchema ( ) const

Definition at line 195 of file SchemaKernelWrapper.cpp.

196{
198}
void save_all_schema()
Save all OKS schema files.
Definition kernel.cpp:2594

◆ SaveModifiedSchema()

std::string dbse::KernelWrapper::SaveModifiedSchema ( ) const

Definition at line 225 of file SchemaKernelWrapper.cpp.

226{
227 std::string saved{ "" };
228 for (auto [name, file] : Kernel->schema_files()) {
229 if (file->is_updated()) {
230 Kernel->save_schema(file);
231 saved += file->get_full_file_name() + "\n\n";
232 }
233 }
234 return saved;
235}
void save_schema(OksFile *file_h, bool force=false, OksFile *true_file_h=0)
Save OKS schema file.
Definition kernel.cpp:2357

◆ SaveSchema()

void dbse::KernelWrapper::SaveSchema ( const std::string & file) const

Definition at line 238 of file SchemaKernelWrapper.cpp.

239{
240 OksFile* file = Kernel->find_schema_file(schema_file);
241 Kernel->save_schema(file);
242}

◆ SetActiveSchema()

void dbse::KernelWrapper::SetActiveSchema ( const std::string & ActiveSchema)

Definition at line 32 of file SchemaKernelWrapper.cpp.

33{
34 OksFile* File = Kernel->find_schema_file(ActiveSchema);
35
36 if (File && IsFileWritable(ActiveSchema)) {
38 emit active_updated();
39 }
40}
bool IsFileWritable(const std::string &FileName) const
void set_active_schema(OksFile *file_h)
Set active OKS schema file.
Definition kernel.cpp:2699

◆ SetInheritanceMode()

void dbse::KernelWrapper::SetInheritanceMode ( bool Mode)

Editor Functions.

Definition at line 310 of file SchemaKernelWrapper.cpp.

311{
312 InheritanceMode = Mode;
313}

◆ SchemaAttributeEditor

friend class SchemaAttributeEditor
friend

Definition at line 29 of file SchemaKernelWrapper.hpp.

◆ SchemaClassEditor

friend class SchemaClassEditor
friend

Definition at line 28 of file SchemaKernelWrapper.hpp.

◆ SchemaMainWindow

friend class SchemaMainWindow
friend

Definition at line 27 of file SchemaKernelWrapper.hpp.

◆ SchemaMethodEditor

friend class SchemaMethodEditor
friend

Definition at line 30 of file SchemaKernelWrapper.hpp.

◆ SchemaRelationshipEditor

friend class SchemaRelationshipEditor
friend

Definition at line 31 of file SchemaKernelWrapper.hpp.

Member Data Documentation

◆ CommandStack

QUndoStack* dbse::KernelWrapper::CommandStack
private

Definition at line 206 of file SchemaKernelWrapper.hpp.

◆ InheritanceMode

bool dbse::KernelWrapper::InheritanceMode
private

Definition at line 207 of file SchemaKernelWrapper.hpp.

◆ Kernel

dunedaq::oks::OksKernel* dbse::KernelWrapper::Kernel
private

Definition at line 205 of file SchemaKernelWrapper.hpp.


The documentation for this class was generated from the following files: