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::OksMethod * SchemaMethod
std::string SchemaName
std::string SchemaDescription

Detailed Description

Definition at line 446 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ AddMethodCommand()

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

Definition at line 781 of file SchemaCommand.cpp.

782 : ClassName(Class->get_name())
783 , SchemaMethod(nullptr)
784 , SchemaName(name)
785 , SchemaDescription(description)
786{
787 setText(QString::fromStdString("Added method \"" + name + "\" to class \"" + Class->get_name() + "\""));
788}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:374

◆ ~AddMethodCommand()

dbse::AddMethodCommand::~AddMethodCommand ( )

Definition at line 790 of file SchemaCommand.cpp.

790{}

Member Function Documentation

◆ redo()

void dbse::AddMethodCommand::redo ( )

Definition at line 793 of file SchemaCommand.cpp.

794{
797 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
798}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void add(OksAttribute *a)
Add attribute.
Definition class.cpp:1009
OksMethod(const std::string &name, OksClass *p=nullptr)
OKS method constructor.
Definition method.cpp:116

◆ undo()

void dbse::AddMethodCommand::undo ( )

Definition at line 801 of file SchemaCommand.cpp.

802{
803 // Do not delete SchemaMethod (probably deleted internally by the OKS library)
805 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
806}
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1082

Member Data Documentation

◆ ClassName

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

Definition at line 455 of file SchemaCommand.hpp.

◆ SchemaDescription

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

Definition at line 458 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 456 of file SchemaCommand.hpp.

◆ SchemaName

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

Definition at line 457 of file SchemaCommand.hpp.


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