EBOOKOPFParser.h Source File documentation

EBOOKOPFParser.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 EBOOKOPFPARSER_H_INCLUDED
11 #define EBOOKOPFPARSER_H_INCLUDED
12
13 #include <librevenge/librevenge.h>
14
15 #include "libebook_utils.h"
16
17 namespace libebook
18 {
19
20 class EBOOKOPFParser
21 {
22 // disable copying
23 EBOOKOPFParser(const EBOOKOPFParser &other);
24 EBOOKOPFParser &operator=(const EBOOKOPFParser &other);
25
26 public:
27 enum Type
28 {
29 TYPE_OEB,
30 TYPE_EPUB,
31 TYPE_EPUB3
32 };
33
34 public:
35 EBOOKOPFParser(const RVNGInputStreamPtr_t &input, const RVNGInputStreamPtr_t &package, Type type, librevenge::RVNGTextInterface *document);
36
37 void parse();
38
39 static bool findOPFStream(const RVNGInputStreamPtr_t &package, unsigned &stream);
40
41 private:
42 const RVNGInputStreamPtr_t getStream(const char *name) const;
43
44 private:
45 const RVNGInputStreamPtr_t m_input;
46 const RVNGInputStreamPtr_t m_package;
47 const Type m_type;
48 librevenge::RVNGTextInterface *const m_document;
49 };
50
51 }
52
53 #endif // EBOOKOPFPARSER_H_INCLUDED
54
55 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::EBOOKOPFParser::m_input
const RVNGInputStreamPtr_t m_input
Definition: EBOOKOPFParser.h:45
libebook::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
libebook::EBOOKOPFParser::TYPE_EPUB
Definition: EBOOKOPFParser.h:30
libebook::EBOOKOPFToken::package
Definition: EBOOKOPFToken.h:65
libebook_utils.h
type
EBOOKDocument::Type type
Definition: EBOOKDocument.cpp:328
libebook::EBOOKOPFParser::TYPE_EPUB3
Definition: EBOOKOPFParser.h:31
libebook::EBOOKOPFParser::EBOOKOPFParser
EBOOKOPFParser(const EBOOKOPFParser &other)
libebook::EBOOKOPFParser::TYPE_OEB
Definition: EBOOKOPFParser.h:29
libebook::EBOOKOPFParser::m_type
const Type m_type
Definition: EBOOKOPFParser.h:47
name
string name
Definition: CHMStream.cpp:80
libebook::EBOOKOPFParser::operator=
EBOOKOPFParser & operator=(const EBOOKOPFParser &other)
libebook::EBOOKOPFParser::m_package
const RVNGInputStreamPtr_t m_package
Definition: EBOOKOPFParser.h:46
libebook::EBOOKOPFParser::Type
Type
Definition: EBOOKOPFParser.h:27
document
XMLTreeNodePtr_t document
Definition: EBOOKHTMLParser.cpp:169
libebook::EBOOKOPFParser::findOPFStream
static bool findOPFStream(const RVNGInputStreamPtr_t &package, unsigned &stream)
Definition: EBOOKOPFParser.cpp:689
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook
Definition: CHMParser.cpp:20
libebook::EBOOKOPFParser::getStream
const RVNGInputStreamPtr_t getStream(const char *name) const
Definition: EBOOKOPFParser.cpp:694
libebook::EBOOKOPFParser::parse
void parse()
Definition: EBOOKOPFParser.cpp:635
stream
RVNGInputStreamPtr_t stream
Definition: CHMStream.cpp:79
libebook::EBOOKOPFParser
Definition: EBOOKOPFParser.h:20
libebook::EBOOKOPFParser::m_document
librevenge::RVNGTextInterface *const m_document
Definition: EBOOKOPFParser.h:48