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

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
dunedaq::oks::OksMethodSchemaMethod
std::string MethodName
std::string NewMethodDescription
std::string OldMethodDescription

Detailed Description

Definition at line 382 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetDescriptionMethodCommand()

dbse::SetDescriptionMethodCommand::SetDescriptionMethodCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string description )

Definition at line 715 of file SchemaCommand.cpp.

718 : ClassName(Class->get_name()),
719 SchemaMethod ( Method ),
720 MethodName ( Method->get_name() ),
721 NewMethodDescription ( description ),
722 OldMethodDescription ( SchemaMethod->get_description() )
723{
724 setText( QString::fromStdString("Set description for method \"" + SchemaMethod->get_name() + "\" of class \"" + Class->get_name() + "\""));
725}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:368
const std::string & get_name() const noexcept
Definition method.hpp:201

◆ ~SetDescriptionMethodCommand()

dbse::SetDescriptionMethodCommand::~SetDescriptionMethodCommand ( )

Definition at line 727 of file SchemaCommand.cpp.

728{
729}

Member Function Documentation

◆ redo()

void dbse::SetDescriptionMethodCommand::redo ( )

Definition at line 731 of file SchemaCommand.cpp.

732{
734 if(m != nullptr) {
735 SchemaMethod = m;
736 }
737 SchemaMethod->set_description ( NewMethodDescription );
738
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:1335

◆ undo()

void dbse::SetDescriptionMethodCommand::undo ( )

Definition at line 742 of file SchemaCommand.cpp.

743{
744 SchemaMethod->set_description ( OldMethodDescription );
745 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
746}

Member Data Documentation

◆ ClassName

std::string dbse::SetDescriptionMethodCommand::ClassName
private

Definition at line 390 of file SchemaCommand.hpp.

◆ MethodName

std::string dbse::SetDescriptionMethodCommand::MethodName
private

Definition at line 392 of file SchemaCommand.hpp.

◆ NewMethodDescription

std::string dbse::SetDescriptionMethodCommand::NewMethodDescription
private

Definition at line 393 of file SchemaCommand.hpp.

◆ OldMethodDescription

std::string dbse::SetDescriptionMethodCommand::OldMethodDescription
private

Definition at line 394 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 391 of file SchemaCommand.hpp.


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