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::OksMethodImplementationSchemaImplementation
std::string ImplementationLanguage
std::string NewBody
std::string OldBody

Detailed Description

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

578 : ClassName(Class->get_name()),
579 MethodName ( Method->get_name()),
580 SchemaImplementation ( Implementation ),
581 ImplementationLanguage ( Implementation->get_language() ),
582 NewBody ( Body ),
583 OldBody ( SchemaImplementation->get_body() )
584{
585 setText( QString::fromStdString("Changed body implementation for method \"" + SchemaImplementation->get_prototype() + "\" of class \"" + Class->get_name() + "\""));
586}
dunedaq::oks::OksMethodImplementation * SchemaImplementation
const std::string & get_name() const noexcept
Definition class.hpp:368
const std::string & get_language() const noexcept
Definition method.hpp:68
const std::string & get_name() const noexcept
Definition method.hpp:201

◆ ~SetMethodImplementationBody()

dbse::SetMethodImplementationBody::~SetMethodImplementationBody ( )

Definition at line 588 of file SchemaCommand.cpp.

589{
590}

Member Function Documentation

◆ redo()

void dbse::SetMethodImplementationBody::redo ( )

Definition at line 592 of file SchemaCommand.cpp.

593{
595 if(mi != nullptr) {
597 }
598
599 SchemaImplementation->set_body ( NewBody );
600 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
601}
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::SetMethodImplementationBody::undo ( )

Definition at line 603 of file SchemaCommand.cpp.

604{
605 SchemaImplementation->set_body ( OldBody );
606 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
607}

Member Data Documentation

◆ ClassName

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

Definition at line 323 of file SchemaCommand.hpp.

◆ ImplementationLanguage

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

Definition at line 326 of file SchemaCommand.hpp.

◆ MethodName

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

Definition at line 324 of file SchemaCommand.hpp.

◆ NewBody

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

Definition at line 327 of file SchemaCommand.hpp.

◆ OldBody

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

Definition at line 328 of file SchemaCommand.hpp.

◆ SchemaImplementation

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

Definition at line 325 of file SchemaCommand.hpp.


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