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::OksRelationshipSchemaRelationship
 
std::string RelationshipName
 
std::string NewRelationshipType
 
std::string OldRelationshipType
 

Detailed Description

Definition at line 115 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 202 of file SchemaCommand.cpp.

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

◆ ~SetClassTypeRelationshipCommand()

dbse::SetClassTypeRelationshipCommand::~SetClassTypeRelationshipCommand ( )

Definition at line 214 of file SchemaCommand.cpp.

215{
216}

Member Function Documentation

◆ redo()

void dbse::SetClassTypeRelationshipCommand::redo ( )

Definition at line 218 of file SchemaCommand.cpp.

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

◆ undo()

void dbse::SetClassTypeRelationshipCommand::undo ( )

Definition at line 229 of file SchemaCommand.cpp.

230{
232 emit KernelWrapper::GetInstance().ClassUpdated ( QString::fromStdString(ClassName) );
233}

Member Data Documentation

◆ ClassName

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

Definition at line 123 of file SchemaCommand.hpp.

◆ NewRelationshipType

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

Definition at line 126 of file SchemaCommand.hpp.

◆ OldRelationshipType

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

Definition at line 127 of file SchemaCommand.hpp.

◆ RelationshipName

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

Definition at line 125 of file SchemaCommand.hpp.

◆ SchemaRelationship

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

Definition at line 124 of file SchemaCommand.hpp.


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