Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::IPropertyRelations Class Referenceabstract

Interface of property relations service. More...

#include <mitkIPropertyRelations.h>

Inheritance diagram for mitk::IPropertyRelations:

Public Types

using RuleResultVectorType = std::list< PropertyRelationRuleBase::ConstPointer >
 
using RuleIDType = PropertyRelationRuleBase::RuleIDType
 
using RuleIDVectorType = std::vector< RuleIDType >
 

Public Member Functions

virtual ~IPropertyRelations ()
 
virtual bool AddRule (const PropertyRelationRuleBase *rule, bool overwrite=false)=0
 Add rule for a specific relation. If there is already a property rule instance it won't be added. Rule instances are regarded equal, if the rule ID is equal. You may enforce to overwrite the old equal rule by the overwrite parameter. More...
 
virtual RuleResultVectorType GetRulesForSource (const IPropertyProvider *source) const =0
 Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource() would return true) More...
 
virtual RuleResultVectorType GetRulesForSourceCandidate (const IPropertyProvider *sourceCandidate) const =0
 Get all relation rules that would accept the passed IPropertOwner as source. More...
 
virtual RuleResultVectorType GetRulesForDestinationCandidate (const IPropertyProvider *destCandidate) const =0
 Get all relation rules that would accept the passed IPropertOwner as destination. More...
 
virtual PropertyRelationRuleBase::ConstPointer GetRule (const RuleIDType &ruleID) const =0
 Get the relation rule that has the specified ruleID. More...
 
virtual RuleIDVectorType GetRuleIDs () const =0
 Get all IDs of registered rules. More...
 
virtual bool HasRuleForSource (const IPropertyProvider *source) const =0
 Check if a passed instance has defined relation covered by the registered rules. More...
 
virtual void RemoveAllRules ()=0
 Remove all relation rules. More...
 
virtual void RemoveRule (const RuleIDType &ruleID)=0
 Remove relation rule instance with the passed ID. If rule does not exist nothing happens. More...
 

Detailed Description

Interface of property relations service.

This service allows you to manage relations between property provider based on properties. Property relations are managed by rule classes derived from PropertyRelationRuleBase.

Definition at line 28 of file mitkIPropertyRelations.h.

Member Typedef Documentation

◆ RuleIDType

◆ RuleIDVectorType

Definition at line 35 of file mitkIPropertyRelations.h.

◆ RuleResultVectorType

Constructor & Destructor Documentation

◆ ~IPropertyRelations()

virtual mitk::IPropertyRelations::~IPropertyRelations ( )
virtual

Member Function Documentation

◆ AddRule()

virtual bool mitk::IPropertyRelations::AddRule ( const PropertyRelationRuleBase rule,
bool  overwrite = false 
)
pure virtual

Add rule for a specific relation. If there is already a property rule instance it won't be added. Rule instances are regarded equal, if the rule ID is equal. You may enforce to overwrite the old equal rule by the overwrite parameter.

Parameters
[in]ruleRelation rule of the property.
[in]overwriteOverwrite already existing relation rule.
Returns
True if relation rule was added successfully.

Implemented in mitk::PropertyRelations.

◆ GetRule()

virtual PropertyRelationRuleBase::ConstPointer mitk::IPropertyRelations::GetRule ( const RuleIDType ruleID) const
pure virtual

Get the relation rule that has the specified ruleID.

Returns
Property relation rule or null pointer, if no relation rule is available.

Implemented in mitk::PropertyRelations.

◆ GetRuleIDs()

virtual RuleIDVectorType mitk::IPropertyRelations::GetRuleIDs ( ) const
pure virtual

Get all IDs of registered rules.

Implemented in mitk::PropertyRelations.

◆ GetRulesForDestinationCandidate()

virtual RuleResultVectorType mitk::IPropertyRelations::GetRulesForDestinationCandidate ( const IPropertyProvider destCandidate) const
pure virtual

Get all relation rules that would accept the passed IPropertOwner as destination.

Parameters
[in]destCandidatePointer to the instance that should be checked to be a suitable destination.
Returns
Property relation rules or empty list if no relation rules are available.

Implemented in mitk::PropertyRelations.

◆ GetRulesForSource()

virtual RuleResultVectorType mitk::IPropertyRelations::GetRulesForSource ( const IPropertyProvider source) const
pure virtual

Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource() would return true)

Parameters
[in]sourcePointer to the instance that should be checked as source for the searched rules.
Returns
Property relation rules or empty list if no relation rules are available.

Implemented in mitk::PropertyRelations.

◆ GetRulesForSourceCandidate()

virtual RuleResultVectorType mitk::IPropertyRelations::GetRulesForSourceCandidate ( const IPropertyProvider sourceCandidate) const
pure virtual

Get all relation rules that would accept the passed IPropertOwner as source.

Parameters
[in]sourceCandidatePointer to the instance that should be checked to be a suitable source.
Returns
Property relation rules or empty list if no relation rules are available.

Implemented in mitk::PropertyRelations.

◆ HasRuleForSource()

virtual bool mitk::IPropertyRelations::HasRuleForSource ( const IPropertyProvider source) const
pure virtual

Check if a passed instance has defined relation covered by the registered rules.

Parameters
[in]sourcePointer to the instance that should be checked as source for the searched rules.
Returns
True if the property has relations of registered rules, false otherwise.

Implemented in mitk::PropertyRelations.

◆ RemoveAllRules()

virtual void mitk::IPropertyRelations::RemoveAllRules ( )
pure virtual

Remove all relation rules.

Implemented in mitk::PropertyRelations.

◆ RemoveRule()

virtual void mitk::IPropertyRelations::RemoveRule ( const RuleIDType ruleID)
pure virtual

Remove relation rule instance with the passed ID. If rule does not exist nothing happens.

Implemented in mitk::PropertyRelations.


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