Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkIPropertyOwner.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 mitkIPropertyOwner_h
14 #define mitkIPropertyOwner_h
15 
16 #include <MitkCoreExports.h>
17 #include <mitkIPropertyProvider.h>
18 
19 namespace mitk
20 {
27  {
28  public:
29  ~IPropertyOwner() override;
30 
43  virtual BaseProperty *GetNonConstProperty(const std::string &propertyKey,
44  const std::string &contextName = "",
45  bool fallBackOnDefaultContext = true) = 0;
46 
61  virtual void SetProperty(const std::string &propertyKey,
62  BaseProperty *property,
63  const std::string &contextName = "",
64  bool fallBackOnDefaultContext = false) = 0;
65 
79  virtual void RemoveProperty(const std::string &propertyKey,
80  const std::string &contextName = "",
81  bool fallBackOnDefaultContext = false) = 0;
82 
95  virtual bool PropertyIsOwned(const std::string& propertyKey,
96  const std::string& contextName = "",
97  bool fallBackOnDefaultContext = true) const;
98  };
99 } // namespace mitk
100 
101 #endif
#define MITKCORE_EXPORT
Abstract base class for properties.
Interface implemented by classes that provide write/read access to property information.
virtual bool PropertyIsOwned(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const
Checks if a certain property exists.
virtual void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0
Add new or change existent property.
~IPropertyOwner() override
virtual BaseProperty * GetNonConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true)=0
Get property by its key.
virtual void RemoveProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false)=0
Removes a property. If the property does not exist, nothing will be done.
Interface implemented by classes that provide access to property information.
Find image slices visible on a given plane.