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 ZVRPARSER_H_INCLUDED
00018 #define ZVRPARSER_H_INCLUDED
00019
00020 #include <string>
00021
00022 #include <boost/shared_ptr.hpp>
00023
00024 class WPXDocumentInterface;
00025 class WPXInputStream;
00026
00027 namespace libebook
00028 {
00029
00030 class ZVRParser
00031 {
00032
00033 ZVRParser(const ZVRParser &other);
00034 ZVRParser &operator=(const ZVRParser &other);
00035
00036 public:
00037
00038 ZVRParser(WPXInputStream *input, WPXDocumentInterface *document);
00039
00040 bool parse();
00041
00042 private:
00043 void readReplacementTable();
00044
00045 boost::shared_ptr<WPXInputStream> uncompress();
00046
00047 void writeText(boost::shared_ptr<WPXInputStream> input);
00048
00049 private:
00050 WPXInputStream *const m_input;
00051 WPXDocumentInterface *const m_document;
00052
00053 std::string m_replacementTable[256];
00054 };
00055
00056 }
00057
00058 #endif // ZVRPARSER_H_INCLUDED
00059
00060