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::OksRelationshipSchemaRelationship
std::string RelationshipName
bool NewValue
bool OldValue

Detailed Description

Definition at line 185 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetIsCompositeRelationshipCommand()

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

Definition at line 337 of file SchemaCommand.cpp.

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

◆ ~SetIsCompositeRelationshipCommand()

dbse::SetIsCompositeRelationshipCommand::~SetIsCompositeRelationshipCommand ( )

Definition at line 348 of file SchemaCommand.cpp.

349{
350}

Member Function Documentation

◆ redo()

void dbse::SetIsCompositeRelationshipCommand::redo ( )

Definition at line 352 of file SchemaCommand.cpp.

353{
355 if(r != nullptr) {
357 }
358
359 SchemaRelationship->set_is_composite ( NewValue );
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:1178

◆ undo()

void dbse::SetIsCompositeRelationshipCommand::undo ( )

Definition at line 363 of file SchemaCommand.cpp.

364{
365 SchemaRelationship->set_is_composite ( OldValue );
366 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
367}

Member Data Documentation

◆ ClassName

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

Definition at line 193 of file SchemaCommand.hpp.

◆ NewValue

bool dbse::SetIsCompositeRelationshipCommand::NewValue
private

Definition at line 196 of file SchemaCommand.hpp.

◆ OldValue

bool dbse::SetIsCompositeRelationshipCommand::OldValue
private

Definition at line 197 of file SchemaCommand.hpp.

◆ RelationshipName

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

Definition at line 195 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 194 of file SchemaCommand.hpp.


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