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

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
dunedaq::oks::OksAttributeSchemaAttribute
std::string AttributeName
std::string NewAttributeRange
std::string OldAttributeRange

Detailed Description

Definition at line 471 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeRangeCommand()

dbse::SetAttributeRangeCommand::SetAttributeRangeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewRange )

Definition at line 868 of file SchemaCommand.cpp.

871 : ClassName ( Class->get_name() ),
872 SchemaAttribute ( Attribute ),
873 AttributeName ( Attribute->get_name() ),
874 NewAttributeRange ( NewRange ),
875 OldAttributeRange ( SchemaAttribute->get_range() )
876{
877 setText( QString::fromStdString("Set new range \"" + NewRange + "\" to attribute \"" + Attribute->get_name() + "\" of class \"" + ClassName + "\""));
878}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_name() const noexcept
out stream operator
const std::string & get_name() const noexcept
Definition class.hpp:368

◆ ~SetAttributeRangeCommand()

dbse::SetAttributeRangeCommand::~SetAttributeRangeCommand ( )

Definition at line 880 of file SchemaCommand.cpp.

881{
882}

Member Function Documentation

◆ redo()

void dbse::SetAttributeRangeCommand::redo ( )

Definition at line 884 of file SchemaCommand.cpp.

885{
887 if(a != nullptr) {
888 SchemaAttribute = a;
889 }
890
891 SchemaAttribute->set_range ( NewAttributeRange );
892 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
893}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:1019

◆ undo()

void dbse::SetAttributeRangeCommand::undo ( )

Definition at line 895 of file SchemaCommand.cpp.

896{
897 SchemaAttribute->set_range ( OldAttributeRange );
898 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
899}

Member Data Documentation

◆ AttributeName

std::string dbse::SetAttributeRangeCommand::AttributeName
private

Definition at line 481 of file SchemaCommand.hpp.

◆ ClassName

std::string dbse::SetAttributeRangeCommand::ClassName
private

Definition at line 479 of file SchemaCommand.hpp.

◆ NewAttributeRange

std::string dbse::SetAttributeRangeCommand::NewAttributeRange
private

Definition at line 482 of file SchemaCommand.hpp.

◆ OldAttributeRange

std::string dbse::SetAttributeRangeCommand::OldAttributeRange
private

Definition at line 483 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 480 of file SchemaCommand.hpp.


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