00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision: 1.12 $ 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 #ifndef mitkPropertyListSerializer_h_included 00019 #define mitkPropertyListSerializer_h_included 00020 00021 #include "SceneSerializationBaseExports.h" 00022 00023 #include "mitkPropertyList.h" 00024 00025 #include <itkObjectFactoryBase.h> 00026 00027 class TiXmlElement; 00028 00029 namespace mitk 00030 { 00031 00035 class SceneSerializationBase_EXPORT PropertyListSerializer : public itk::Object 00036 { 00037 public: 00038 00039 mitkClassMacro( PropertyListSerializer, itk::Object ); 00040 itkNewMacro(Self); // is this needed? should never be instantiated, only subclasses should 00041 00042 itkSetStringMacro(FilenameHint); 00043 itkGetStringMacro(FilenameHint); 00044 00045 itkSetStringMacro(WorkingDirectory); 00046 itkGetStringMacro(WorkingDirectory); 00047 00048 itkSetObjectMacro(PropertyList, PropertyList); 00049 00054 virtual std::string Serialize(); 00055 00056 PropertyList* GetFailedProperties(); 00057 00058 protected: 00059 00060 PropertyListSerializer(); 00061 virtual ~PropertyListSerializer(); 00062 00063 TiXmlElement* SerializeOneProperty( const std::string& key, const BaseProperty* property ); 00064 00065 std::string m_FilenameHint; 00066 std::string m_WorkingDirectory; 00067 PropertyList::Pointer m_PropertyList; 00068 00069 PropertyList::Pointer m_FailedProperties; 00070 }; 00071 00072 } // namespace 00073 00074 #endif 00075