Medical Imaging Interaction Toolkit  2022.04.99-e36380da
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 namespace tinyxml2
19 {
20  class XMLElement;
21 }
22 
23 namespace mitk
24 {
25  class PropertyListsXmlFileReaderAndWriter;
26 
27  class PropertyListsXmlFileReaderAndWriter : public itk::Object
28  {
29  public:
30  static const char *GetPropertyListIdElementName();
31 
33  itkFactorylessNewMacro(Self);
34  itkCloneMacro(Self);
35 
36  bool WriteLists(const std::string &fileName,
37  const std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
38  bool ReadLists(const std::string &fileName,
39  std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
40 
41  protected:
44 
45  bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, const tinyxml2::XMLElement *elem) const;
46  bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, tinyxml2::XMLElement *elem) const;
47  };
48 }
49 
50 #endif
mitk::PropertyListsXmlFileReaderAndWriter::ReadLists
bool ReadLists(const std::string &fileName, std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
mitk::BaseProperty
Abstract base class for properties.
Definition: mitkBaseProperty.h:35
mitkDataStorage.h
itk::SmartPointer< Self >
mitk::PropertyListsXmlFileReaderAndWriter
Definition: mitkPropertyListsXmlFileReaderAndWriter.h:27
mitk::PropertyListsXmlFileReaderAndWriter::mitkClassMacroItkParent
mitkClassMacroItkParent(PropertyListsXmlFileReaderAndWriter, itk::Object)
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::PropertyListsXmlFileReaderAndWriter::PropertyListsXmlFileReaderAndWriter
PropertyListsXmlFileReaderAndWriter()
mitk::PropertyListsXmlFileReaderAndWriter::GetPropertyListIdElementName
static const char * GetPropertyListIdElementName()
mitk::PropertyListsXmlFileReaderAndWriter::WriteLists
bool WriteLists(const std::string &fileName, const std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
mitk::PropertyListsXmlFileReaderAndWriter::PropertyFromXmlElem
bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, const tinyxml2::XMLElement *elem) const
mitk::PropertyListsXmlFileReaderAndWriter::~PropertyListsXmlFileReaderAndWriter
~PropertyListsXmlFileReaderAndWriter() override
tinyxml2
Definition: mitkXMLSerializable.h:20
mitk::PropertyListsXmlFileReaderAndWriter::PropertyToXmlElem
bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, tinyxml2::XMLElement *elem) const