Medical Imaging Interaction Toolkit  2018.4.99-bb4bf944
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);
31  itkCloneMacro(Self);
32 
33  bool WriteLists(const std::string &fileName,
34  const std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
35  bool ReadLists(const std::string &fileName,
36  std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
37 
38  protected:
41 
42  bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, TiXmlElement *elem) const;
43  bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, TiXmlElement *elem) const;
44  };
45 }
46 
47 #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
static const char * GetPropertyListIdElementName()