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

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
dunedaq::oks::OksAttribute * SchemaAttribute
std::string AttributeName
std::string NewAttributeInitialValues
std::string OldAttributeInitialValues

Detailed Description

Definition at line 595 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeInitialValuesCommand()

dbse::SetAttributeInitialValuesCommand::SetAttributeInitialValuesCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string NewValues )

Definition at line 1027 of file SchemaCommand.cpp.

1030 : ClassName(Class->get_name())
1031 , SchemaAttribute(Attribute)
1032 , AttributeName(Attribute->get_name())
1033 , NewAttributeInitialValues(NewValues)
1035{
1036 setText(QString::fromStdString("Set new initial values to attribute \"" + Attribute->get_name() + "\" of class \"" +
1037 ClassName + "\""));
1038}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_name() const noexcept
out stream operator
const std::string & get_init_value() const noexcept
const std::string & get_name() const noexcept
Definition class.hpp:374

◆ ~SetAttributeInitialValuesCommand()

dbse::SetAttributeInitialValuesCommand::~SetAttributeInitialValuesCommand ( )

Definition at line 1040 of file SchemaCommand.cpp.

1040{}

Member Function Documentation

◆ redo()

void dbse::SetAttributeInitialValuesCommand::redo ( )

Definition at line 1043 of file SchemaCommand.cpp.

1044{
1046 if (a != nullptr) {
1047 SchemaAttribute = a;
1048 }
1049
1051 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
1052}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void set_init_value(const std::string &init_value)
Set attribute initialisation value.
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:973

◆ undo()

void dbse::SetAttributeInitialValuesCommand::undo ( )

Definition at line 1055 of file SchemaCommand.cpp.

Member Data Documentation

◆ AttributeName

std::string dbse::SetAttributeInitialValuesCommand::AttributeName
private

Definition at line 608 of file SchemaCommand.hpp.

◆ ClassName

std::string dbse::SetAttributeInitialValuesCommand::ClassName
private

Definition at line 606 of file SchemaCommand.hpp.

◆ NewAttributeInitialValues

std::string dbse::SetAttributeInitialValuesCommand::NewAttributeInitialValues
private

Definition at line 609 of file SchemaCommand.hpp.

◆ OldAttributeInitialValues

std::string dbse::SetAttributeInitialValuesCommand::OldAttributeInitialValues
private

Definition at line 610 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 607 of file SchemaCommand.hpp.


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