EBOOKXMLContextBase.h Source File documentation

EBOOKXMLContextBase.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 EBOOKXMLCONTEXTBASE_H_INCLUDED
11#define EBOOKXMLCONTEXTBASE_H_INCLUDED
12
13#include "EBOOKXMLContext.h"
14
15namespace libebook
16{
17
18 class EBOOKXMLElementContextBase : public EBOOKXMLContext
19{
20protected:
21 void startOfElement() override;
22 void attribute(int name, const char *value) override;
23 void endOfAttributes() override;
24 void text(const char *value) override;
25 void endOfElement() override;
26};
27
28 class EBOOKXMLTextContextBase : public EBOOKXMLContext
29{
30protected:
31 void startOfElement() override;
32 void attribute(int name, const char *value) override;
33 void endOfAttributes() override;
34 std::shared_ptr<EBOOKXMLContext> element(int name) override;
35 void endOfElement() override;
36};
37
38 class EBOOKXMLMixedContextBase : public EBOOKXMLContext
39{
40protected:
41 void startOfElement() override;
42 void attribute(int name, const char *value) override;
43 void endOfAttributes() override;
44 void endOfElement() override;
45};
46
47 class EBOOKXMLEmptyContextBase : public EBOOKXMLContext
48{
49protected:
50 void startOfElement() override;
51 void endOfAttributes() override;
52 std::shared_ptr<EBOOKXMLContext> element(int name) override;
53 void text(const char *value) override;
54 void endOfElement() override;
55};
56
57}
58
59#endif // EBOOKXMLCONTEXTBASE_H_INCLUDED
60
61/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
EBOOKXMLContext.h
name
string name
Definition: HTMLHelpStream.cpp:80
value
qi::rule< Iterator, AttrValue_t, qi::space_type > value
Definition: TealDocParser.cpp:231
text
qi::rule< Iterator, AttrValue_t, qi::space_type > text
Definition: TealDocParser.cpp:232
libebook::EBOOKXMLContext
Definition: EBOOKXMLContext.h:19
libebook::EBOOKXMLElementContextBase
Definition: EBOOKXMLContextBase.h:19
libebook::EBOOKXMLElementContextBase::attribute
void attribute(int name, const char *value) override
Process an attribute.
Definition: EBOOKXMLContextBase.cpp:19
libebook::EBOOKXMLElementContextBase::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: EBOOKXMLContextBase.cpp:32
libebook::EBOOKXMLElementContextBase::endOfAttributes
void endOfAttributes() override
Signalize the end of attributes.
Definition: EBOOKXMLContextBase.cpp:23
libebook::EBOOKXMLElementContextBase::startOfElement
void startOfElement() override
Signalize the start of an element.
libebook::EBOOKXMLEmptyContextBase
Definition: EBOOKXMLContextBase.h:48
libebook::EBOOKXMLEmptyContextBase::endOfAttributes
void endOfAttributes() override
Signalize the end of attributes.
Definition: EBOOKXMLContextBase.cpp:78
libebook::EBOOKXMLEmptyContextBase::element
std::shared_ptr< EBOOKXMLContext > element(int name) override
Create a context for parsing a child element.
Definition: EBOOKXMLContextBase.cpp:82
libebook::EBOOKXMLEmptyContextBase::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: EBOOKXMLContextBase.cpp:93
libebook::EBOOKXMLEmptyContextBase::startOfElement
void startOfElement() override
Signalize the start of an element.
Definition: EBOOKXMLContextBase.cpp:74
libebook::EBOOKXMLMixedContextBase
Definition: EBOOKXMLContextBase.h:39
libebook::EBOOKXMLMixedContextBase::endOfAttributes
void endOfAttributes() override
Signalize the end of attributes.
Definition: EBOOKXMLContextBase.cpp:66
libebook::EBOOKXMLMixedContextBase::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: EBOOKXMLContextBase.cpp:70
libebook::EBOOKXMLMixedContextBase::attribute
void attribute(int name, const char *value) override
Process an attribute.
Definition: EBOOKXMLContextBase.cpp:62
libebook::EBOOKXMLMixedContextBase::startOfElement
void startOfElement() override
Signalize the start of an element.
Definition: EBOOKXMLContextBase.cpp:58
libebook::EBOOKXMLTextContextBase
Definition: EBOOKXMLContextBase.h:29
libebook::EBOOKXMLTextContextBase::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: EBOOKXMLContextBase.cpp:54
libebook::EBOOKXMLTextContextBase::endOfAttributes
void endOfAttributes() override
Signalize the end of attributes.
Definition: EBOOKXMLContextBase.cpp:44
libebook::EBOOKXMLTextContextBase::element
std::shared_ptr< EBOOKXMLContext > element(int name) override
Create a context for parsing a child element.
Definition: EBOOKXMLContextBase.cpp:48
libebook::EBOOKXMLTextContextBase::attribute
void attribute(int name, const char *value) override
Process an attribute.
Definition: EBOOKXMLContextBase.cpp:40
libebook::EBOOKXMLTextContextBase::startOfElement
void startOfElement() override
Signalize the start of an element.
Definition: EBOOKXMLContextBase.cpp:36
libebook
Definition: BBeBCollector.cpp:19