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

#include <SchemaCommand.hpp>

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

Public Member Functions

 AddAttributeCommand (dunedaq::oks::OksClass *Class, 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)
 ~AddAttributeCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksAttributeSchemaAttribute
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 546 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ AddAttributeCommand()

dbse::AddAttributeCommand::AddAttributeCommand ( dunedaq::oks::OksClass * Class,
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 1034 of file SchemaCommand.cpp.

1038 : ClassName ( Class->get_name() ),
1039 SchemaAttribute ( nullptr ),
1040 SchemaName ( name ),
1041 SchemaType ( type ),
1042 SchemaIsMulti ( is_mv ),
1043 SchemaRange ( range ),
1044 SchemaInitValues ( init_values ),
1045 SchemaDescription ( description ),
1046 SchemaIsNull ( is_null ),
1047 SchemaFormat ( format )
1048{
1049 setText( QString::fromStdString("Added attribute \"" + name + "\" to class \"" + Class->get_name() + "\""));
1050}
dunedaq::oks::OksAttribute * SchemaAttribute
dunedaq::oks::OksAttribute::Format SchemaFormat
const std::string & get_name() const noexcept
Definition class.hpp:368

◆ ~AddAttributeCommand()

dbse::AddAttributeCommand::~AddAttributeCommand ( )

Definition at line 1052 of file SchemaCommand.cpp.

1053{
1054}

Member Function Documentation

◆ redo()

void dbse::AddAttributeCommand::redo ( )

Definition at line 1056 of file SchemaCommand.cpp.

1057{
1060 SchemaFormat );
1062 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
1063}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
void add(OksAttribute *a)
Add attribute.
Definition class.cpp:1057

◆ undo()

void dbse::AddAttributeCommand::undo ( )

Definition at line 1065 of file SchemaCommand.cpp.

1066{
1068 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
1069}
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1130

Member Data Documentation

◆ ClassName

std::string dbse::AddAttributeCommand::ClassName
private

Definition at line 556 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 557 of file SchemaCommand.hpp.

◆ SchemaDescription

std::string dbse::AddAttributeCommand::SchemaDescription
private

Definition at line 563 of file SchemaCommand.hpp.

◆ SchemaFormat

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

Definition at line 565 of file SchemaCommand.hpp.

◆ SchemaInitValues

std::string dbse::AddAttributeCommand::SchemaInitValues
private

Definition at line 562 of file SchemaCommand.hpp.

◆ SchemaIsMulti

bool dbse::AddAttributeCommand::SchemaIsMulti
private

Definition at line 560 of file SchemaCommand.hpp.

◆ SchemaIsNull

bool dbse::AddAttributeCommand::SchemaIsNull
private

Definition at line 564 of file SchemaCommand.hpp.

◆ SchemaName

std::string dbse::AddAttributeCommand::SchemaName
private

Definition at line 558 of file SchemaCommand.hpp.

◆ SchemaRange

std::string dbse::AddAttributeCommand::SchemaRange
private

Definition at line 561 of file SchemaCommand.hpp.

◆ SchemaType

std::string dbse::AddAttributeCommand::SchemaType
private

Definition at line 559 of file SchemaCommand.hpp.


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