FictionBook2BinaryContext.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 FICTIONBOOK2BINARYCONTEXT_H_INCLUDED
11#define FICTIONBOOK2BINARYCONTEXT_H_INCLUDED
12
13#include <string>
14
15#include "FictionBook2ParserContext.h"
16
17 namespace libebook
18{
19
20 class FictionBook2BinaryContext : public FictionBook2NodeContextBase
21{
22 public:
23 FictionBook2BinaryContext(FictionBook2ParserContext *parentContext, FictionBook2Collector *collector);
24
25 private:
26 FictionBook2XMLParserContext *element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override;
27 void endOfElement() override;
28 void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
29 void text(const char *text) override;
30
31 private:
32 std::string m_id;
33 std::string m_contentType;
34};
35
36}
37
38#endif // FICTIONBOOK2BINARYCONTEXT_H_INCLUDED
39
40/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
FictionBook2ParserContext.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::FictionBook2BinaryContext
Definition FictionBook2BinaryContext.h:21
libebook::FictionBook2BinaryContext::m_contentType
std::string m_contentType
Definition FictionBook2BinaryContext.h:33
libebook::FictionBook2BinaryContext::element
FictionBook2XMLParserContext * element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
Create a context for parsing a child element.
Definition FictionBook2BinaryContext.cpp:26
libebook::FictionBook2BinaryContext::m_id
std::string m_id
Definition FictionBook2BinaryContext.h:32
libebook::FictionBook2BinaryContext::attribute
void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override
Process an attribute.
Definition FictionBook2BinaryContext.cpp:35
libebook::FictionBook2BinaryContext::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition FictionBook2BinaryContext.cpp:31
libebook::FictionBook2Collector
Definition FictionBook2Collector.h:23
libebook::FictionBook2NodeContextBase
Base class for non-leaf element contexts.
Definition FictionBook2ParserContext.h:62
libebook::FictionBook2ParserContext
Base class for all contexts.
Definition FictionBook2ParserContext.h:24
libebook::FictionBook2XMLParserContext
Definition FictionBook2XMLParserContext.h:19
libebook
Definition BBeBCollector.cpp:19
libebook::FictionBook2TokenData
Definition FictionBook2Token.h:134