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

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
std::string MethodName
dunedaq::oks::OksMethodImplementation * SchemaImplementation
std::string ImplementationLanguage
std::string NewBody
std::string OldBody

Detailed Description

Definition at line 352 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetMethodImplementationBody()

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

Definition at line 603 of file SchemaCommand.cpp.

607 : ClassName(Class->get_name())
608 , MethodName(Method->get_name())
609 , SchemaImplementation(Implementation)
610 , ImplementationLanguage(Implementation->get_language())
611 , NewBody(Body)
613{
614 setText(QString::fromStdString("Changed body implementation for method \"" + SchemaImplementation->get_prototype() +
615 "\" of class \"" + Class->get_name() + "\""));
616}
dunedaq::oks::OksMethodImplementation * SchemaImplementation
const std::string & get_name() const noexcept
Definition class.hpp:374
const std::string & get_body() const noexcept
Definition method.hpp:101
const std::string & get_language() const noexcept
Definition method.hpp:69
const std::string & get_prototype() const noexcept
Definition method.hpp:86
const std::string & get_name() const noexcept
Definition method.hpp:185

◆ ~SetMethodImplementationBody()

dbse::SetMethodImplementationBody::~SetMethodImplementationBody ( )

Definition at line 618 of file SchemaCommand.cpp.

618{}

Member Function Documentation

◆ redo()

void dbse::SetMethodImplementationBody::redo ( )

Definition at line 621 of file SchemaCommand.cpp.

622{
623 OksMethodImplementation* mi = KernelWrapper::GetInstance()
627 if (mi != nullptr) {
629 }
630
632 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
633}
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 set_body(const std::string &body)
Set method implementation body.
Definition method.cpp:486
OksMethodImplementation * find_implementation(const std::string &language) const
Find method implementation.
Definition method.cpp:357

◆ undo()

void dbse::SetMethodImplementationBody::undo ( )

Definition at line 636 of file SchemaCommand.cpp.

637{
639 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
640}

Member Data Documentation

◆ ClassName

std::string dbse::SetMethodImplementationBody::ClassName
private

Definition at line 364 of file SchemaCommand.hpp.

◆ ImplementationLanguage

std::string dbse::SetMethodImplementationBody::ImplementationLanguage
private

Definition at line 367 of file SchemaCommand.hpp.

◆ MethodName

std::string dbse::SetMethodImplementationBody::MethodName
private

Definition at line 365 of file SchemaCommand.hpp.

◆ NewBody

std::string dbse::SetMethodImplementationBody::NewBody
private

Definition at line 368 of file SchemaCommand.hpp.

◆ OldBody

std::string dbse::SetMethodImplementationBody::OldBody
private

Definition at line 369 of file SchemaCommand.hpp.

◆ SchemaImplementation

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

Definition at line 366 of file SchemaCommand.hpp.


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