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

Constructor & Destructor Documentation

◆ AddMethodCommand()

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

Definition at line 748 of file SchemaCommand.cpp.

750 : ClassName ( Class->get_name() ),
751 SchemaMethod ( nullptr ),
752 SchemaName ( name ),
753 SchemaDescription ( description )
754{
755 setText( QString::fromStdString("Added method \"" + name + "\" to class \"" + Class->get_name() + "\""));
756}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:368

◆ ~AddMethodCommand()

dbse::AddMethodCommand::~AddMethodCommand ( )

Definition at line 758 of file SchemaCommand.cpp.

759{
760}

Member Function Documentation

◆ redo()

void dbse::AddMethodCommand::redo ( )

Definition at line 762 of file SchemaCommand.cpp.

763{
764 SchemaMethod = new OksMethod ( SchemaName, SchemaDescription );
766 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
767}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void add(OksAttribute *a)
Add attribute.
Definition class.cpp:1057

◆ undo()

void dbse::AddMethodCommand::undo ( )

Definition at line 769 of file SchemaCommand.cpp.

770{
771 // Do not delete SchemaMethod (probably deleted internally by the OKS library)
773 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
774}
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1130

Member Data Documentation

◆ ClassName

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

Definition at line 405 of file SchemaCommand.hpp.

◆ SchemaDescription

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

Definition at line 408 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 406 of file SchemaCommand.hpp.

◆ SchemaName

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

Definition at line 407 of file SchemaCommand.hpp.


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