ZVRParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libe-book
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Alternatively, the contents of this file may be used under the terms
10  * of the GNU Lesser General Public License Version 2.1 or later
11  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
12  * applicable instead of those above.
13  *
14  * For further information visit http://libebook.sourceforge.net
15  */
16 
17 #ifndef ZVRPARSER_H_INCLUDED
18 #define ZVRPARSER_H_INCLUDED
19 
20 #include <string>
21 
22 #include <boost/shared_ptr.hpp>
23 
24 class WPXDocumentInterface;
25 class WPXInputStream;
26 
27 namespace libebook
28 {
29 
30 class ZVRParser
31 {
32  // -Weffc++
33  ZVRParser(const ZVRParser &other);
34  ZVRParser &operator=(const ZVRParser &other);
35 
36 public:
37 
38  ZVRParser(WPXInputStream *input, WPXDocumentInterface *document);
39 
40  bool parse();
41 
42 private:
43  void readReplacementTable();
44 
45  boost::shared_ptr<WPXInputStream> uncompress();
46 
47  void writeText(boost::shared_ptr<WPXInputStream> input);
48 
49 private:
50  WPXInputStream *const m_input;
51  WPXDocumentInterface *const m_document;
52 
53  std::string m_replacementTable[256];
54 };
55 
56 } // namespace libebook
57 
58 #endif // ZVRPARSER_H_INCLUDED
59 
60 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void readReplacementTable()
Definition: ZVRParser.cpp:62
std::string m_replacementTable[256]
Definition: ZVRParser.h:53
WPXDocumentInterface *const m_document
Definition: ZVRParser.h:51
ZVRParser & operator=(const ZVRParser &other)
bool parse()
Definition: ZVRParser.cpp:44
ZVRParser(const ZVRParser &other)
WPXInputStream *const m_input
Definition: ZVRParser.h:50
void writeText(boost::shared_ptr< WPXInputStream > input)
Definition: ZVRParser.cpp:103
boost::shared_ptr< WPXInputStream > uncompress()
Definition: ZVRParser.cpp:89
Definition: ZVRParser.h:30

Generated for libe-book by doxygen 1.8.5