MCPcopy Create free account
hub / github.com/MITK/MITK / Disconnect

Method Disconnect

Modules/Core/src/DataManagement/mitkPropertyRelationRuleBase.cpp:547–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void mitk::PropertyRelationRuleBase::Disconnect(IPropertyOwner *source, const IPropertyProvider *destination, RelationType layer) const
548{
549 if (source == nullptr)
550 {
551 mitkThrow() << "Error. Source is invalid. Cannot disconnect.";
552 }
553
554 if (destination == nullptr)
555 {
556 mitkThrow() << "Error. Destination is invalid. Cannot disconnect.";
557 }
558
559 try
560 {
561 const auto relationUIDs = this->GetRelationUIDs(source, destination);
562 for (const auto& relUID: relationUIDs)
563 {
564 this->Disconnect(source, relUID, layer);
565 }
566 }
567 catch (const NoPropertyRelationException &)
568 {
569 // nothing to do and no real error in context of disconnect.
570 }
571}
572
573void mitk::PropertyRelationRuleBase::Disconnect(IPropertyOwner *source, RelationUIDType relationUID, RelationType layer) const
574{

Callers 1

~BaseRendererMethod · 0.45

Calls 7

GetRelationUIDsMethod · 0.95
AddElementMethod · 0.80
Disconnect_datalayerMethod · 0.45
findMethod · 0.45
RemovePropertyMethod · 0.45

Tested by

no test coverage detected