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::OksMethod * SchemaMethod
std::string NewMethodName
std::string OldMethodName

Detailed Description

Method commands.

Definition at line 415 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 718 of file SchemaCommand.cpp.

719 : ClassName(Class->get_name())
720 , SchemaMethod(Method)
721 , NewMethodName(name)
723{
724 setText(QString::fromStdString("Set name for method \"" + SchemaMethod->get_name() + "\" of class \"" +
725 Class->get_name() + "\""));
726}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:374
const std::string & get_name() const noexcept
Definition method.hpp:185

◆ ~SetNameMethodCommand()

dbse::SetNameMethodCommand::~SetNameMethodCommand ( )

Definition at line 728 of file SchemaCommand.cpp.

728{}

Member Function Documentation

◆ redo()

void dbse::SetNameMethodCommand::redo ( )

Definition at line 731 of file SchemaCommand.cpp.

732{
734 if (m != nullptr) {
735 SchemaMethod = m;
736 }
737
739 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
740}
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:1290
void set_name(const std::string &name)
Set method name.
Definition method.cpp:308

◆ undo()

void dbse::SetNameMethodCommand::undo ( )

Definition at line 743 of file SchemaCommand.cpp.

744{
746 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
747}

Member Data Documentation

◆ ClassName

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

Definition at line 424 of file SchemaCommand.hpp.

◆ NewMethodName

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

Definition at line 426 of file SchemaCommand.hpp.

◆ OldMethodName

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

Definition at line 427 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 425 of file SchemaCommand.hpp.


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