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 331 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 609 of file SchemaCommand.cpp.

614 : ClassName(Class->get_name()),
615 SchemaMethod ( Method ),
616 MethodName ( Method->get_name() ),
617 SchemaImplementationLanguage ( Language ),
618 SchemaImplementationPrototype ( Prototype ),
620{
621 setText( QString::fromStdString("Added implementation for method \"" + SchemaMethod->get_name() + "\" for class \"" + Class->get_name() + "\""));
622}
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

◆ ~AddMethodImplementationComand()

dbse::AddMethodImplementationComand::~AddMethodImplementationComand ( )

Definition at line 624 of file SchemaCommand.cpp.

625{
626}

Member Function Documentation

◆ redo()

void dbse::AddMethodImplementationComand::redo ( )

Definition at line 628 of file SchemaCommand.cpp.

629{
631 if(m != nullptr) {
632 SchemaMethod = m;
633 }
634
635 SchemaMethod->add_implementation ( SchemaImplementationLanguage,
638 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
639}
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::AddMethodImplementationComand::undo ( )

Definition at line 641 of file SchemaCommand.cpp.

642{
643 SchemaMethod->remove_implementation ( SchemaImplementationLanguage );
644 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
645}

Member Data Documentation

◆ ClassName

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

Definition at line 341 of file SchemaCommand.hpp.

◆ MethodName

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

Definition at line 343 of file SchemaCommand.hpp.

◆ SchemaImplementationBody

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

Definition at line 346 of file SchemaCommand.hpp.

◆ SchemaImplementationLanguage

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

Definition at line 344 of file SchemaCommand.hpp.

◆ SchemaImplementationPrototype

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

Definition at line 345 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 342 of file SchemaCommand.hpp.


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