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

Method commands. More...

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetNameMethodCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string name)
 ~SetNameMethodCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksMethodSchemaMethod
std::string NewMethodName
std::string OldMethodName

Detailed Description

Method commands.

Definition at line 368 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetNameMethodCommand()

dbse::SetNameMethodCommand::SetNameMethodCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string name )

Definition at line 685 of file SchemaCommand.cpp.

686 : ClassName(Class->get_name()),
687 SchemaMethod ( Method ),
688 NewMethodName ( name ),
689 OldMethodName ( SchemaMethod->get_name() )
690{
691 setText( QString::fromStdString("Set name for method \"" + SchemaMethod->get_name() + "\" of class \"" + Class->get_name() + "\""));
692}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:368

◆ ~SetNameMethodCommand()

dbse::SetNameMethodCommand::~SetNameMethodCommand ( )

Definition at line 694 of file SchemaCommand.cpp.

695{
696}

Member Function Documentation

◆ redo()

void dbse::SetNameMethodCommand::redo ( )

Definition at line 698 of file SchemaCommand.cpp.

699{
701 if(m != nullptr) {
702 SchemaMethod = m;
703 }
704
705 SchemaMethod->set_name ( NewMethodName );
706 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
707}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OksMethod * find_direct_method(const std::string &name) const noexcept
Find direct method.
Definition class.cpp:1335

◆ undo()

void dbse::SetNameMethodCommand::undo ( )

Definition at line 709 of file SchemaCommand.cpp.

710{
711 SchemaMethod->set_name ( OldMethodName );
712 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
713}

Member Data Documentation

◆ ClassName

std::string dbse::SetNameMethodCommand::ClassName
private

Definition at line 376 of file SchemaCommand.hpp.

◆ NewMethodName

std::string dbse::SetNameMethodCommand::NewMethodName
private

Definition at line 378 of file SchemaCommand.hpp.

◆ OldMethodName

std::string dbse::SetNameMethodCommand::OldMethodName
private

Definition at line 379 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 377 of file SchemaCommand.hpp.


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