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

#include <SchemaCommand.hpp>

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

Public Member Functions

 AddMethodCommand (dunedaq::oks::OksClass *Class, std::string name, std::string description)
 
 ~AddMethodCommand ()
 
void redo ()
 
void undo ()
 

Private Attributes

std::string ClassName
 
dunedaq::oks::OksMethodSchemaMethod
 
std::string SchemaName
 
std::string SchemaDescription
 

Detailed Description

Definition at line 392 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ AddMethodCommand()

dbse::AddMethodCommand::AddMethodCommand ( dunedaq::oks::OksClass * Class,
std::string name,
std::string description )

Definition at line 743 of file SchemaCommand.cpp.

745 : ClassName ( Class->get_name() ),
746 SchemaMethod ( nullptr ),
747 SchemaName ( name ),
748 SchemaDescription ( description )
749{
750 setText( QString::fromStdString("Added method \"" + name + "\" to class \"" + Class->get_name() + "\""));
751}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:363

◆ ~AddMethodCommand()

dbse::AddMethodCommand::~AddMethodCommand ( )

Definition at line 753 of file SchemaCommand.cpp.

754{
755}

Member Function Documentation

◆ redo()

void dbse::AddMethodCommand::redo ( )

Definition at line 757 of file SchemaCommand.cpp.

758{
761 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
762}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void add(OksAttribute *a)
Add attribute.
Definition class.cpp:1052
OKS method class.
Definition method.hpp:153

◆ undo()

void dbse::AddMethodCommand::undo ( )

Definition at line 764 of file SchemaCommand.cpp.

765{
766 // Do not delete SchemaMethod (probably deleted internally by the OKS library)
768 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
769}
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1125

Member Data Documentation

◆ ClassName

std::string dbse::AddMethodCommand::ClassName
private

Definition at line 400 of file SchemaCommand.hpp.

◆ SchemaDescription

std::string dbse::AddMethodCommand::SchemaDescription
private

Definition at line 403 of file SchemaCommand.hpp.

◆ SchemaMethod

dunedaq::oks::OksMethod* dbse::AddMethodCommand::SchemaMethod
private

Definition at line 401 of file SchemaCommand.hpp.

◆ SchemaName

std::string dbse::AddMethodCommand::SchemaName
private

Definition at line 402 of file SchemaCommand.hpp.


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