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

Constructor & Destructor Documentation

◆ SetIsExclusiveRelationshipCommand()

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

Definition at line 401 of file SchemaCommand.cpp.

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

◆ ~SetIsExclusiveRelationshipCommand()

dbse::SetIsExclusiveRelationshipCommand::~SetIsExclusiveRelationshipCommand ( )

Definition at line 412 of file SchemaCommand.cpp.

413{
414}

Member Function Documentation

◆ redo()

void dbse::SetIsExclusiveRelationshipCommand::redo ( )

Definition at line 416 of file SchemaCommand.cpp.

417{
419 if(r != nullptr) {
421 }
422
423 SchemaRelationship->set_is_exclusive ( NewValue );
424 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
425}
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:1178

◆ undo()

void dbse::SetIsExclusiveRelationshipCommand::undo ( )

Definition at line 427 of file SchemaCommand.cpp.

428{
429 SchemaRelationship->set_is_exclusive ( OldValue );
430 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
431}

Member Data Documentation

◆ ClassName

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

Definition at line 223 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsExclusiveRelationshipCommand::NewValue
private

Definition at line 226 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsExclusiveRelationshipCommand::OldValue
private

Definition at line 227 of file SchemaCommand.hpp.

◆ RelationshipName

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

Definition at line 225 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 224 of file SchemaCommand.hpp.


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