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

#include <SchemaCommand.hpp>

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

Public Member Functions

 SetClassTypeRelationshipCommand (dunedaq::oks::OksClass *Class, dunedaq::oks::OksRelationship *Relationship, std::string ClassType)
 ~SetClassTypeRelationshipCommand ()
void redo ()
void undo ()

Private Attributes

std::string ClassName
dunedaq::oks::OksRelationship * SchemaRelationship
std::string RelationshipName
std::string NewRelationshipType
std::string OldRelationshipType

Detailed Description

Definition at line 127 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetClassTypeRelationshipCommand()

dbse::SetClassTypeRelationshipCommand::SetClassTypeRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string ClassType )

Definition at line 200 of file SchemaCommand.cpp.

203 : ClassName(Class->get_name())
204 , SchemaRelationship(Relationship)
205 , RelationshipName(Relationship->get_name())
206 , NewRelationshipType(ClassType)
208{
209 setText(QString::fromStdString("Relationship \"" + SchemaRelationship->get_name() + "\" set to type \"" +
210 NewRelationshipType + "\" for class \"" + ClassName + "\""));
211}
dunedaq::oks::OksRelationship * SchemaRelationship
const std::string & get_name() const noexcept
Definition class.hpp:374
const std::string & get_name() const noexcept
const std::string & get_type() const noexcept

◆ ~SetClassTypeRelationshipCommand()

dbse::SetClassTypeRelationshipCommand::~SetClassTypeRelationshipCommand ( )

Definition at line 213 of file SchemaCommand.cpp.

213{}

Member Function Documentation

◆ redo()

void dbse::SetClassTypeRelationshipCommand::redo ( )

Definition at line 216 of file SchemaCommand.cpp.

217{
219 if (r != nullptr) {
221 }
222
224 emit KernelWrapper::GetInstance().ClassUpdated(QString::fromStdString(ClassName));
225}
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_type(const std::string &type)
Set relationship type.

◆ undo()

void dbse::SetClassTypeRelationshipCommand::undo ( )

Definition at line 228 of file SchemaCommand.cpp.

Member Data Documentation

◆ ClassName

std::string dbse::SetClassTypeRelationshipCommand::ClassName
private

Definition at line 138 of file SchemaCommand.hpp.

◆ NewRelationshipType

std::string dbse::SetClassTypeRelationshipCommand::NewRelationshipType
private

Definition at line 141 of file SchemaCommand.hpp.

◆ OldRelationshipType

std::string dbse::SetClassTypeRelationshipCommand::OldRelationshipType
private

Definition at line 142 of file SchemaCommand.hpp.

◆ RelationshipName

std::string dbse::SetClassTypeRelationshipCommand::RelationshipName
private

Definition at line 140 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 139 of file SchemaCommand.hpp.


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