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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetIsCompositeRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, bool Value)
 ~SetIsCompositeRelationshipCommand ()
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 199 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetIsCompositeRelationshipCommand()

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

Definition at line 336 of file SchemaCommand.cpp.

339 : ClassName(Class->get_name())
340 , SchemaRelationship(Relationship)
341 , RelationshipName(Relationship->get_name())
342 , NewValue(Value)
344{
345 setText(QString::fromStdString("Changed the \"is composite\" constraint for relationship \"" +
346 Relationship->get_name() + "\" of class \"" + ClassName + "\""));
347}
dunedaq::oks::OksRelationship * SchemaRelationship
const std::string & get_name() const noexcept
Definition class.hpp:374
bool get_is_composite() const noexcept
const std::string & get_name() const noexcept

◆ ~SetIsCompositeRelationshipCommand()

dbse::SetIsCompositeRelationshipCommand::~SetIsCompositeRelationshipCommand ( )

Definition at line 349 of file SchemaCommand.cpp.

349{}

Member Function Documentation

◆ redo()

void dbse::SetIsCompositeRelationshipCommand::redo ( )

Definition at line 352 of file SchemaCommand.cpp.

353{
355 if (r != nullptr) {
357 }
358
360 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
361}
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_composite(bool composite)
Set the composite relationship property.

◆ undo()

void dbse::SetIsCompositeRelationshipCommand::undo ( )

Definition at line 364 of file SchemaCommand.cpp.

365{
367 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
368}

Member Data Documentation

◆ ClassName

std::string dbse::SetIsCompositeRelationshipCommand::ClassName
private

Definition at line 210 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsCompositeRelationshipCommand::NewValue
private

Definition at line 213 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsCompositeRelationshipCommand::OldValue
private

Definition at line 214 of file SchemaCommand.hpp.

◆ RelationshipName

std::string dbse::SetIsCompositeRelationshipCommand::RelationshipName
private

Definition at line 212 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 211 of file SchemaCommand.hpp.


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