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 278 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 511 of file SchemaCommand.cpp.

513 : ClassName(Class->get_name()),
514 MethodName ( Method->get_name() ),
515 SchemaImplementation ( Implementation ),
516 NewLanguage ( Language ),
517 OldLanguage ( SchemaImplementation->get_language() )
518{
519 setText( QString::fromStdString("Changed language implementation for \"" + SchemaImplementation->get_prototype() + "\" of class \"" + Class->get_name() + "\""));
520}
dunedaq::oks::OksMethodImplementation * SchemaImplementation
const std::string & get_name() const noexcept
Definition class.hpp:368
const std::string & get_name() const noexcept
Definition method.hpp:201

◆ ~SetMethodImplementationLanguage()

dbse::SetMethodImplementationLanguage::~SetMethodImplementationLanguage ( )

Definition at line 522 of file SchemaCommand.cpp.

523{
524}

Member Function Documentation

◆ redo()

void dbse::SetMethodImplementationLanguage::redo ( )

Definition at line 526 of file SchemaCommand.cpp.

527{
529 if(mi != nullptr) {
531 }
532
533 SchemaImplementation->set_language ( NewLanguage );
534 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
535}
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
OksMethodImplementation * find_implementation(const std::string &language) const
Find method implementation.
Definition method.cpp:359

◆ undo()

void dbse::SetMethodImplementationLanguage::undo ( )

Definition at line 537 of file SchemaCommand.cpp.

538{
539 SchemaImplementation->set_language ( OldLanguage );
540 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
541}

Member Data Documentation

◆ ClassName

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

Definition at line 289 of file SchemaCommand.hpp.

◆ MethodName

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

Definition at line 290 of file SchemaCommand.hpp.

◆ NewLanguage

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

Definition at line 292 of file SchemaCommand.hpp.

◆ OldLanguage

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

Definition at line 293 of file SchemaCommand.hpp.

◆ SchemaImplementation

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

Definition at line 291 of file SchemaCommand.hpp.


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