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

Attributes commands. More...

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
 
dunedaq::oks::OksAttributeSchemaAttribute
 
std::string NewAttributeName
 
std::string OldAttributeName
 

Detailed Description

Attributes commands.

Definition at line 422 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeNameCommand()

dbse::SetAttributeNameCommand::SetAttributeNameCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewName )

Definition at line 798 of file SchemaCommand.cpp.

801 : ClassName( Class->get_name() ),
802 SchemaAttribute ( Attribute ),
803 NewAttributeName ( NewName ),
805{
806 setText( QString::fromStdString("Set new name \"" + NewName + "\" to attribute \"" + Attribute->get_name() + "\" of class \"" + ClassName + "\""));
807}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_name() const noexcept
out stream operator
const std::string & get_name() const noexcept
Definition class.hpp:363

◆ ~SetAttributeNameCommand()

dbse::SetAttributeNameCommand::~SetAttributeNameCommand ( )

Definition at line 809 of file SchemaCommand.cpp.

810{
811}

Member Function Documentation

◆ redo()

void dbse::SetAttributeNameCommand::redo ( )

Definition at line 813 of file SchemaCommand.cpp.

814{
816 if(a != nullptr) {
817 SchemaAttribute = a;
818 }
819
821 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
822}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OKS attribute class.
void set_name(const std::string &name)
Set attribute name.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:1014

◆ undo()

void dbse::SetAttributeNameCommand::undo ( )

Definition at line 824 of file SchemaCommand.cpp.

825{
827 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
828}

Member Data Documentation

◆ ClassName

std::string dbse::SetAttributeNameCommand::ClassName
private

Definition at line 430 of file SchemaCommand.hpp.

◆ NewAttributeName

std::string dbse::SetAttributeNameCommand::NewAttributeName
private

Definition at line 432 of file SchemaCommand.hpp.

◆ OldAttributeName

std::string dbse::SetAttributeNameCommand::OldAttributeName
private

Definition at line 433 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 431 of file SchemaCommand.hpp.


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