TCRParser.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 TCRPARSER_H_INCLUDED
18 #define TCRPARSER_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 TCRParser
31 {
32  // -Weffc++
33  TCRParser(const TCRParser &other);
34  TCRParser &operator=(const TCRParser &other);
35 
36 public:
37 
38  TCRParser(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 // TCRPARSER_H_INCLUDED
59 
60 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void readReplacementTable()
Definition: TCRParser.cpp:62
TCRParser(const TCRParser &other)
boost::shared_ptr< WPXInputStream > uncompress()
Definition: TCRParser.cpp:72
Definition: TCRParser.h:30
TCRParser & operator=(const TCRParser &other)
WPXDocumentInterface *const m_document
Definition: TCRParser.h:51
void writeText(boost::shared_ptr< WPXInputStream > input)
Definition: TCRParser.cpp:86
bool parse()
Definition: TCRParser.cpp:44
WPXInputStream *const m_input
Definition: TCRParser.h:50
std::string m_replacementTable[256]
Definition: TCRParser.h:53

Generated for libe-book by doxygen 1.8.5