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::OksMethod * SchemaMethod
std::string MethodName
std::string SchemaImplementationLanguage
std::string SchemaImplementationPrototype
std::string SchemaImplementationBody

Detailed Description

Definition at line 372 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 642 of file SchemaCommand.cpp.

647 : ClassName(Class->get_name())
648 , SchemaMethod(Method)
649 , MethodName(Method->get_name())
653{
654 setText(QString::fromStdString("Added implementation for method \"" + SchemaMethod->get_name() + "\" for class \"" +
655 Class->get_name() + "\""));
656}
dunedaq::oks::OksMethod * SchemaMethod
const std::string & get_name() const noexcept
Definition class.hpp:374
const std::string & get_name() const noexcept
Definition method.hpp:185

◆ ~AddMethodImplementationComand()

dbse::AddMethodImplementationComand::~AddMethodImplementationComand ( )

Definition at line 658 of file SchemaCommand.cpp.

658{}

Member Function Documentation

◆ redo()

void dbse::AddMethodImplementationComand::redo ( )

Definition at line 661 of file SchemaCommand.cpp.

662{
664 if (m != nullptr) {
665 SchemaMethod = m;
666 }
667
670 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
671}
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:1290
void add_implementation(const std::string &language, const std::string &prototype, const std::string &body)
Add method implementation.
Definition method.cpp:370

◆ undo()

void dbse::AddMethodImplementationComand::undo ( )

Definition at line 674 of file SchemaCommand.cpp.

675{
677 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
678}
void remove_implementation(const std::string &language)
Remove method implementation.
Definition method.cpp:395

Member Data Documentation

◆ ClassName

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

Definition at line 385 of file SchemaCommand.hpp.

◆ MethodName

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

Definition at line 387 of file SchemaCommand.hpp.

◆ SchemaImplementationBody

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

Definition at line 390 of file SchemaCommand.hpp.

◆ SchemaImplementationLanguage

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

Definition at line 388 of file SchemaCommand.hpp.

◆ SchemaImplementationPrototype

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

Definition at line 389 of file SchemaCommand.hpp.

◆ SchemaMethod

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

Definition at line 386 of file SchemaCommand.hpp.


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