Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkBaseProperty.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 BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54
18 #define BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54
19 
20 #include <MitkCoreExports.h>
21 #include <itkObjectFactory.h>
22 #include <mitkCommon.h>
23 #include <string>
24 
25 namespace mitk
26 {
39  class MITKCORE_EXPORT BaseProperty : public itk::Object
40  {
41  public:
42  mitkClassMacroItkParent(BaseProperty, itk::Object) itkCloneMacro(Self)
43 
48  bool
49  operator==(const BaseProperty &property) const;
50 
58  BaseProperty &operator=(const BaseProperty &property);
59 
65  bool AssignProperty(const BaseProperty &property);
66 
67  virtual std::string GetValueAsString() const;
68 
72  static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING;
73 
74  protected:
75  BaseProperty();
76  BaseProperty(const BaseProperty &other);
77 
78  virtual ~BaseProperty();
79 
80  private:
85  virtual bool IsEqual(const BaseProperty &property) const = 0;
86 
96  virtual bool Assign(const BaseProperty &) = 0;
97  };
98 
99 } // namespace mitk
100 
101 #endif /* BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54 */
#define MITKCORE_EXPORT
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
Abstract base class for properties.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53