Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkPropertyRelations.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 mitkPropertyRelations_h
14 #define mitkPropertyRelations_h
15 
16 #include <map>
17 #include <mitkIPropertyRelations.h>
18 
19 namespace mitk
20 {
22  {
23  public:
25  ~PropertyRelations() override;
26 
30 
31  bool AddRule(const PropertyRelationRuleBase *rule, bool overwrite = false) override;
32 
33  RuleResultVectorType GetRulesForSource(const IPropertyProvider* source) const override;
34 
35  RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider* sourceCandidate) const override;
36 
37  RuleResultVectorType GetRulesForDestinationCandidate(const IPropertyProvider* destCandidate) const override;
38 
39  PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const override;
40 
41  RuleIDVectorType GetRuleIDs() const override;
42 
43  bool HasRuleForSource(const IPropertyProvider* source) const override;
44 
45  void RemoveAllRules() override;
46 
47  void RemoveRule(const RuleIDType &ruleID) override;
48 
49  private:
50  using RuleMap = std::map<const std::string, PropertyRelationRuleBase::ConstPointer>;
51 
53  PropertyRelations &operator=(const PropertyRelations &);
54 
55  RuleMap m_RuleMap;
56  };
57 
60 }
61 
62 #endif
mitk::PropertyRelations
Definition: mitkPropertyRelations.h:21
mitk::PropertyRelations::RemoveAllRules
void RemoveAllRules() override
Remove all relation rules.
mitk::PropertyRelations::GetRule
PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const override
Get the relation rule that has the specified ruleID.
mitk::PropertyRelationRuleBase
Definition: mitkPropertyRelationRuleBase.h:74
mitk::IPropertyRelations::RuleResultVectorType
std::list< PropertyRelationRuleBase::ConstPointer > RuleResultVectorType
Definition: mitkIPropertyRelations.h:33
mitk::PropertyRelations::GetRulesForSourceCandidate
RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider *sourceCandidate) const override
Get all relation rules that would accept the passed IPropertOwner as source.
mitk::CreateTestInstancePropertyRelations
MITKCORE_EXPORT IPropertyRelations * CreateTestInstancePropertyRelations()
itk::SmartPointer< const Self >
mitk::IPropertyRelations::RuleIDVectorType
std::vector< RuleIDType > RuleIDVectorType
Definition: mitkIPropertyRelations.h:35
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PropertyRelations::AddRule
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....
mitk::PropertyRelations::RemoveRule
void RemoveRule(const RuleIDType &ruleID) override
Remove relation rule instance with the passed ID. If rule does not exist nothing happens.
mitk::IPropertyRelations::RuleIDType
PropertyRelationRuleBase::RuleIDType RuleIDType
Definition: mitkIPropertyRelations.h:34
mitk::IPropertyRelations
Interface of property relations service.
Definition: mitkIPropertyRelations.h:28
mitkIPropertyRelations.h
mitk::PropertyRelations::GetRuleIDs
RuleIDVectorType GetRuleIDs() const override
Get all IDs of registered rules.
mitk::PropertyRelations::HasRuleForSource
bool HasRuleForSource(const IPropertyProvider *source) const override
Check if a passed instance has defined relation covered by the registered rules.
mitk::PropertyRelations::PropertyRelations
PropertyRelations()
mitk::PropertyRelations::~PropertyRelations
~PropertyRelations() override
mitk::PropertyRelations::GetRulesForDestinationCandidate
RuleResultVectorType GetRulesForDestinationCandidate(const IPropertyProvider *destCandidate) const override
Get all relation rules that would accept the passed IPropertOwner as destination.
mitk::IPropertyProvider
Definition: mitkIPropertyProvider.h:24
mitk::PropertyRelations::GetRulesForSource
RuleResultVectorType GetRulesForSource(const IPropertyProvider *source) const override
Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource()...
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15