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

#include <SchemaCommand.hpp>

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

Public Member Functions

 RemoveAttributeCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, std::string name, std::string type, bool is_mv, std::string range, std::string init_values, std::string description, bool is_null, dunedaq::oks::OksAttribute::Format format=dunedaq::oks::OksAttribute::Format::Dec)
 ~RemoveAttributeCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksAttribute * SchemaAttribute
std::string SchemaName
std::string SchemaType
bool SchemaIsMulti
std::string SchemaRange
std::string SchemaInitValues
std::string SchemaDescription
bool SchemaIsNull
dunedaq::oks::OksAttribute::Format SchemaFormat

Detailed Description

Definition at line 642 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ RemoveAttributeCommand()

dbse::RemoveAttributeCommand::RemoveAttributeCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
std::string name,
std::string type,
bool is_mv,
std::string range,
std::string init_values,
std::string description,
bool is_null,
dunedaq::oks::OksAttribute::Format format = dunedaq::oks::OksAttribute::Format::Dec )

Definition at line 1108 of file SchemaCommand.cpp.

1118 : ClassName(Class->get_name())
1119 , SchemaAttribute(Attribute)
1120 , SchemaName(name)
1121 , SchemaType(type)
1122 , SchemaIsMulti(is_mv)
1123 , SchemaRange(range)
1124 , SchemaInitValues(init_values)
1125 , SchemaDescription(description)
1126 , SchemaIsNull(is_null)
1127 , SchemaFormat(format)
1128{
1129 setText(QString::fromStdString("Removed attribute \"" + name + "\" from class \"" + Class->get_name() + "\""));
1130}
dunedaq::oks::OksAttribute::Format SchemaFormat
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_name() const noexcept
Definition class.hpp:374

◆ ~RemoveAttributeCommand()

dbse::RemoveAttributeCommand::~RemoveAttributeCommand ( )

Definition at line 1132 of file SchemaCommand.cpp.

1132{}

Member Function Documentation

◆ redo()

void dbse::RemoveAttributeCommand::redo ( )

Definition at line 1135 of file SchemaCommand.cpp.

1136{
1138 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
1139}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1082

◆ undo()

void dbse::RemoveAttributeCommand::undo ( )

Definition at line 1142 of file SchemaCommand.cpp.

1143{
1145 SchemaType,
1151 SchemaFormat);
1153 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
1154}
OksAttribute(const std::string &name, OksClass *p=nullptr)
OKS attribute simple constructor.
void add(OksAttribute *a)
Add attribute.
Definition class.cpp:1009

Member Data Documentation

◆ ClassName

std::string dbse::RemoveAttributeCommand::ClassName
private

Definition at line 660 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 661 of file SchemaCommand.hpp.

◆ SchemaDescription

std::string dbse::RemoveAttributeCommand::SchemaDescription
private

Definition at line 667 of file SchemaCommand.hpp.

◆ SchemaFormat

dunedaq::oks::OksAttribute::Format dbse::RemoveAttributeCommand::SchemaFormat
private

Definition at line 669 of file SchemaCommand.hpp.

◆ SchemaInitValues

std::string dbse::RemoveAttributeCommand::SchemaInitValues
private

Definition at line 666 of file SchemaCommand.hpp.

◆ SchemaIsMulti

bool dbse::RemoveAttributeCommand::SchemaIsMulti
private

Definition at line 664 of file SchemaCommand.hpp.

◆ SchemaIsNull

bool dbse::RemoveAttributeCommand::SchemaIsNull
private

Definition at line 668 of file SchemaCommand.hpp.

◆ SchemaName

std::string dbse::RemoveAttributeCommand::SchemaName
private

Definition at line 662 of file SchemaCommand.hpp.

◆ SchemaRange

std::string dbse::RemoveAttributeCommand::SchemaRange
private

Definition at line 665 of file SchemaCommand.hpp.

◆ SchemaType

std::string dbse::RemoveAttributeCommand::SchemaType
private

Definition at line 663 of file SchemaCommand.hpp.


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