Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
Medical Imaging Interaction Toolkit
mitk::PropertyRelations Class Reference

#include <mitkPropertyRelations.h>

Inheritance diagram for mitk::PropertyRelations:
Collaboration diagram for mitk::PropertyRelations:

Public Types

using RuleResultVectorType = IPropertyRelations::RuleResultVectorType
 
using RuleIDType = IPropertyRelations::RuleIDType
 
using RuleIDVectorType = IPropertyRelations::RuleIDVectorType
 
- Public Types inherited from mitk::IPropertyRelations
using RuleResultVectorType = std::list< PropertyRelationRuleBase::ConstPointer >
 
using RuleIDType = PropertyRelationRuleBase::RuleIDType
 
using RuleIDVectorType = std::vector< RuleIDType >
 

Public Member Functions

 PropertyRelations ()
 
 ~PropertyRelations () override
 
bool AddRule (const PropertyRelationRuleBase *rule, bool overwrite=false) override
 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...
 
RuleResultVectorType GetRulesForSource (const IPropertyProvider *source) const override
 Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource() would return true) More...
 
RuleResultVectorType GetRulesForSourceCandidate (const IPropertyProvider *sourceCandidate) const override
 Get all relation rules that would accept the passed IPropertOwner as source. More...
 
RuleResultVectorType GetRulesForDestinationCandidate (const IPropertyProvider *destCandidate) const override
 Get all relation rules that would accept the passed IPropertOwner as destination. More...
 
PropertyRelationRuleBase::ConstPointer GetRule (const RuleIDType &ruleID) const override
 Get the relation rule that has the specfied ruleID. More...
 
RuleIDVectorType GetRuleIDs () const override
 Get all IDs of registered rules. More...
 
bool HasRuleForSource (const IPropertyProvider *source) const override
 Check if a passed instance has defined relation covered by the registered rules. More...
 
void RemoveAllRules () override
 Remove all relation rules. More...
 
void RemoveRule (const RuleIDType &ruleID) override
 Remove relation rule instance with the passed ID. If rule does not exist nothing happens. More...
 
- Public Member Functions inherited from mitk::IPropertyRelations
virtual ~IPropertyRelations ()
 

Detailed Description

Definition at line 21 of file mitkPropertyRelations.h.

Member Typedef Documentation

◆ RuleIDType

◆ RuleIDVectorType

◆ RuleResultVectorType

Constructor & Destructor Documentation

◆ PropertyRelations()

mitk::PropertyRelations::PropertyRelations ( )

◆ ~PropertyRelations()

mitk::PropertyRelations::~PropertyRelations ( )
override

Member Function Documentation

◆ AddRule()

bool mitk::PropertyRelations::AddRule ( const PropertyRelationRuleBase rule,
bool  overwrite = false 
)
overridevirtual

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.

Implements mitk::IPropertyRelations.

◆ GetRule()

PropertyRelationRuleBase::ConstPointer mitk::PropertyRelations::GetRule ( const RuleIDType ruleID) const
overridevirtual

Get the relation rule that has the specfied ruleID.

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

Implements mitk::IPropertyRelations.

◆ GetRuleIDs()

RuleIDVectorType mitk::PropertyRelations::GetRuleIDs ( ) const
overridevirtual

Get all IDs of registered rules.

Implements mitk::IPropertyRelations.

◆ GetRulesForDestinationCandidate()

RuleResultVectorType mitk::PropertyRelations::GetRulesForDestinationCandidate ( const IPropertyProvider destCandidate) const
overridevirtual

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.

Implements mitk::IPropertyRelations.

◆ GetRulesForSource()

RuleResultVectorType mitk::PropertyRelations::GetRulesForSource ( const IPropertyProvider source) const
overridevirtual

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.

Implements mitk::IPropertyRelations.

◆ GetRulesForSourceCandidate()

RuleResultVectorType mitk::PropertyRelations::GetRulesForSourceCandidate ( const IPropertyProvider sourceCandidate) const
overridevirtual

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.

Implements mitk::IPropertyRelations.

◆ HasRuleForSource()

bool mitk::PropertyRelations::HasRuleForSource ( const IPropertyProvider source) const
overridevirtual

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.

Implements mitk::IPropertyRelations.

◆ RemoveAllRules()

void mitk::PropertyRelations::RemoveAllRules ( )
overridevirtual

Remove all relation rules.

Implements mitk::IPropertyRelations.

◆ RemoveRule()

void mitk::PropertyRelations::RemoveRule ( const RuleIDType ruleID)
overridevirtual

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

Implements mitk::IPropertyRelations.


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