Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ZTXTPARSER_H_INCLUDED
00018 #define ZTXTPARSER_H_INCLUDED
00019
00020 #include "PDXParser.h"
00021
00022 class WPXDocumentInterface;
00023 class WPXInputStream;
00024 class WPXString;
00025
00026 namespace libebook
00027 {
00028
00029 class ZTXTParser : public PDXParser
00030 {
00031 public:
00032 explicit ZTXTParser(WPXInputStream *input, WPXDocumentInterface *document = 0);
00033
00034 virtual bool isFormatSupported(unsigned type, unsigned creator);
00035
00036 virtual void readAppInfoRecord(WPXInputStream *record);
00037 virtual void readSortInfoRecord(WPXInputStream *record);
00038 virtual void readIndexRecord(WPXInputStream *record);
00039 virtual void readDataRecord(WPXInputStream *record, bool = true);
00040
00041 virtual void readDataRecords();
00042
00043 private:
00044 void openDocument();
00045 void closeDocument();
00046 void handleText(const WPXString &text);
00047
00048 private:
00049 unsigned m_recordCount;
00050 unsigned m_size;
00051 unsigned m_recordSize;
00052 };
00053
00054 }
00055
00056 #endif // ZTXTPARSER_H_INCLUDED
00057