00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKSTRINGPROPERTY_H_HEADER_INCLUDED_C1C02491 00020 #define MITKSTRINGPROPERTY_H_HEADER_INCLUDED_C1C02491 00021 00022 #include <itkConfigure.h> 00023 00024 #include "mitkCommon.h" 00025 #include "mitkBaseProperty.h" 00026 00027 #include <string> 00028 00029 namespace mitk { 00030 00035 class MITK_CORE_EXPORT StringProperty : public BaseProperty 00036 { 00037 protected: 00038 std::string m_Value; 00039 00040 StringProperty( const char* string = 0 ); 00041 StringProperty( const std::string& s ); 00042 00043 public: 00044 mitkClassMacro(StringProperty, BaseProperty); 00045 typedef std::string ValueType; 00046 00047 itkNewMacro(StringProperty); 00048 mitkNewMacro1Param(StringProperty, const char*); 00049 mitkNewMacro1Param(StringProperty, const std::string&) 00050 00051 itkGetStringMacro(Value); 00052 itkSetStringMacro(Value); 00053 00054 virtual bool operator==(const BaseProperty& property ) const; 00055 virtual std::string GetValueAsString() const; 00056 00057 bool Assignable(const BaseProperty& other) const; 00058 virtual BaseProperty& operator=(const BaseProperty& other); 00059 00060 static const char* PATH; 00061 }; 00062 00063 } // namespace mitk 00064 00065 #endif 00066