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

#include <SchemaCommand.hpp>

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

Public Member Functions

 AddMethodImplementationComand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksMethod *Method, std::string Language, std::string Prototype, std::string Body)
 
 ~AddMethodImplementationComand ()
 
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 326 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ AddMethodImplementationComand()

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

Definition at line 604 of file SchemaCommand.cpp.

609 : ClassName(Class->get_name()),
610 SchemaMethod ( Method ),
611 MethodName ( Method->get_name() ),
612 SchemaImplementationLanguage ( Language ),
613 SchemaImplementationPrototype ( Prototype ),
615{
616 setText( QString::fromStdString("Added implementation for method \"" + SchemaMethod->get_name() + "\" for class \"" + Class->get_name() + "\""));
617}
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

◆ ~AddMethodImplementationComand()

dbse::AddMethodImplementationComand::~AddMethodImplementationComand ( )

Definition at line 619 of file SchemaCommand.cpp.

620{
621}

Member Function Documentation

◆ redo()

void dbse::AddMethodImplementationComand::redo ( )

Definition at line 623 of file SchemaCommand.cpp.

624{
626 if(m != nullptr) {
627 SchemaMethod = m;
628 }
629
633 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
634}
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 add_implementation(const std::string &language, const std::string &prototype, const std::string &body)
Add method implementation.
Definition method.cpp:365

◆ undo()

void dbse::AddMethodImplementationComand::undo ( )

Definition at line 636 of file SchemaCommand.cpp.

637{
639 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
640}
void remove_implementation(const std::string &language)
Remove method implementation.
Definition method.cpp:388

Member Data Documentation

◆ ClassName

std::string dbse::AddMethodImplementationComand::ClassName
private

Definition at line 336 of file SchemaCommand.hpp.

◆ MethodName

std::string dbse::AddMethodImplementationComand::MethodName
private

Definition at line 338 of file SchemaCommand.hpp.

◆ SchemaImplementationBody

std::string dbse::AddMethodImplementationComand::SchemaImplementationBody
private

Definition at line 341 of file SchemaCommand.hpp.

◆ SchemaImplementationLanguage

std::string dbse::AddMethodImplementationComand::SchemaImplementationLanguage
private

Definition at line 339 of file SchemaCommand.hpp.

◆ SchemaImplementationPrototype

std::string dbse::AddMethodImplementationComand::SchemaImplementationPrototype
private

Definition at line 340 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 337 of file SchemaCommand.hpp.


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