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::OksAttribute * SchemaAttribute
std::string AttributeName
std::string NewAttributeRange
std::string OldAttributeRange

Detailed Description

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

898 : ClassName(Class->get_name())
899 , SchemaAttribute(Attribute)
900 , AttributeName(Attribute->get_name())
901 , NewAttributeRange(NewRange)
903{
904 setText(QString::fromStdString("Set new range \"" + NewRange + "\" to attribute \"" + Attribute->get_name() +
905 "\" of class \"" + ClassName + "\""));
906}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_range() const noexcept
Get attribute range.
const std::string & get_name() const noexcept
out stream operator
const std::string & get_name() const noexcept
Definition class.hpp:374

◆ ~SetAttributeRangeCommand()

dbse::SetAttributeRangeCommand::~SetAttributeRangeCommand ( )

Definition at line 908 of file SchemaCommand.cpp.

908{}

Member Function Documentation

◆ redo()

void dbse::SetAttributeRangeCommand::redo ( )

Definition at line 911 of file SchemaCommand.cpp.

912{
914 if (a != nullptr) {
915 SchemaAttribute = a;
916 }
917
919 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
920}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void set_range(const std::string &range)
Set attribute range.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:973

◆ undo()

void dbse::SetAttributeRangeCommand::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::SetAttributeRangeCommand::AttributeName
private

Definition at line 540 of file SchemaCommand.hpp.

◆ ClassName

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

Definition at line 538 of file SchemaCommand.hpp.

◆ NewAttributeRange

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

Definition at line 541 of file SchemaCommand.hpp.

◆ OldAttributeRange

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

Definition at line 542 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 539 of file SchemaCommand.hpp.


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