MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkXMLSerializable.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef mitkXMLSerializable_h
13#define mitkXMLSerializable_h
14
15#include <string>
16#include <itkObject.h>
17#include <itkMacro.h>
18#include <MitkCameraCalibrationExports.h>
19
20namespace tinyxml2
21{
22 class XMLElement;
23}
24
25namespace mitk
26{
30 class MITKCAMERACALIBRATION_EXPORT XMLSerializable
31 {
32 public:
38 static const std::string FILE_REFERENCE_ATTRIBUTE_NAME;
42 static const std::string ROOT_NAME;
47 virtual const char* GetNameOfClass() const = 0;
48
52 virtual void ToXML(tinyxml2::XMLElement* elem) const = 0;
56 virtual void FromXML(const tinyxml2::XMLElement* elem) = 0;
57
61 virtual void ToXMLFile(const std::string& file
62 , const std::string& elemName="");
63
76 virtual void FromXMLFile(const std::string& file
77 , const std::string& elemName="");
78
82 std::string GetXMLFileName() const;
83
84 private:
88 std::string m_XMLFileName;
89 };
90}
91
92#endif
interface for all classes able to write themselves to XML files
virtual void FromXML(const tinyxml2::XMLElement *elem)=0
virtual void ToXML(tinyxml2::XMLElement *elem) const =0
static const std::string ROOT_NAME
virtual const char * GetNameOfClass() const =0
static const std::string FILE_REFERENCE_ATTRIBUTE_NAME
IGT Exceptions.