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

Relationships Commands. More...

#include <SchemaCommand.hpp>

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

Public Member Functions

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

Private Attributes

std::string ClassName
 
dunedaq::oks::OksRelationshipSchemaRelationship
 
std::string NewRelationshipName
 
std::string OldRelationshipName
 

Detailed Description

Relationships Commands.

Definition at line 101 of file SchemaCommand.hpp.

Constructor & Destructor Documentation

◆ SetNameRelationshipCommand()

dbse::SetNameRelationshipCommand::SetNameRelationshipCommand ( dunedaq::oks::OksClass * Class,
dunedaq::oks::OksRelationship * Relationship,
std::string Name )

Definition at line 170 of file SchemaCommand.cpp.

173 : ClassName(Class->get_name()),
174 SchemaRelationship ( Relationship ),
175 NewRelationshipName ( Name ),
177{
178 setText ( QString::fromStdString("Changed relationship \"" + Relationship->get_name() + "\" to \"" + Name + "\" for class \"" + ClassName + "\"") );
179}
dunedaq::oks::OksRelationship * SchemaRelationship
const std::string & get_name() const noexcept
Definition class.hpp:363
const std::string & get_name() const noexcept

◆ ~SetNameRelationshipCommand()

dbse::SetNameRelationshipCommand::~SetNameRelationshipCommand ( )

Definition at line 181 of file SchemaCommand.cpp.

182{
183}

Member Function Documentation

◆ redo()

void dbse::SetNameRelationshipCommand::redo ( )

Definition at line 185 of file SchemaCommand.cpp.

186{
188 if(r != nullptr) {
190 }
191
193 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
194}
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
void set_name(const std::string &)
Set relationship name.

◆ undo()

void dbse::SetNameRelationshipCommand::undo ( )

Definition at line 196 of file SchemaCommand.cpp.

197{
199 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
200}

Member Data Documentation

◆ ClassName

std::string dbse::SetNameRelationshipCommand::ClassName
private

Definition at line 109 of file SchemaCommand.hpp.

◆ NewRelationshipName

std::string dbse::SetNameRelationshipCommand::NewRelationshipName
private

Definition at line 111 of file SchemaCommand.hpp.

◆ OldRelationshipName

std::string dbse::SetNameRelationshipCommand::OldRelationshipName
private

Definition at line 112 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 110 of file SchemaCommand.hpp.


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