Medical Imaging Interaction Toolkit  2018.4.99-87d68d9f
Medical Imaging Interaction Toolkit
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 (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 BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54
14 #define BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54
15 
16 #include <MitkCoreExports.h>
17 #include <itkObjectFactory.h>
18 #include <mitkCommon.h>
19 #include <string>
20 
21 namespace mitk
22 {
35  class MITKCORE_EXPORT BaseProperty : public itk::Object
36  {
37  public:
39  itkCloneMacro(Self);
40 
45  bool
46  operator==(const BaseProperty &property) const;
47 
55  BaseProperty &operator=(const BaseProperty &property);
56 
62  bool AssignProperty(const BaseProperty &property);
63 
64  virtual std::string GetValueAsString() const;
65 
69  static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING;
70 
71  protected:
72  BaseProperty();
73  BaseProperty(const BaseProperty &other);
74 
75  ~BaseProperty() override;
76 
77  private:
82  virtual bool IsEqual(const BaseProperty &property) const = 0;
83 
93  virtual bool Assign(const BaseProperty &) = 0;
94  };
95 
96 } // namespace mitk
97 
98 #endif /* BASEPROPERTY_H_HEADER_INCLUDED_C1F4DF54 */
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
Abstract base class for properties.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
static const std::string VALUE_CANNOT_BE_CONVERTED_TO_STRING
Default return value if a property which can not be returned as string.