diff options
Diffstat (limited to 'slicer/xml/serializer.h')
-rw-r--r-- | slicer/xml/serializer.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h new file mode 100644 index 0000000..8e8a023 --- /dev/null +++ b/slicer/xml/serializer.h @@ -0,0 +1,29 @@ +#ifndef SLICER_XML_H +#define SLICER_XML_H + +#include <slicer/serializer.h> + +namespace xmlpp { + class Document; + class Node; + class Element; + class Attribute; + class ContentNode; +} + +namespace Slicer { + class Xml : public Serializer { + public: + virtual void Deserialize(const boost::filesystem::path &, ModelPartPtr) override; + virtual void Serialize(const boost::filesystem::path &, ModelPartPtr) override; + + protected: + static void DocumentTreeIterate(const xmlpp::Node * node, ModelPartPtr mp); + static void DocumentTreeIterate(const xmlpp::Document * doc, ModelPartPtr mp); + static void ModelTreeIterate(xmlpp::Element *, const std::string &, ModelPartPtr mp); + static void ModelTreeIterateRoot(xmlpp::Document *, const std::string &, ModelPartPtr mp); + }; +} + +#endif + |