EBOOKSAXParser.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
31{
32 // disable copying
35
36public:
37 explicit EBOOKSAXParser(const RVNGInputStreamPtr_t &input);
38 virtual ~EBOOKSAXParser() = 0;
39
40 void parse();
41
48 virtual int getId(const char *name, const char *ns) const = 0;
49
50 virtual void startElement(int id) = 0;
51 virtual void endElement(int id) = 0;
52 virtual void attribute(int id, const char *value) = 0;
53
54 virtual void startElementByName(const char *name, const char *ns) = 0;
55 virtual void endElementByName(const char *name, const char *ns) = 0;
56 virtual void attributeByName(const char *name, const char *ns, const char *value) = 0;
57
58 virtual void text(const char *value) = 0;
59
60private:
62};
63
64}
65
66#endif // EBOOKXMLPARSER_H_INCLUDED
67
68/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
string name
Definition HTMLHelpStream.cpp:80
qi::rule< Iterator, AttrValue_t, qi::space_type > value
Definition TealDocParser.cpp:231
Base class for simple SAX-like XML parser.
Definition EBOOKSAXParser.h:31
virtual void attribute(int id, const char *value)=0
virtual void endElement(int id)=0
virtual void startElementByName(const char *name, const char *ns)=0
virtual void attributeByName(const char *name, const char *ns, const char *value)=0
void parse()
Definition EBOOKSAXParser.cpp:118
virtual void endElementByName(const char *name, const char *ns)=0
virtual ~EBOOKSAXParser()=0
Definition EBOOKSAXParser.cpp:114
virtual int getId(const char *name, const char *ns) const =0
Get id of the element/attribute.
const RVNGInputStreamPtr_t m_input
Definition EBOOKSAXParser.h:61
virtual void text(const char *value)=0
EBOOKSAXParser(const EBOOKSAXParser &other)
EBOOKSAXParser & operator=(const EBOOKSAXParser &other)
virtual void startElement(int id)=0
Definition BBeBCollector.cpp:19
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition libebook_utils.h:54

Generated for libe-book by doxygen 1.10.0