Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkIPropertyRelations.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkIPropertyRelations_h
14 #define mitkIPropertyRelations_h
15 
17 #include <mitkServiceInterface.h>
18 
19 namespace mitk
20 {
29  {
30  public:
33 
34  using RuleResultVectorType = std::list<PropertyRelationRuleBase::ConstPointer>;
36  using RuleIDVectorType = std::vector<RuleIDType>;
37 
48  virtual bool AddRule(const PropertyRelationRuleBase *rule, bool overwrite = false) = 0;
49 
54  virtual RuleResultVectorType GetRulesForSource(const IPropertyProvider* source) const = 0;
55 
60  virtual RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider* sourceCandidate) const = 0;
61 
67 
72  virtual PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const = 0;
73 
75  virtual RuleIDVectorType GetRuleIDs() const = 0;
76 
82  virtual bool HasRuleForSource(const IPropertyProvider* source) const = 0;
83 
86  virtual void RemoveAllRules() = 0;
87 
90  virtual void RemoveRule(const RuleIDType &ruleID) = 0;
91  };
92 }
93 
94 MITK_DECLARE_SERVICE_INTERFACE(mitk::IPropertyRelations, "org.mitk.IPropertyRelations")
95 
96 #endif
#define MITKCORE_EXPORT
Interface implemented by classes that provide access to property information.
Interface of property relations service.
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....
virtual RuleResultVectorType GetRulesForSource(const IPropertyProvider *source) const =0
Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource()...
std::vector< RuleIDType > RuleIDVectorType
virtual bool HasRuleForSource(const IPropertyProvider *source) const =0
Check if a passed instance has defined relation covered by the registered rules.
virtual RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider *sourceCandidate) const =0
Get all relation rules that would accept the passed IPropertOwner as source.
virtual RuleResultVectorType GetRulesForDestinationCandidate(const IPropertyProvider *destCandidate) const =0
Get all relation rules that would accept the passed IPropertOwner as destination.
virtual PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const =0
Get the relation rule that has the specified ruleID.
virtual ~IPropertyRelations()
Virtual destructor.
virtual void RemoveRule(const RuleIDType &ruleID)=0
Remove relation rule instance with the passed ID. If rule does not exist nothing happens.
virtual RuleIDVectorType GetRuleIDs() const =0
Get all IDs of registered rules.
virtual void RemoveAllRules()=0
Remove all relation rules.
PropertyRelationRuleBase::RuleIDType RuleIDType
std::list< PropertyRelationRuleBase::ConstPointer > RuleResultVectorType
Base class for defining and detecting property-based relations between data objects.
Provides the MITK_DECLARE_SERVICE_INTERFACE macro for registering C++ interfaces with both the CppMic...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Declare a C++ interface for use with CppMicroServices (Qt not available).
Find image slices visible on a given plane.