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 71 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ CreateClassCommand()

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

Definition at line 62 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.

74{
75}

Member Function Documentation

◆ redo()

void dbse::CreateClassCommand::redo ( )

Definition at line 77 of file SchemaCommand.cpp.

78{
80 KernelWrapper::GetInstance().GetKernel() );
81 emit KernelWrapper::GetInstance().ClassCreated(QString::fromStdString(SchemaClassName));
82}
static KernelWrapper & GetInstance()
void ClassCreated(QString ClassName)
The OKS class.
Definition class.hpp:200

◆ undo()

void dbse::CreateClassCommand::undo ( )

Definition at line 84 of file SchemaCommand.cpp.

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

Member Data Documentation

◆ SchemaAbstract

bool dbse::CreateClassCommand::SchemaAbstract
private

Definition at line 82 of file SchemaCommand.hpp.

◆ SchemaClass

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

Definition at line 79 of file SchemaCommand.hpp.

◆ SchemaClassDescription

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

Definition at line 81 of file SchemaCommand.hpp.

◆ SchemaClassName

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

Definition at line 80 of file SchemaCommand.hpp.


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