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

Generated for libe-book by doxygen 1.8.14