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::OksClassSchemaClass
std::string SchemaClassName
std::string SchemaClassDescription
bool SchemaAbstract

Detailed Description

Definition at line 76 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ CreateClassCommand()

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

Definition at line 67 of file SchemaCommand.cpp.

70 : SchemaClass ( nullptr ),
71 SchemaClassName ( ClassName ),
72 SchemaClassDescription ( ClassDescription ),
73 SchemaAbstract ( Abstract )
74{
75 setText ( QString::fromStdString("Created new class \"" + ClassName + "\"") );
76}
dunedaq::oks::OksClass * SchemaClass

◆ ~CreateClassCommand()

dbse::CreateClassCommand::~CreateClassCommand ( )

Definition at line 78 of file SchemaCommand.cpp.

79{
80}

Member Function Documentation

◆ redo()

void dbse::CreateClassCommand::redo ( )

Definition at line 82 of file SchemaCommand.cpp.

83{
85 KernelWrapper::GetInstance().GetKernel() );
86 emit KernelWrapper::GetInstance().ClassCreated(QString::fromStdString(SchemaClassName));
87}
static KernelWrapper & GetInstance()
void ClassCreated(QString ClassName)

◆ undo()

void dbse::CreateClassCommand::undo ( )

Definition at line 89 of file SchemaCommand.cpp.

90{
91 try
92 {
94 emit KernelWrapper::GetInstance().ClassRemoved(QString::fromStdString(SchemaClassName));
95 }
96 catch ( ... )
97 {
98 QMessageBox::warning ( 0, "Schema editor", QString ( "Error" ) );
99 }
100}
void ClassRemoved(QString ClassName)
static void destroy(OksClass *c)
Destroy OKS class.
Definition class.cpp:176

Member Data Documentation

◆ SchemaAbstract

bool dbse::CreateClassCommand::SchemaAbstract
private

Definition at line 87 of file SchemaCommand.hpp.

◆ SchemaClass

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

Definition at line 84 of file SchemaCommand.hpp.

◆ SchemaClassDescription

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

Definition at line 86 of file SchemaCommand.hpp.

◆ SchemaClassName

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

Definition at line 85 of file SchemaCommand.hpp.


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