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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetAttributeIsNullCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksAttribute *Attribute, bool NewIsNull)
 ~SetAttributeIsNullCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksAttributeSchemaAttribute
std::string AttributeName
bool NewAttributeIsNull
bool OldAttributeIsNull

Detailed Description

Definition at line 511 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeIsNullCommand()

dbse::SetAttributeIsNullCommand::SetAttributeIsNullCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksAttribute * Attribute,
bool NewIsNull )

Definition at line 962 of file SchemaCommand.cpp.

965 : ClassName ( Class->get_name() ),
966 SchemaAttribute ( Attribute ),
967 AttributeName ( Attribute->get_name() ),
968 NewAttributeIsNull ( NewIsNull ),
969 OldAttributeIsNull ( SchemaAttribute->get_is_no_null() )
970{
971 setText( QString::fromStdString("Set null-ness for attribute \"" + Attribute->get_name() + "\" of class \"" + ClassName + "\""));
972}
dunedaq::oks::OksAttribute * SchemaAttribute
const std::string & get_name() const noexcept
out stream operator
const std::string & get_name() const noexcept
Definition class.hpp:363

◆ ~SetAttributeIsNullCommand()

dbse::SetAttributeIsNullCommand::~SetAttributeIsNullCommand ( )

Definition at line 974 of file SchemaCommand.cpp.

975{
976}

Member Function Documentation

◆ redo()

void dbse::SetAttributeIsNullCommand::redo ( )

Definition at line 978 of file SchemaCommand.cpp.

979{
981 if(a != nullptr) {
982 SchemaAttribute = a;
983 }
984
985 SchemaAttribute->set_is_no_null ( NewAttributeIsNull );
986 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
987}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
Definition class.cpp:1014

◆ undo()

void dbse::SetAttributeIsNullCommand::undo ( )

Definition at line 989 of file SchemaCommand.cpp.

990{
991 SchemaAttribute->set_is_no_null ( OldAttributeIsNull );
992 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
993}

Member Data Documentation

◆ AttributeName

std::string dbse::SetAttributeIsNullCommand::AttributeName
private

Definition at line 521 of file SchemaCommand.hpp.

◆ ClassName

std::string dbse::SetAttributeIsNullCommand::ClassName
private

Definition at line 519 of file SchemaCommand.hpp.

◆ NewAttributeIsNull

bool dbse::SetAttributeIsNullCommand::NewAttributeIsNull
private

Definition at line 522 of file SchemaCommand.hpp.

◆ OldAttributeIsNull

bool dbse::SetAttributeIsNullCommand::OldAttributeIsNull
private

Definition at line 523 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 520 of file SchemaCommand.hpp.


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