Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkStringProperty.cpp
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 #include "mitkStringProperty.h"
14 
15 const char *mitk::StringProperty::PATH = "path";
16 mitk::StringProperty::StringProperty(const char *string) : m_Value()
17 {
18  if (string)
19  m_Value = string;
20 }
21 
23 {
24 }
25 
27 {
28 }
29 
30 bool mitk::StringProperty::IsEqual(const BaseProperty &property) const
31 {
32  return this->m_Value == static_cast<const Self &>(property).m_Value;
33 }
34 
35 bool mitk::StringProperty::Assign(const BaseProperty &property)
36 {
37  this->m_Value = static_cast<const Self &>(property).m_Value;
38  return true;
39 }
40 
42 {
43  return m_Value;
44 }
45 
46 itk::LightObject::Pointer mitk::StringProperty::InternalClone() const
47 {
48  itk::LightObject::Pointer result(new Self(*this));
49  result->UnRegister();
50  return result;
51 }
std::string GetValueAsString() const override
StringProperty(const char *string=nullptr)
Abstract base class for properties.
static const char * PATH
Property for strings.