FictionBook2BinaryContext.h Source File documentation

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: */
libebook::FictionBook2Token::id
@ id
Definition: FictionBook2Token.h:59
libebook::FictionBook2BinaryContext::m_id
std::string m_id
Definition: FictionBook2BinaryContext.h:32
libebook::FictionBook2Token::content_type
@ content_type
Definition: FictionBook2Token.h:105
libebook::FictionBook2Token::image_jpg
@ image_jpg
Definition: FictionBook2Token.h:122
FictionBook2Token.h
libebook
Definition: BBeBCollector.cpp:19
libebook::FictionBook2Collector::defineID
virtual void defineID(const char *id)=0
value
qi::rule< Iterator, AttrValue_t, qi::space_type > value
Definition: TealDocParser.cpp:231
libebook::FictionBook2BinaryContext::FictionBook2BinaryContext
FictionBook2BinaryContext(FictionBook2ParserContext *parentContext, FictionBook2Collector *collector)
Definition: FictionBook2BinaryContext.cpp:19
libebook::FictionBook2BinaryContext::element
FictionBook2XMLParserContext * element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
Create a context for parsing a child element.
Definition: FictionBook2BinaryContext.cpp:26
FictionBook2ParserContext.h
libebook::FictionBook2BinaryContext::endOfElement
void endOfElement() override
Signalize the end of an element.
Definition: FictionBook2BinaryContext.cpp:31
libebook::FictionBook2ParserContext::getCollector
FictionBook2Collector * getCollector() const
Get the collector.
Definition: FictionBook2ParserContext.cpp:31
FictionBook2_NO_NAMESPACE
#define FictionBook2_NO_NAMESPACE(ns)
Definition: FictionBook2Token.h:18
libebook::FictionBook2BinaryContext::m_contentType
std::string m_contentType
Definition: FictionBook2BinaryContext.h:33
libebook::FictionBook2Collector::insertBitmapData
virtual void insertBitmapData(const char *contentType, const char *base64Data)=0
libebook::FictionBook2NodeContextBase
Base class for non-leaf element contexts.
Definition: FictionBook2ParserContext.h:62
libebook::FictionBook2BinaryContext
Definition: FictionBook2BinaryContext.h:21
libebook::FictionBook2XMLParserContext
Definition: FictionBook2XMLParserContext.h:19
libebook::FictionBook2Collector
Definition: FictionBook2Collector.h:23
libebook::FictionBook2ParserContext
Base class for all contexts.
Definition: FictionBook2ParserContext.h:24
libebook::getFictionBook2TokenID
int getFictionBook2TokenID(const FictionBook2TokenData &token)
Definition: FictionBook2Token.cpp:50
FictionBook2Collector.h
name
string name
Definition: HTMLHelpStream.cpp:80
FictionBook2BinaryContext.h
libebook::FictionBook2BinaryContext::text
void text(const char *text) override
Process textual content of an element.
Definition: FictionBook2BinaryContext.cpp:57
libebook::FictionBook2TokenData
Definition: FictionBook2Token.h:134
libebook::FictionBook2BinaryContext::attribute
void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override
Process an attribute.
Definition: FictionBook2BinaryContext.cpp:35