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

#include <SchemaCommand.hpp>

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

Public Member Functions

 CreateClassCommand (std::string ClassName, std::string ClassDescription, bool Abstract)
 ~CreateClassCommand ()
void redo ()
void undo ()

Private Attributes

dunedaq::oks::OksClass * SchemaClass
std::string SchemaClassName
std::string SchemaClassDescription
bool SchemaAbstract

Detailed Description

Definition at line 79 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ CreateClassCommand()

dbse::CreateClassCommand::CreateClassCommand ( std::string ClassName,
std::string ClassDescription,
bool Abstract )

Definition at line 64 of file SchemaCommand.cpp.

65 : SchemaClass(nullptr)
66 , SchemaClassName(ClassName)
67 , SchemaClassDescription(ClassDescription)
68 , SchemaAbstract(Abstract)
69{
70 setText(QString::fromStdString("Created new class \"" + ClassName + "\""));
71}
dunedaq::oks::OksClass * SchemaClass

◆ ~CreateClassCommand()

dbse::CreateClassCommand::~CreateClassCommand ( )

Definition at line 73 of file SchemaCommand.cpp.

73{}

Member Function Documentation

◆ redo()

void dbse::CreateClassCommand::redo ( )

Definition at line 76 of file SchemaCommand.cpp.

77{
80 emit KernelWrapper::GetInstance().ClassCreated(QString::fromStdString(SchemaClassName));
81}
static KernelWrapper & GetInstance()
void ClassCreated(QString ClassName)
OksClass(const std::string &name, OksKernel *kernel, bool transient=false)
Create OKS class.
Definition class.cpp:81

◆ undo()

void dbse::CreateClassCommand::undo ( )

Definition at line 84 of file SchemaCommand.cpp.

85{
86 try {
88 emit KernelWrapper::GetInstance().ClassRemoved(QString::fromStdString(SchemaClassName));
89 } catch (...) {
90 QMessageBox::warning(0, "Schema editor", QString("Error"));
91 }
92}
void ClassRemoved(QString ClassName)
static void destroy(OksClass *c)
Destroy OKS class.
Definition class.cpp:172

Member Data Documentation

◆ SchemaAbstract

bool dbse::CreateClassCommand::SchemaAbstract
private

Definition at line 91 of file SchemaCommand.hpp.

◆ SchemaClass

dunedaq::oks::OksClass* dbse::CreateClassCommand::SchemaClass
private

Definition at line 88 of file SchemaCommand.hpp.

◆ SchemaClassDescription

std::string dbse::CreateClassCommand::SchemaClassDescription
private

Definition at line 90 of file SchemaCommand.hpp.

◆ SchemaClassName

std::string dbse::CreateClassCommand::SchemaClassName
private

Definition at line 89 of file SchemaCommand.hpp.


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