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: */
type
EBOOKDocument::Type type
Definition EBOOKDocument.cpp:325
document
XMLTreeNodePtr_t document
Definition EBOOKHTMLParser.cpp:163
stream
RVNGInputStreamPtr_t stream
Definition HTMLHelpStream.cpp:79
name
string name
Definition HTMLHelpStream.cpp:80
libebook::EBOOKOPFParser
Definition EBOOKOPFParser.h:21
libebook::EBOOKOPFParser::operator=
EBOOKOPFParser & operator=(const EBOOKOPFParser &other)
libebook::EBOOKOPFParser::getStream
const RVNGInputStreamPtr_t getStream(const char *name) const
Definition EBOOKOPFParser.cpp:694
libebook::EBOOKOPFParser::parse
void parse()
Definition EBOOKOPFParser.cpp:635
libebook::EBOOKOPFParser::m_input
const RVNGInputStreamPtr_t m_input
Definition EBOOKOPFParser.h:45
libebook::EBOOKOPFParser::EBOOKOPFParser
EBOOKOPFParser(const EBOOKOPFParser &other)
libebook::EBOOKOPFParser::m_type
const Type m_type
Definition EBOOKOPFParser.h:47
libebook::EBOOKOPFParser::Type
Type
Definition EBOOKOPFParser.h:28
libebook::EBOOKOPFParser::TYPE_OEB
@ TYPE_OEB
Definition EBOOKOPFParser.h:29
libebook::EBOOKOPFParser::TYPE_EPub3
@ TYPE_EPub3
Definition EBOOKOPFParser.h:31
libebook::EBOOKOPFParser::TYPE_EPub
@ TYPE_EPub
Definition EBOOKOPFParser.h:30
libebook::EBOOKOPFParser::m_document
librevenge::RVNGTextInterface *const m_document
Definition EBOOKOPFParser.h:48
libebook::EBOOKOPFParser::findOPFStream
static bool findOPFStream(const RVNGInputStreamPtr_t &package, unsigned &stream)
Definition EBOOKOPFParser.cpp:689
libebook::EBOOKOPFParser::m_package
const RVNGInputStreamPtr_t m_package
Definition EBOOKOPFParser.h:46
libebook_utils.h
libebook
Definition BBeBCollector.cpp:19
libebook::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition libebook_utils.h:54