diff options
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/common/xmldeserializer.h')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/common/xmldeserializer.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/common/xmldeserializer.h b/SQLiteStudio3/coreSQLiteStudio/common/xmldeserializer.h new file mode 100644 index 0000000..52761cf --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/common/xmldeserializer.h @@ -0,0 +1,31 @@ +/*#ifndef XMLDESERIALIZER_H
+#define XMLDESERIALIZER_H
+
+#include "coreSQLiteStudio_global.h"
+#include <QTextStream>
+#include <QXmlStreamReader>
+#include <QStack>
+#include <QHash>
+
+class API_EXPORT XmlDeserializer
+{
+ public:
+ XmlDeserializer();
+
+ QHash<QString,QVariant> deserialize(QIODevice* input);
+ QHash<QString,QVariant> deserialize(const QString& input);
+
+ private:
+ QHash<QString,QVariant> deserialize(QXmlStreamReader& reader);
+ void handleTokenType(QXmlStreamReader& reader, QXmlStreamReader::TokenType tokenType);
+ void handleStartElement(QXmlStreamReader& reader);
+ void handleText(QXmlStreamReader& reader);
+ void handleEndElement(QXmlStreamReader& reader);
+
+ QHash<QString, QVariant> output;
+ QHash<QString, QVariant>* ctx;
+ QStack<QHash<QString, QVariant>*> ctxStack;
+};
+
+#endif // XMLDESERIALIZER_H
+*/
|
