Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
interface for all classes able to write themselves to XML files More...
#include <mitkXMLSerializable.h>
Public Member Functions | |
virtual const char * | GetNameOfClass () const =0 |
virtual void | ToXML (TiXmlElement *elem) const =0 |
virtual void | FromXML (TiXmlElement *elem)=0 |
virtual void | ToXMLFile (const std::string &file, const std::string &elemName="") |
virtual void | FromXMLFile (const std::string &file, const std::string &elemName="") |
std::string | GetXMLFileName () const |
Static Public Attributes | |
static const std::string | FILE_REFERENCE_ATTRIBUTE_NAME |
static const std::string | ROOT_NAME |
interface for all classes able to write themselves to XML files
Definition at line 30 of file mitkXMLSerializable.h.
|
pure virtual |
read your values here from elem
Implemented in mitk::Transform, and mitk::CameraIntrinsics.
|
virtual |
loads the XML file and calls FromXML() takes the first child of the document if this root node value is not equal to GetNameOfClass() the method will try to find the first children of the root node with the value of GetNameOfClass() if elemName is not empty then this value will be used instead of GetNameOfClass() if this node is found it will check if an attribute named FILE_REFERENCE_ATTRIBUTE_NAME is found: in this case the method calls itself with this attributes value as parameter
Definition at line 97 of file mitkXMLSerializable.cpp.
References endoAssertMsg, endodebug, and filename.
|
pure virtual |
the tag value will be equals to the class name (function implemented by the itkTypeMacro)
std::string mitk::XMLSerializable::GetXMLFileName | ( | ) | const |
Definition at line 92 of file mitkXMLSerializable.cpp.
|
pure virtual |
write your values here to elem
Implemented in mitk::Transform, and mitk::CameraIntrinsics.
|
virtual |
tries to write the xml data obtained in ToXML() to file
Definition at line 26 of file mitkXMLSerializable.cpp.
References endoAssertMsg.
|
static |
value of the special tag for file references if this is attribute is found the class will be loaded from the file in the attributes value
Definition at line 38 of file mitkXMLSerializable.h.
|
static |
the name of the root node that is created when the element is saved
Definition at line 42 of file mitkXMLSerializable.h.