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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetAttributeFormatCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, dunedaq::oks::OksAttribute::Format NewFormat)
 
 ~SetAttributeFormatCommand ()
 
void redo ()
 
void undo ()
 

Private Attributes

std::string ClassName
 
dunedaq::oks::OksAttributeSchemaAttribute
 
std::string AttributeName
 
dunedaq::oks::OksAttribute::Format NewAttributeFormat
 
dunedaq::oks::OksAttribute::Format OldAttributeFormat
 

Detailed Description

Definition at line 481 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeFormatCommand()

dbse::SetAttributeFormatCommand::SetAttributeFormatCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
dunedaq::oks::OksAttribute::Format NewFormat )

Definition at line 896 of file SchemaCommand.cpp.

899 : ClassName ( Class->get_name() ),
900 SchemaAttribute ( Attribute ),
901 AttributeName ( Attribute->get_name() ),
902 NewAttributeFormat ( NewFormat ),
904{
905 setText( QString::fromStdString("Set new format for attribute \"" + Attribute->get_name() + "\" of class \"" + ClassName + "\""));
906}
dunedaq::oks::OksAttribute::Format OldAttributeFormat
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksAttribute::Format NewAttributeFormat
const std::string & get_name() const noexcept
out stream operator
Format get_format() const noexcept
Get attribute format.
const std::string & get_name() const noexcept
Definition class.hpp:363

◆ ~SetAttributeFormatCommand()

dbse::SetAttributeFormatCommand::~SetAttributeFormatCommand ( )

Definition at line 908 of file SchemaCommand.cpp.

909{
910}

Member Function Documentation

◆ redo()

void dbse::SetAttributeFormatCommand::redo ( )

Definition at line 912 of file SchemaCommand.cpp.

913{
915 if(a != nullptr) {
916 SchemaAttribute = a;
917 }
918
920 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
921}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OKS attribute class.
void set_format(Format format)
Set attribute format.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:1014

◆ undo()

void dbse::SetAttributeFormatCommand::undo ( )

Definition at line 923 of file SchemaCommand.cpp.

924{
926 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
927}

Member Data Documentation

◆ AttributeName

std::string dbse::SetAttributeFormatCommand::AttributeName
private

Definition at line 491 of file SchemaCommand.hpp.

◆ ClassName

std::string dbse::SetAttributeFormatCommand::ClassName
private

Definition at line 489 of file SchemaCommand.hpp.

◆ NewAttributeFormat

dunedaq::oks::OksAttribute::Format dbse::SetAttributeFormatCommand::NewAttributeFormat
private

Definition at line 492 of file SchemaCommand.hpp.

◆ OldAttributeFormat

dunedaq::oks::OksAttribute::Format dbse::SetAttributeFormatCommand::OldAttributeFormat
private

Definition at line 493 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 490 of file SchemaCommand.hpp.


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