FB2XMLParserContext.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 FB2XMLPARSERCONTEXT_H_INCLUDED
11 #define FB2XMLPARSERCONTEXT_H_INCLUDED
12
13 namespace libebook
14 {
15
16 struct FB2TokenData;
17
18 class FB2XMLParserContext
19 {
20 public:
21 virtual ~FB2XMLParserContext() = 0;
22
30 virtual FB2XMLParserContext *leaveContext() const = 0;
31
36 virtual FB2XMLParserContext *element(const FB2TokenData &name, const FB2TokenData &ns) = 0;
37
43 virtual void startOfElement() = 0;
44
47 virtual void endOfElement() = 0;
48
54 virtual void attribute(const FB2TokenData &name, const FB2TokenData *ns, const char *value) = 0;
55
58 virtual void endOfAttributes() = 0;
59
65 virtual void text(const char *value) = 0;
66 };
67
68 }
69
70 #endif // FB2XMLPARSERCONTEXT_H_INCLUDED
71
72 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::FB2XMLParserContext::endOfAttributes
virtual void endOfAttributes()=0
Signalize the end of attributes.
libebook::FB2XMLParserContext::endOfElement
virtual void endOfElement()=0
Signalize the end of an element.
libebook::FB2XMLParserContext::leaveContext
virtual FB2XMLParserContext * leaveContext() const =0
Destroy this context and return parent.
libebook::FB2XMLParserContext
Definition: FB2XMLParserContext.h:18
libebook::FB2TokenData
Definition: FB2Token.h:135
libebook::FB2XMLParserContext::~FB2XMLParserContext
virtual ~FB2XMLParserContext()=0
Definition: FB2XMLParserContext.cpp:15
libebook::EBOOKHTMLToken::value
Definition: EBOOKHTMLToken.h:263
libebook::FB2XMLParserContext::text
virtual void text(const char *value)=0
Process textual content of an element.
name
string name
Definition: CHMStream.cpp:80
libebook::FB2XMLParserContext::attribute
virtual void attribute(const FB2TokenData &name, const FB2TokenData *ns, const char *value)=0
Process an attribute.
libebook
Definition: CHMParser.cpp:20
libebook::FB2XMLParserContext::element
virtual FB2XMLParserContext * element(const FB2TokenData &name, const FB2TokenData &ns)=0
Create a context for parsing a child element.
libebook::FB2XMLParserContext::startOfElement
virtual void startOfElement()=0
Signalize the start of an element.