From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/dictionary/DictionaryReader.h | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/dictionary/DictionaryReader.h (limited to 'src/dictionary/DictionaryReader.h') diff --git a/src/dictionary/DictionaryReader.h b/src/dictionary/DictionaryReader.h new file mode 100644 index 0000000..ca2ff00 --- /dev/null +++ b/src/dictionary/DictionaryReader.h @@ -0,0 +1,44 @@ +#ifndef DICTIONARYREADER_H +#define DICTIONARYREADER_H + +#include +#include +#include + +class Dictionary; +class CardPack; +class Field; + +class DictionaryReader : public QXmlStreamReader +{ +public: + DictionaryReader( Dictionary* aDict ); + bool read( QIODevice* aDevice ); + +private: + static const QString MinSupportedDictVersion; + +private: + void readDict(); + void notifyObsoleteVersion( const QString& aOldVersion ); + void readUnknownElement(); + void readDictCurrentVersion(); + void readFields(); + void readField(); + void readPacks(); + void readPack(); + void readEntries(); + void readE(); + void readDict04(); + void readDict03(); + void readE03(); + +private: + Dictionary* m_dict; + QString m_dictVersion; + CardPack* m_curCardPack; ///< For 0.4 + QList m_curAnsFieldList; ///< For 0.4 + +}; + +#endif // DICTIONARYREADER_H -- cgit