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

#include <SchemaCommand.hpp>

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

Public Member Functions

 RemoveMethodImplementationComand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
 ~RemoveMethodImplementationComand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksMethodSchemaMethod
std::string MethodName
std::string SchemaImplementationLanguage
std::string SchemaImplementationPrototype
std::string SchemaImplementationBody

Detailed Description

Definition at line 344 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ RemoveMethodImplementationComand()

dbse::RemoveMethodImplementationComand::RemoveMethodImplementationComand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
std::string Language,
std::string Prototype,
std::string Body )

Definition at line 642 of file SchemaCommand.cpp.

647 : ClassName(Class->get_name()),
648 SchemaMethod ( Method ),
649 MethodName ( Method->get_name() ),
650 SchemaImplementationLanguage ( Language ),
651 SchemaImplementationPrototype ( Prototype ),
653{
654 setText( QString::fromStdString("Removed implementation for method \"" + SchemaMethod->get_name() + "\" for class \"" + Class->get_name() + "\""));
655}
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

◆ ~RemoveMethodImplementationComand()

dbse::RemoveMethodImplementationComand::~RemoveMethodImplementationComand ( )

Definition at line 657 of file SchemaCommand.cpp.

658{
659}

Member Function Documentation

◆ redo()

void dbse::RemoveMethodImplementationComand::redo ( )

Definition at line 661 of file SchemaCommand.cpp.

662{
664 if(m != nullptr) {
665 SchemaMethod = m;
666 }
667
668 SchemaMethod->remove_implementation ( SchemaImplementationLanguage );
669 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
670}
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

◆ undo()

void dbse::RemoveMethodImplementationComand::undo ( )

Definition at line 672 of file SchemaCommand.cpp.

673{
674 SchemaMethod->add_implementation ( SchemaImplementationLanguage,
677 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
678}

Member Data Documentation

◆ ClassName

std::string dbse::RemoveMethodImplementationComand::ClassName
private

Definition at line 354 of file SchemaCommand.hpp.

◆ MethodName

std::string dbse::RemoveMethodImplementationComand::MethodName
private

Definition at line 356 of file SchemaCommand.hpp.

◆ SchemaImplementationBody

std::string dbse::RemoveMethodImplementationComand::SchemaImplementationBody
private

Definition at line 359 of file SchemaCommand.hpp.

◆ SchemaImplementationLanguage

std::string dbse::RemoveMethodImplementationComand::SchemaImplementationLanguage
private

Definition at line 357 of file SchemaCommand.hpp.

◆ SchemaImplementationPrototype

std::string dbse::RemoveMethodImplementationComand::SchemaImplementationPrototype
private

Definition at line 358 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 355 of file SchemaCommand.hpp.


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