ZVRParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libe-book project.
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
10 #ifndef ZVRPARSER_H_INCLUDED
11 #define ZVRPARSER_H_INCLUDED
12
13 #include <string>
14
15 #include <boost/shared_ptr.hpp>
16
17 namespace libebook
18 {
19
20 class ZVRParser
21 {
22 // -Weffc++
23 ZVRParser(const ZVRParser &other);
24 ZVRParser &operator=(const ZVRParser &other);
25
26 public:
27
28 ZVRParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document = 0);
29
30 bool parse();
31
32 private:
33 void readReplacementTable();
34
35 boost::shared_ptr<librevenge::RVNGInputStream> uncompress();
36
37 void writeText(boost::shared_ptr<librevenge::RVNGInputStream> input);
38
39 private:
40 librevenge::RVNGInputStream *const m_input;
41 librevenge::RVNGTextInterface *const m_document;
42
43 std::string m_replacementTable[256];
44 };
45
46 } // namespace libebook
47
48 #endif // ZVRPARSER_H_INCLUDED
49
50 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::ZVRParser::readReplacementTable
void readReplacementTable()
Definition: ZVRParser.cpp:62
libebook::ZVRParser::m_replacementTable
std::string m_replacementTable[256]
Definition: ZVRParser.h:43
libebook::ZVRParser::operator=
ZVRParser & operator=(const ZVRParser &other)
libebook::ZVRParser::m_input
librevenge::RVNGInputStream *const m_input
Definition: ZVRParser.h:40
libebook::ZVRParser::parse
bool parse()
Definition: ZVRParser.cpp:45
libebook::ZVRParser::ZVRParser
ZVRParser(const ZVRParser &other)
libebook::ZVRParser::writeText
void writeText(boost::shared_ptr< librevenge::RVNGInputStream > input)
Definition: ZVRParser.cpp:102
libebook::ZVRParser::m_document
librevenge::RVNGTextInterface *const m_document
Definition: ZVRParser.h:41
document
XMLTreeNodePtr_t document
Definition: EBOOKHTMLParser.cpp:169
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook
Definition: CHMParser.cpp:20
libebook::ZVRParser::uncompress
boost::shared_ptr< librevenge::RVNGInputStream > uncompress()
Definition: ZVRParser.cpp:88
libebook::ZVRParser
Definition: ZVRParser.h:20