Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPropertyListsXmlFileReaderAndWriter.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 mitkXmlSceneIO_h_included
14 #define mitkXmlSceneIO_h_included
15 
16 #include "mitkDataStorage.h"
17 
18 class TiXmlElement;
19 
20 namespace mitk
21 {
22  class PropertyListsXmlFileReaderAndWriter;
23 
24  class PropertyListsXmlFileReaderAndWriter : public itk::Object
25  {
26  public:
27  static const char *GetPropertyListIdElementName();
28 
30  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
31 
32  bool WriteLists(const std::string &fileName,
33  const std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
34  bool ReadLists(const std::string &fileName,
35  std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
36 
37  protected:
40 
41  bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, TiXmlElement *elem) const;
42  bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, TiXmlElement *elem) const;
43  };
44 }
45 
46 #endif
mitkClassMacroItkParent(PropertyListsXmlFileReaderAndWriter, itk::Object)
DataCollection - Class to facilitate loading/accessing structured data.
bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, TiXmlElement *elem) const
bool ReadLists(const std::string &fileName, std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
Abstract base class for properties.
bool WriteLists(const std::string &fileName, const std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, TiXmlElement *elem) const