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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetAttributeTypeCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string NewType)
 
 ~SetAttributeTypeCommand ()
 
void redo ()
 
void undo ()
 

Private Attributes

std::string ClassName
 
dunedaq::oks::OksAttributeSchemaAttribute
 
std::string AttributeName
 
std::string NewAttributeType
 
std::string OldAttributeType
 

Detailed Description

Definition at line 451 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeTypeCommand()

dbse::SetAttributeTypeCommand::SetAttributeTypeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewType )

Definition at line 830 of file SchemaCommand.cpp.

833 : ClassName ( Class->get_name() ),
834 SchemaAttribute ( Attribute ),
835 AttributeName ( Attribute->get_name() ),
836 NewAttributeType ( NewType ),
838{
839 setText( QString::fromStdString("Set new type \"" + NewType + "\" to attribute \"" + Attribute->get_name() + "\" of class \"" + ClassName + "\""));
840}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_type() const noexcept
Get attribute string type.
const std::string & get_name() const noexcept
out stream operator
const std::string & get_name() const noexcept
Definition class.hpp:363

◆ ~SetAttributeTypeCommand()

dbse::SetAttributeTypeCommand::~SetAttributeTypeCommand ( )

Definition at line 842 of file SchemaCommand.cpp.

843{
844}

Member Function Documentation

◆ redo()

void dbse::SetAttributeTypeCommand::redo ( )

Definition at line 846 of file SchemaCommand.cpp.

847{
849 if(a != nullptr) {
850 SchemaAttribute = a;
851 }
852
854 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
855}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OKS attribute class.
void set_type(const std::string &type, bool skip_init=false)
Set attribute type.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:1014

◆ undo()

void dbse::SetAttributeTypeCommand::undo ( )

Definition at line 857 of file SchemaCommand.cpp.

858{
860 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
861}

Member Data Documentation

◆ AttributeName

std::string dbse::SetAttributeTypeCommand::AttributeName
private

Definition at line 461 of file SchemaCommand.hpp.

◆ ClassName

std::string dbse::SetAttributeTypeCommand::ClassName
private

Definition at line 459 of file SchemaCommand.hpp.

◆ NewAttributeType

std::string dbse::SetAttributeTypeCommand::NewAttributeType
private

Definition at line 462 of file SchemaCommand.hpp.

◆ OldAttributeType

std::string dbse::SetAttributeTypeCommand::OldAttributeType
private

Definition at line 463 of file SchemaCommand.hpp.

◆ SchemaAttribute

dunedaq::oks::OksAttribute* dbse::SetAttributeTypeCommand::SchemaAttribute
private

Definition at line 460 of file SchemaCommand.hpp.


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