IMPParser.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 IMPPARSER_H_INCLUDED
18 #define IMPPARSER_H_INCLUDED
19 
20 #include <boost/shared_ptr.hpp>
21 
22 #include "IMPCollector.h"
23 #include "IMPHeader.h"
24 
25 class WPXDocumentInterface;
26 class WPXInputStream;
27 
28 namespace libebook
29 {
30 
31 class IMPParser
32 {
33  // disable copying
34  IMPParser(const IMPParser &);
35  IMPParser &operator=(const IMPParser &);
36 
37 public:
38  IMPParser(WPXInputStream *input, WPXDocumentInterface *document);
39 
40  bool parse();
41 
42 private:
43  void createTextStream();
44 
45  boost::shared_ptr<WPXInputStream> getFileStream(const char *name) const;
46 
47 private:
49  WPXInputStream *const m_input;
51  boost::shared_ptr<WPXInputStream> m_resources;
52  boost::shared_ptr<WPXInputStream> m_text;
53 };
54 
55 }
56 
57 #endif // IMPPARSER_H_INCLUDED
58 
59 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
boost::shared_ptr< WPXInputStream > getFileStream(const char *name) const
Definition: IMPParser.cpp:251
Definition: IMPHeader.h:29
void createTextStream()
Definition: IMPParser.cpp:208
Definition: IMPParser.h:31
IMPParser(const IMPParser &)
const IMPHeader m_header
Definition: IMPParser.h:48
boost::shared_ptr< WPXInputStream > m_text
Definition: IMPParser.h:52
boost::shared_ptr< WPXInputStream > m_resources
Definition: IMPParser.h:51
Definition: IMPCollector.h:29
IMPCollector m_collector
Definition: IMPParser.h:50
IMPParser & operator=(const IMPParser &)
WPXInputStream *const m_input
Definition: IMPParser.h:49
const char * name
Definition: FB2Token.cpp:26
bool parse()
Definition: IMPParser.cpp:197

Generated for libe-book by doxygen 1.8.5