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

Constructor & Destructor Documentation

◆ SetIsDependentRelationshipCommand()

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

Definition at line 364 of file SchemaCommand.cpp.

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

◆ ~SetIsDependentRelationshipCommand()

dbse::SetIsDependentRelationshipCommand::~SetIsDependentRelationshipCommand ( )

Definition at line 375 of file SchemaCommand.cpp.

376{
377}

Member Function Documentation

◆ redo()

void dbse::SetIsDependentRelationshipCommand::redo ( )

Definition at line 379 of file SchemaCommand.cpp.

380{
382 if(r != nullptr) {
384 }
385
386 SchemaRelationship->set_is_dependent ( NewValue );
387 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
388}
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::SetIsDependentRelationshipCommand::undo ( )

Definition at line 390 of file SchemaCommand.cpp.

391{
392 SchemaRelationship->set_is_dependent ( OldValue );
393 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
394}

Member Data Documentation

◆ ClassName

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

Definition at line 203 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsDependentRelationshipCommand::NewValue
private

Definition at line 206 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsDependentRelationshipCommand::OldValue
private

Definition at line 207 of file SchemaCommand.hpp.

◆ RelationshipName

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

Definition at line 205 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 204 of file SchemaCommand.hpp.


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