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::OksRelationship * SchemaRelationship
std::string RelationshipName
bool NewValue
bool OldValue

Detailed Description

Definition at line 217 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetIsDependentRelationshipCommand()

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

Definition at line 370 of file SchemaCommand.cpp.

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

◆ ~SetIsDependentRelationshipCommand()

dbse::SetIsDependentRelationshipCommand::~SetIsDependentRelationshipCommand ( )

Definition at line 383 of file SchemaCommand.cpp.

383{}

Member Function Documentation

◆ redo()

void dbse::SetIsDependentRelationshipCommand::redo ( )

Definition at line 386 of file SchemaCommand.cpp.

387{
389 if (r != nullptr) {
391 }
392
394 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
395}
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:1130
void set_is_dependent(bool dependent)
Set the composite relationship dependent property.

◆ undo()

void dbse::SetIsDependentRelationshipCommand::undo ( )

Definition at line 398 of file SchemaCommand.cpp.

399{
401 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
402}

Member Data Documentation

◆ ClassName

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

Definition at line 228 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsDependentRelationshipCommand::NewValue
private

Definition at line 231 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsDependentRelationshipCommand::OldValue
private

Definition at line 232 of file SchemaCommand.hpp.

◆ RelationshipName

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

Definition at line 230 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 229 of file SchemaCommand.hpp.


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