Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPropertyAliases.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 mitkPropertyAliases_h
18 #define mitkPropertyAliases_h
19 
20 #include <map>
21 #include <mitkIPropertyAliases.h>
22 
23 namespace mitk
24 {
26  {
27  public:
30 
31  bool AddAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override;
32  std::vector<std::string> GetAliases(const std::string &propertyName, const std::string &className) override;
33  std::string GetPropertyName(const std::string &alias, const std::string &className) override;
34  bool HasAliases(const std::string &propertyName, const std::string &className) override;
35  void RemoveAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override;
36  void RemoveAliases(const std::string &propertyName, const std::string &className) override;
37  void RemoveAllAliases(const std::string &className) override;
38 
39  private:
40  typedef std::map<std::string, std::vector<std::string>> AliasesMap;
41  typedef AliasesMap::const_iterator AliasesMapConstIterator;
42  typedef AliasesMap::iterator AliasesMapIterator;
43 
45  PropertyAliases &operator=(const PropertyAliases &);
46 
47  std::map<std::string, AliasesMap> m_Aliases;
48  };
49 }
50 
51 #endif
std::string GetPropertyName(const std::string &alias, const std::string &className) override
Get property name that is associated to specific alias.
Interface of property aliases service.
DataCollection - Class to facilitate loading/accessing structured data.
bool HasAliases(const std::string &propertyName, const std::string &className) override
Check if a specific property has aliases.
bool AddAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override
Add an alias for a specific property.
void RemoveAliases(const std::string &propertyName, const std::string &className) override
Remove all aliases of a specific property.
std::vector< std::string > GetAliases(const std::string &propertyName, const std::string &className) override
Get aliases for a specific property.
void RemoveAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override
Remove specific alias of a certain property.
void RemoveAllAliases(const std::string &className) override
Remove all aliases of all properties.