Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkPropertyDescriptions_h
18 #define mitkPropertyDescriptions_h
19 
20 #include <map>
22 
23 namespace mitk
24 {
26  {
27  public:
30 
31  bool AddDescription(const std::string &propertyName,
32  const std::string &description,
33  const std::string &className,
34  bool overwrite) override;
35  bool AddDescriptionRegEx(const std::string &propertyRegEx,
36  const std::string &description,
37  const std::string &className,
38  bool overwrite) override;
39  std::string GetDescription(const std::string &propertyName,
40  const std::string &className,
41  bool overwrite) const override;
42  bool HasDescription(const std::string &propertyName, const std::string &className, bool overwrite) const override;
43  void RemoveAllDescriptions(const std::string &className) override;
44  void RemoveDescription(const std::string &propertyName, const std::string &className) override;
45 
46  private:
47  typedef std::map<std::string, std::string> DescriptionMap;
48  typedef DescriptionMap::const_iterator DescriptionMapConstIterator;
49  typedef DescriptionMap::iterator DescriptionMapIterator;
50 
52  PropertyDescriptions &operator=(const PropertyDescriptions &);
53 
54  std::map<std::string, DescriptionMap> m_Descriptions;
55  std::map<std::string, DescriptionMap> m_DescriptionsRegEx;
56  };
57 }
58 
59 #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.