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 363 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 680 of file SchemaCommand.cpp.

681 : ClassName(Class->get_name()),
682 SchemaMethod ( Method ),
683 NewMethodName ( name ),
685{
686 setText( QString::fromStdString("Set name for method \"" + SchemaMethod->get_name() + "\" of class \"" + Class->get_name() + "\""));
687}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:363
const std::string & get_name() const noexcept
Definition method.hpp:196

◆ ~SetNameMethodCommand()

dbse::SetNameMethodCommand::~SetNameMethodCommand ( )

Definition at line 689 of file SchemaCommand.cpp.

690{
691}

Member Function Documentation

◆ redo()

void dbse::SetNameMethodCommand::redo ( )

Definition at line 693 of file SchemaCommand.cpp.

694{
696 if(m != nullptr) {
697 SchemaMethod = m;
698 }
699
701 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
702}
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:1330
OKS method class.
Definition method.hpp:153
void set_name(const std::string &name)
Set method name.
Definition method.cpp:298

◆ undo()

void dbse::SetNameMethodCommand::undo ( )

Definition at line 704 of file SchemaCommand.cpp.

705{
707 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
708}

Member Data Documentation

◆ ClassName

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

Definition at line 371 of file SchemaCommand.hpp.

◆ NewMethodName

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

Definition at line 373 of file SchemaCommand.hpp.

◆ OldMethodName

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

Definition at line 374 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 372 of file SchemaCommand.hpp.


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