Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkPropertyPersistence.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 mitkPropertyPersistence_h
14 #define mitkPropertyPersistence_h
15 
16 #include <map>
18 
19 namespace mitk
20 {
22  {
23  public:
25  ~PropertyPersistence() override;
26 
28 
29  bool AddInfo(const PropertyPersistenceInfo *info, bool overwrite) override;
30  InfoResultType GetInfo(const std::string &propertyName, bool allowNameRegEx) const override;
31  InfoResultType GetInfo(const std::string &propertyName,
32  const MimeTypeNameType &mime,
33  bool allowMimeWildCard,
34  bool allowNameRegEx) const override;
35  InfoResultType GetInfoByKey(const std::string &persistenceKey, bool allowKeyRegEx) const override;
36  bool HasInfo(const std::string &propertyName, bool allowNameRegEx) const override;
37  void RemoveAllInfo() override;
38  void RemoveInfo(const std::string &propertyName) override;
39  void RemoveInfo(const std::string &propertyName, const MimeTypeNameType &mime) override;
40 
41  private:
42  typedef std::multimap<const std::string, PropertyPersistenceInfo::ConstPointer> InfoMap;
43 
45  using SelectFunctionType = std::function<bool(const InfoMap::value_type &)>;
46  static InfoMap SelectInfo(const InfoMap &infoMap, const SelectFunctionType &selectFunction);
47 
49  PropertyPersistence &operator=(const PropertyPersistence &);
50 
51  InfoMap m_InfoMap;
52  };
53 
56 }
57 
58 #endif
mitk::PropertyPersistence::~PropertyPersistence
~PropertyPersistence() override
mitk::PropertyPersistence::InfoResultType
IPropertyPersistence::InfoResultType InfoResultType
Definition: mitkPropertyPersistence.h:27
mitk::PropertyPersistence::GetInfo
InfoResultType GetInfo(const std::string &propertyName, bool allowNameRegEx) const override
Get the persistence info for a specific base data property.
mitkIPropertyPersistence.h
mitk::PropertyPersistence::RemoveAllInfo
void RemoveAllInfo() override
Remove all persistence info.
mitk::PropertyPersistence::RemoveInfo
void RemoveInfo(const std::string &propertyName) override
Remove persistence info instances of a specific property name/regex.
mitk::PropertyPersistence::HasInfo
bool HasInfo(const std::string &propertyName, bool allowNameRegEx) const override
Check if a specific base data property has persistence info.
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PropertyPersistence::GetInfoByKey
InfoResultType GetInfoByKey(const std::string &persistenceKey, bool allowKeyRegEx) const override
Get the persistence info that will use the specified key.
mitk::PropertyPersistence::AddInfo
bool AddInfo(const PropertyPersistenceInfo *info, bool overwrite) override
Add persistence info for a specific base data property. If there is already a property info instance ...
mitk::IPropertyPersistence::MimeTypeNameType
PropertyPersistenceInfo::MimeTypeNameType MimeTypeNameType
Definition: mitkIPropertyPersistence.h:39
mitk::IPropertyPersistence::InfoResultType
std::list< PropertyPersistenceInfo::ConstPointer > InfoResultType
Definition: mitkIPropertyPersistence.h:38
mitk::PropertyPersistence::PropertyPersistence
PropertyPersistence()
mitk::PropertyPersistence
Definition: mitkPropertyPersistence.h:21
mitk::PropertyPersistenceInfo
Property persistence info. This class is used to specify the way the persistance of a property of Bas...
Definition: mitkPropertyPersistenceInfo.h:32
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::IPropertyPersistence
Interface of property persistence service.
Definition: mitkIPropertyPersistence.h:33
mitk::CreateTestInstancePropertyPersistence
MITKCORE_EXPORT IPropertyPersistence * CreateTestInstancePropertyPersistence()