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::OksAttribute * SchemaAttribute
std::string AttributeName
dunedaq::oks::OksAttribute::Format NewAttributeFormat
dunedaq::oks::OksAttribute::Format OldAttributeFormat

Detailed Description

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

932 : ClassName(Class->get_name())
933 , SchemaAttribute(Attribute)
934 , AttributeName(Attribute->get_name())
935 , NewAttributeFormat(NewFormat)
937{
938 setText(QString::fromStdString("Set new format for attribute \"" + Attribute->get_name() + "\" of class \"" +
939 ClassName + "\""));
940}
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:374

◆ ~SetAttributeFormatCommand()

dbse::SetAttributeFormatCommand::~SetAttributeFormatCommand ( )

Definition at line 942 of file SchemaCommand.cpp.

942{}

Member Function Documentation

◆ redo()

void dbse::SetAttributeFormatCommand::redo ( )

Definition at line 945 of file SchemaCommand.cpp.

946{
948 if (a != nullptr) {
949 SchemaAttribute = a;
950 }
951
953 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
954}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void set_format(Format format)
Set attribute format.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:973

◆ undo()

void dbse::SetAttributeFormatCommand::undo ( )

Definition at line 957 of file SchemaCommand.cpp.

958{
960 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
961}

Member Data Documentation

◆ AttributeName

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

Definition at line 558 of file SchemaCommand.hpp.

◆ ClassName

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

Definition at line 556 of file SchemaCommand.hpp.

◆ NewAttributeFormat

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

Definition at line 559 of file SchemaCommand.hpp.

◆ OldAttributeFormat

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

Definition at line 560 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 557 of file SchemaCommand.hpp.


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