Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
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 (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 mitkPropertyAliases_h
14 #define mitkPropertyAliases_h
15 
16 #include <map>
17 #include <mitkIPropertyAliases.h>
18 
19 namespace mitk
20 {
22  {
23  public:
25  ~PropertyAliases() override;
26 
27  bool AddAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override;
28  std::vector<std::string> GetAliases(const std::string &propertyName, const std::string &className) override;
29  std::string GetPropertyName(const std::string &alias, const std::string &className) override;
30  bool HasAliases(const std::string &propertyName, const std::string &className) override;
31  void RemoveAlias(const std::string &propertyName, const std::string &alias, const std::string &className) override;
32  void RemoveAliases(const std::string &propertyName, const std::string &className) override;
33  void RemoveAllAliases(const std::string &className) override;
34 
35  private:
36  typedef std::map<std::string, std::vector<std::string>> AliasesMap;
37  typedef AliasesMap::const_iterator AliasesMapConstIterator;
38  typedef AliasesMap::iterator AliasesMapIterator;
39 
41  PropertyAliases &operator=(const PropertyAliases &);
42 
43  std::map<std::string, AliasesMap> m_Aliases;
44  };
45 }
46 
47 #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.
~PropertyAliases() override
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.
std::vector< std::string > GetAliases(const std::string &propertyName, const std::string &className) override
Get aliases for a specific property.