Medical Imaging Interaction Toolkit  2018.4.99-65942676
Medical Imaging Interaction Toolkit
mitkStringProperty.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 MITKSTRINGPROPERTY_H_HEADER_INCLUDED_C1C02491
14 #define MITKSTRINGPROPERTY_H_HEADER_INCLUDED_C1C02491
15 
16 #include <itkConfigure.h>
17 
18 #include "mitkBaseProperty.h"
19 #include <MitkCoreExports.h>
20 
21 #include <string>
22 
23 namespace mitk
24 {
25 #ifdef _MSC_VER
26 #pragma warning(push)
27 #pragma warning(disable : 4522)
28 #endif
29 
35  {
36  protected:
37  std::string m_Value;
38 
39  StringProperty(const char *string = nullptr);
40  StringProperty(const std::string &s);
41 
43 
44  public:
46  typedef std::string ValueType;
47 
48  itkFactorylessNewMacro(Self);
49  itkCloneMacro(Self);
51  mitkNewMacro1Param(StringProperty, const std::string&);
52 
53  itkGetStringMacro(Value);
54  itkSetStringMacro(Value);
55 
56  std::string GetValueAsString() const override;
57 
58  static const char *PATH;
59 
60  using BaseProperty::operator=;
61 
62  private:
63  // purposely not implemented
64  StringProperty &operator=(const StringProperty &);
65 
66  itk::LightObject::Pointer InternalClone() const override;
67 
68  bool IsEqual(const BaseProperty &property) const override;
69  bool Assign(const BaseProperty &property) override;
70  };
71 
72 #ifdef _MSC_VER
73 #pragma warning(pop)
74 #endif
75 
76 } // namespace mitk
77 
78 #endif
#define MITKCORE_EXPORT
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:72
DataCollection - Class to facilitate loading/accessing structured data.
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
static const char * PATH
Property for strings.