summaryrefslogtreecommitdiff
path: root/slicer/xml/serializer.h
diff options
context:
space:
mode:
Diffstat (limited to 'slicer/xml/serializer.h')
-rw-r--r--slicer/xml/serializer.h37
1 files changed, 4 insertions, 33 deletions
diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h
index d138ac0..9c6e1ae 100644
--- a/slicer/xml/serializer.h
+++ b/slicer/xml/serializer.h
@@ -1,7 +1,6 @@
#ifndef SLICER_XML_H
#define SLICER_XML_H
-#include <lazyPointer.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wsign-conversion"
@@ -9,12 +8,9 @@
# pragma GCC diagnostic ignored "-Wuseless-cast"
#endif
#include <libxml++/document.h>
-#include <libxml++/nodes/element.h>
#pragma GCC diagnostic pop
#include <filesystem>
#include <fstream>
-#include <functional>
-#include <iosfwd>
#include <slicer/modelParts.h>
#include <slicer/serializer.h>
#include <string>
@@ -25,22 +21,7 @@ namespace Glib {
}
namespace Slicer {
- using CurrentElementCreator = ::AdHoc::LazyPointer<xmlpp::Element, xmlpp::Element *>;
-
- class DLL_PUBLIC XmlSerializer : public Serializer {
- protected:
- using ElementCreator = std::function<xmlpp::Element *(xmlpp::Element *, const Glib::ustring &)>;
- static void ModelTreeIterate(xmlpp::Element *, const std::string &, ModelPartParam mp, const HookCommon * hp,
- const ElementCreator &);
- static void ModelTreeIterateRoot(xmlpp::Document *, const std::string &, ModelPartParam mp);
-
- protected:
- static void ModelTreeProcessElement(const CurrentElementCreator &, ModelPartParam mp, const ElementCreator &);
- static void ModelTreeIterateDictAttrs(xmlpp::Element * element, ModelPartParam dict);
- static void ModelTreeIterateDictElements(xmlpp::Element * element, ModelPartParam dict);
- };
-
- class DLL_PUBLIC XmlDocumentSerializer : public XmlSerializer {
+ class DLL_PUBLIC XmlDocumentSerializer : public Serializer {
public:
void Serialize(ModelPartForRootParam) override;
@@ -66,17 +47,7 @@ namespace Slicer {
std::ofstream strm;
};
- class DLL_PUBLIC XmlDeserializer : public Deserializer {
- protected:
- static void DocumentTreeIterate(const xmlpp::Node * node, ModelPartParam mp);
- static void DocumentTreeIterateElement(const xmlpp::Element * element, ModelPartParam mp, const ChildRef & c);
- static void DocumentTreeIterate(const xmlpp::Document * doc, ModelPartParam mp);
- static void DocumentTreeIterateDictAttrs(
- const xmlpp::Element::const_AttributeList & attrs, ModelPartParam dict);
- static void DocumentTreeIterateDictElements(const xmlpp::Element * parent, ModelPartParam dict);
- };
-
- class DLL_PUBLIC XmlStreamDeserializer : public XmlDeserializer {
+ class DLL_PUBLIC XmlStreamDeserializer : public Deserializer {
public:
explicit XmlStreamDeserializer(std::istream &);
@@ -86,7 +57,7 @@ namespace Slicer {
std::istream & strm;
};
- class DLL_PUBLIC XmlFileDeserializer : public XmlDeserializer {
+ class DLL_PUBLIC XmlFileDeserializer : public Deserializer {
public:
explicit XmlFileDeserializer(std::filesystem::path);
@@ -96,7 +67,7 @@ namespace Slicer {
const std::filesystem::path path;
};
- class DLL_PUBLIC XmlDocumentDeserializer : public XmlDeserializer {
+ class DLL_PUBLIC XmlDocumentDeserializer : public Deserializer {
public:
explicit XmlDocumentDeserializer(const xmlpp::Document *);