Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkIPropertyPersistence.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 mitkIPropertyPersistence_h
14 #define mitkIPropertyPersistence_h
15 
17 #include <mitkServiceInterface.h>
18 
19 namespace mitk
20 {
34  {
35  public:
37 
38  using InfoResultType = std::list<PropertyPersistenceInfo::ConstPointer>;
40 
52  virtual bool AddInfo(const PropertyPersistenceInfo *info, bool overwrite = false) = 0;
53 
59  virtual InfoResultType GetInfo(const std::string &propertyName, bool allowNameRegEx = true) const = 0;
60 
73  virtual InfoResultType GetInfo(const std::string &propertyName,
74  const MimeTypeNameType &mime,
75  bool allowMimeWildCard = false,
76  bool allowNameRegEx = true) const = 0;
77 
84  virtual InfoResultType GetInfoByKey(const std::string &persistenceKey, bool allowKeyRegEx = true) const = 0;
85 
92  virtual bool HasInfo(const std::string &propertyName, bool allowNameRegEx = true) const = 0;
93 
96  virtual void RemoveAllInfo() = 0;
97 
102  virtual void RemoveInfo(const std::string &propertyName) = 0;
103 
109  virtual void RemoveInfo(const std::string &propertyName, const MimeTypeNameType &mime) = 0;
110  };
111 }
112 
113 MITK_DECLARE_SERVICE_INTERFACE(mitk::IPropertyPersistence, "org.mitk.IPropertyPersistence")
114 
115 #endif
#define MITKCORE_EXPORT
Interface of property persistence service.
virtual void RemoveInfo(const std::string &propertyName)=0
Remove persistence info instances of a specific property name/regex.
virtual void RemoveInfo(const std::string &propertyName, const MimeTypeNameType &mime)=0
Remove persistence info instances of a specific property name/regex and mime type.
std::list< PropertyPersistenceInfo::ConstPointer > InfoResultType
virtual InfoResultType GetInfo(const std::string &propertyName, bool allowNameRegEx=true) const =0
Get the persistence info for a specific base data property.
virtual bool AddInfo(const PropertyPersistenceInfo *info, bool overwrite=false)=0
Add persistence info for a specific base data property. If there is already a property info instance ...
virtual InfoResultType GetInfoByKey(const std::string &persistenceKey, bool allowKeyRegEx=true) const =0
Get the persistence info that will use the specified key.
virtual bool HasInfo(const std::string &propertyName, bool allowNameRegEx=true) const =0
Check if a specific base data property has persistence info.
virtual InfoResultType GetInfo(const std::string &propertyName, const MimeTypeNameType &mime, bool allowMimeWildCard=false, bool allowNameRegEx=true) const =0
Get the persistence info for a specific base data property and mime type.
PropertyPersistenceInfo::MimeTypeNameType MimeTypeNameType
virtual void RemoveAllInfo()=0
Remove all persistence info.
Property persistence info. This class is used to specify the way the persistance of a property of Bas...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Find image slices visible on a given plane.