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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetIsExclusiveRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
 ~SetIsExclusiveRelationshipCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksRelationshipSchemaRelationship
std::string RelationshipName
bool NewValue
bool OldValue

Detailed Description

Definition at line 210 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetIsExclusiveRelationshipCommand()

dbse::SetIsExclusiveRelationshipCommand::SetIsExclusiveRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
bool Value )

Definition at line 396 of file SchemaCommand.cpp.

398 : ClassName(Class->get_name()),
399 SchemaRelationship ( Relationship ),
400 RelationshipName ( Relationship->get_name() ),
401 NewValue ( Value ),
402 OldValue ( SchemaRelationship->get_is_exclusive() )
403{
404 setText( QString::fromStdString("Changed the \"is exclusive\" constraint for relationship \"" + Relationship->get_name() + "\" of class \"" + ClassName + "\""));
405}
dunedaq::oks::OksRelationship * SchemaRelationship
const std::string & get_name() const noexcept
Definition class.hpp:363
const std::string & get_name() const noexcept

◆ ~SetIsExclusiveRelationshipCommand()

dbse::SetIsExclusiveRelationshipCommand::~SetIsExclusiveRelationshipCommand ( )

Definition at line 407 of file SchemaCommand.cpp.

408{
409}

Member Function Documentation

◆ redo()

void dbse::SetIsExclusiveRelationshipCommand::redo ( )

Definition at line 411 of file SchemaCommand.cpp.

412{
414 if(r != nullptr) {
416 }
417
418 SchemaRelationship->set_is_exclusive ( NewValue );
419 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
420}
static KernelWrapper & GetInstance()
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
void ClassUpdated(QString ClassName)
OksRelationship * find_direct_relationship(const std::string &name) const noexcept
Find direct relationship.
Definition class.cpp:1173

◆ undo()

void dbse::SetIsExclusiveRelationshipCommand::undo ( )

Definition at line 422 of file SchemaCommand.cpp.

423{
424 SchemaRelationship->set_is_exclusive ( OldValue );
425 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
426}

Member Data Documentation

◆ ClassName

std::string dbse::SetIsExclusiveRelationshipCommand::ClassName
private

Definition at line 218 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsExclusiveRelationshipCommand::NewValue
private

Definition at line 221 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsExclusiveRelationshipCommand::OldValue
private

Definition at line 222 of file SchemaCommand.hpp.

◆ RelationshipName

std::string dbse::SetIsExclusiveRelationshipCommand::RelationshipName
private

Definition at line 220 of file SchemaCommand.hpp.

◆ SchemaRelationship

dunedaq::oks::OksRelationship* dbse::SetIsExclusiveRelationshipCommand::SchemaRelationship
private

Definition at line 219 of file SchemaCommand.hpp.


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