EBOOKXMLParser.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 EBOOKXMLPARSER_H_INCLUDED
11#define EBOOKXMLPARSER_H_INCLUDED
12
13#include "libebook_utils.h"
14
15namespace libebook
16{
17
18class EBOOKTokenizer;
19class EBOOKXMLContext;
20
22{
23 // disable copying
26
27public:
32 {
35 };
36
37public:
38 explicit EBOOKXMLParser(RunStyle runStyle = RunToEnd);
39
40 bool parse(const RVNGInputStreamPtr_t &input);
41
42protected:
44
45private:
46 virtual std::shared_ptr<EBOOKXMLContext> createDocumentContext() = 0;
47
48 virtual const EBOOKTokenizer &getTokenizer() const = 0;
49
50private:
52};
53
54}
55
56#endif
57
58/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EBOOKTokenizer.h:17
Definition: EBOOKXMLParser.h:22
bool parse(const RVNGInputStreamPtr_t &input)
Definition: EBOOKXMLParser.cpp:93
RunStyle
Determines whether or not the parser should quit when a context returns an empty context for a child ...
Definition: EBOOKXMLParser.h:32
@ AllowEarlyExit
Continue, skipping the child element.
Definition: EBOOKXMLParser.h:34
@ RunToEnd
Definition: EBOOKXMLParser.h:33
EBOOKXMLParser(const EBOOKXMLParser &)
~EBOOKXMLParser()
Definition: EBOOKXMLParser.cpp:89
EBOOKXMLParser & operator=(const EBOOKXMLParser &)
const RunStyle m_runStyle
Definition: EBOOKXMLParser.h:51
virtual const EBOOKTokenizer & getTokenizer() const =0
virtual std::shared_ptr< EBOOKXMLContext > createDocumentContext()=0
@ input
Definition: EBOOKHTMLToken.h:89
Definition: BBeBCollector.cpp:19
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:54

Generated for libe-book by doxygen 1.9.3