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 541 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 1029 of file SchemaCommand.cpp.

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

◆ ~AddAttributeCommand()

dbse::AddAttributeCommand::~AddAttributeCommand ( )

Definition at line 1047 of file SchemaCommand.cpp.

1048{
1049}

Member Function Documentation

◆ redo()

void dbse::AddAttributeCommand::redo ( )

Definition at line 1051 of file SchemaCommand.cpp.

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

◆ undo()

void dbse::AddAttributeCommand::undo ( )

Definition at line 1060 of file SchemaCommand.cpp.

1061{
1063 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
1064}
void remove(const OksAttribute *a)
Remove attribute.
Definition class.cpp:1125

Member Data Documentation

◆ ClassName

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

Definition at line 551 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 552 of file SchemaCommand.hpp.

◆ SchemaDescription

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

Definition at line 558 of file SchemaCommand.hpp.

◆ SchemaFormat

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

Definition at line 560 of file SchemaCommand.hpp.

◆ SchemaInitValues

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

Definition at line 557 of file SchemaCommand.hpp.

◆ SchemaIsMulti

bool dbse::AddAttributeCommand::SchemaIsMulti
private

Definition at line 555 of file SchemaCommand.hpp.

◆ SchemaIsNull

bool dbse::AddAttributeCommand::SchemaIsNull
private

Definition at line 559 of file SchemaCommand.hpp.

◆ SchemaName

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

Definition at line 553 of file SchemaCommand.hpp.

◆ SchemaRange

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

Definition at line 556 of file SchemaCommand.hpp.

◆ SchemaType

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

Definition at line 554 of file SchemaCommand.hpp.


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