Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
mitkPropertyDescriptions.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 mitkPropertyDescriptions_h
14 #define mitkPropertyDescriptions_h
15 
16 #include <map>
18 
19 namespace mitk
20 {
22  {
23  public:
25  ~PropertyDescriptions() override;
26 
27  bool AddDescription(const std::string &propertyName,
28  const std::string &description,
29  const std::string &className,
30  bool overwrite) override;
31  bool AddDescriptionRegEx(const std::string &propertyRegEx,
32  const std::string &description,
33  const std::string &className,
34  bool overwrite) override;
35  std::string GetDescription(const std::string &propertyName,
36  const std::string &className,
37  bool overwrite) const override;
38  bool HasDescription(const std::string &propertyName, const std::string &className, bool overwrite) const override;
39  void RemoveAllDescriptions(const std::string &className) override;
40  void RemoveDescription(const std::string &propertyName, const std::string &className) override;
41 
42  private:
43  typedef std::map<std::string, std::string> DescriptionMap;
44  typedef DescriptionMap::const_iterator DescriptionMapConstIterator;
45  typedef DescriptionMap::iterator DescriptionMapIterator;
46 
48  PropertyDescriptions &operator=(const PropertyDescriptions &);
49 
50  std::map<std::string, DescriptionMap> m_Descriptions;
51  std::map<std::string, DescriptionMap> m_DescriptionsRegEx;
52  };
53 }
54 
55 #endif
void RemoveAllDescriptions(const std::string &className) override
Remove all descriptions.
bool HasDescription(const std::string &propertyName, const std::string &className, bool overwrite) const override
Check if a specific property has a description.
bool AddDescription(const std::string &propertyName, const std::string &description, const std::string &className, bool overwrite) override
Add a description for a specific property.
DataCollection - Class to facilitate loading/accessing structured data.
bool AddDescriptionRegEx(const std::string &propertyRegEx, const std::string &description, const std::string &className, bool overwrite) override
Add a description for all properties matching the property regulary expression.
Interface of property descriptions service.
std::string GetDescription(const std::string &propertyName, const std::string &className, bool overwrite) const override
Get the description for a specific property.
void RemoveDescription(const std::string &propertyName, const std::string &className) override
Remove description of specific property.