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 516 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetAttributeIsNullCommand()

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

Definition at line 967 of file SchemaCommand.cpp.

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

◆ ~SetAttributeIsNullCommand()

dbse::SetAttributeIsNullCommand::~SetAttributeIsNullCommand ( )

Definition at line 979 of file SchemaCommand.cpp.

980{
981}

Member Function Documentation

◆ redo()

void dbse::SetAttributeIsNullCommand::redo ( )

Definition at line 983 of file SchemaCommand.cpp.

984{
986 if(a != nullptr) {
987 SchemaAttribute = a;
988 }
989
990 SchemaAttribute->set_is_no_null ( NewAttributeIsNull );
991 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
992}
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:1019

◆ undo()

void dbse::SetAttributeIsNullCommand::undo ( )

Definition at line 994 of file SchemaCommand.cpp.

995{
996 SchemaAttribute->set_is_no_null ( OldAttributeIsNull );
997 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
998}

Member Data Documentation

◆ AttributeName

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

Definition at line 526 of file SchemaCommand.hpp.

◆ ClassName

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

Definition at line 524 of file SchemaCommand.hpp.

◆ NewAttributeIsNull

bool dbse::SetAttributeIsNullCommand::NewAttributeIsNull
private

Definition at line 527 of file SchemaCommand.hpp.

◆ OldAttributeIsNull

bool dbse::SetAttributeIsNullCommand::OldAttributeIsNull
private

Definition at line 528 of file SchemaCommand.hpp.

◆ SchemaAttribute

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

Definition at line 525 of file SchemaCommand.hpp.


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