FictionBook2XMLParserContext.h Source File documentation

FictionBook2XMLParserContext.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 FICTIONBOOK2XMLPARSERCONTEXT_H_INCLUDED
11#define FICTIONBOOK2XMLPARSERCONTEXT_H_INCLUDED
12
13#include <memory>
14
15namespace libebook
16{
17
18struct FictionBook2TokenData;
19
20 class FictionBook2XMLParserContext
21{
22public:
23 virtual ~FictionBook2XMLParserContext() = 0;
24
32 virtual std::shared_ptr<FictionBook2XMLParserContext> leaveContext() const = 0;
33
38 virtual std::shared_ptr<FictionBook2XMLParserContext> element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) = 0;
39
45 virtual void startOfElement() = 0;
46
49 virtual void endOfElement() = 0;
50
56 virtual void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) = 0;
57
60 virtual void endOfAttributes() = 0;
61
67 virtual void text(const char *value) = 0;
68};
69
70}
71
72#endif // FICTIONBOOK2XMLPARSERCONTEXT_H_INCLUDED
73
74/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::FictionBook2XMLParserContext
Definition FictionBook2XMLParserContext.h:21
libebook::FictionBook2XMLParserContext::endOfAttributes
virtual void endOfAttributes()=0
Signalize the end of attributes.
libebook::FictionBook2XMLParserContext::attribute
virtual void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value)=0
Process an attribute.
libebook::FictionBook2XMLParserContext::element
virtual std::shared_ptr< FictionBook2XMLParserContext > element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns)=0
Create a context for parsing a child element.
libebook::FictionBook2XMLParserContext::startOfElement
virtual void startOfElement()=0
Signalize the start of an element.
libebook::FictionBook2XMLParserContext::~FictionBook2XMLParserContext
virtual ~FictionBook2XMLParserContext()=0
Definition FictionBook2XMLParserContext.cpp:15
libebook::FictionBook2XMLParserContext::text
virtual void text(const char *value)=0
Process textual content of an element.
libebook::FictionBook2XMLParserContext::leaveContext
virtual std::shared_ptr< FictionBook2XMLParserContext > leaveContext() const =0
Destroy this context and return parent.
libebook::FictionBook2XMLParserContext::endOfElement
virtual void endOfElement()=0
Signalize the end of an element.
libebook::EBOOKHTMLToken::value
@ value
Definition EBOOKHTMLToken.h:261
libebook::EBOOKHTMLToken::name
@ name
Definition EBOOKHTMLToken.h:214
libebook
Definition BBeBCollector.cpp:20
libebook::FictionBook2TokenData
Definition FictionBook2Token.h:134