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

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 200 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetIsDependentRelationshipCommand()

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

Definition at line 369 of file SchemaCommand.cpp.

371 : ClassName(Class->get_name()),
372 SchemaRelationship ( Relationship ),
373 RelationshipName ( Relationship->get_name() ),
374 NewValue ( Value ),
375 OldValue ( SchemaRelationship->get_is_dependent() )
376{
377 setText( QString::fromStdString("Changed the \"is dependent\" constraint for relationship \"" + Relationship->get_name() + "\" of class \"" + ClassName + "\""));
378}
dunedaq::oks::OksRelationship * SchemaRelationship
const std::string & get_name() const noexcept
Definition class.hpp:368
const std::string & get_name() const noexcept

◆ ~SetIsDependentRelationshipCommand()

dbse::SetIsDependentRelationshipCommand::~SetIsDependentRelationshipCommand ( )

Definition at line 380 of file SchemaCommand.cpp.

381{
382}

Member Function Documentation

◆ redo()

void dbse::SetIsDependentRelationshipCommand::redo ( )

Definition at line 384 of file SchemaCommand.cpp.

385{
387 if(r != nullptr) {
389 }
390
391 SchemaRelationship->set_is_dependent ( NewValue );
392 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
393}
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::SetIsDependentRelationshipCommand::undo ( )

Definition at line 395 of file SchemaCommand.cpp.

396{
397 SchemaRelationship->set_is_dependent ( OldValue );
398 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
399}

Member Data Documentation

◆ ClassName

std::string dbse::SetIsDependentRelationshipCommand::ClassName
private

Definition at line 208 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsDependentRelationshipCommand::NewValue
private

Definition at line 211 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsDependentRelationshipCommand::OldValue
private

Definition at line 212 of file SchemaCommand.hpp.

◆ RelationshipName

std::string dbse::SetIsDependentRelationshipCommand::RelationshipName
private

Definition at line 210 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 209 of file SchemaCommand.hpp.


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