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

Methods implementation commands. More...

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetMethodImplementationLanguage (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, dunedaq::oks::OksMethodImplementation *Implementation, std::string Language)
 ~SetMethodImplementationLanguage ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
std::string MethodName
dunedaq::oks::OksMethodImplementationSchemaImplementation
std::string NewLanguage
std::string OldLanguage

Detailed Description

Methods implementation commands.

Definition at line 273 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetMethodImplementationLanguage()

dbse::SetMethodImplementationLanguage::SetMethodImplementationLanguage ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksMethod * Method,
dunedaq::oks::OksMethodImplementation * Implementation,
std::string Language )

Definition at line 506 of file SchemaCommand.cpp.

508 : ClassName(Class->get_name()),
509 MethodName ( Method->get_name() ),
510 SchemaImplementation ( Implementation ),
511 NewLanguage ( Language ),
512 OldLanguage ( SchemaImplementation->get_language() )
513{
514 setText( QString::fromStdString("Changed language implementation for \"" + SchemaImplementation->get_prototype() + "\" of class \"" + Class->get_name() + "\""));
515}
dunedaq::oks::OksMethodImplementation * SchemaImplementation
const std::string & get_name() const noexcept
Definition class.hpp:363
const std::string & get_name() const noexcept
Definition method.hpp:196

◆ ~SetMethodImplementationLanguage()

dbse::SetMethodImplementationLanguage::~SetMethodImplementationLanguage ( )

Definition at line 517 of file SchemaCommand.cpp.

518{
519}

Member Function Documentation

◆ redo()

void dbse::SetMethodImplementationLanguage::redo ( )

Definition at line 521 of file SchemaCommand.cpp.

522{
524 if(mi != nullptr) {
526 }
527
528 SchemaImplementation->set_language ( NewLanguage );
529 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
530}
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
OksMethodImplementation * find_implementation(const std::string &language) const
Find method implementation.
Definition method.cpp:354

◆ undo()

void dbse::SetMethodImplementationLanguage::undo ( )

Definition at line 532 of file SchemaCommand.cpp.

533{
534 SchemaImplementation->set_language ( OldLanguage );
535 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
536}

Member Data Documentation

◆ ClassName

std::string dbse::SetMethodImplementationLanguage::ClassName
private

Definition at line 284 of file SchemaCommand.hpp.

◆ MethodName

std::string dbse::SetMethodImplementationLanguage::MethodName
private

Definition at line 285 of file SchemaCommand.hpp.

◆ NewLanguage

std::string dbse::SetMethodImplementationLanguage::NewLanguage
private

Definition at line 287 of file SchemaCommand.hpp.

◆ OldLanguage

std::string dbse::SetMethodImplementationLanguage::OldLanguage
private

Definition at line 288 of file SchemaCommand.hpp.

◆ SchemaImplementation

dunedaq::oks::OksMethodImplementation* dbse::SetMethodImplementationLanguage::SchemaImplementation
private

Definition at line 286 of file SchemaCommand.hpp.


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