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
17namespace libebook
18{
19
20 class FictionBook2BinaryContext : public FictionBook2NodeContextBase
21{
22public:
23 FictionBook2BinaryContext(std::shared_ptr<FictionBook2ParserContext> parentContext, FictionBook2Collector *collector);
24
25private:
26 std::shared_ptr<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
31private:
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
libebook::FictionBook2BinaryContext::m_contentType
std::string m_contentType
Definition FictionBook2BinaryContext.h:33
libebook::FictionBook2BinaryContext::FictionBook2BinaryContext
FictionBook2BinaryContext(std::shared_ptr< FictionBook2ParserContext > parentContext, FictionBook2Collector *collector)
Definition FictionBook2BinaryContext.cpp:19
libebook::FictionBook2BinaryContext::text
void text(const char *text) override
Process textual content of an element.
Definition FictionBook2BinaryContext.cpp:57
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::FictionBook2BinaryContext::element
std::shared_ptr< FictionBook2XMLParserContext > element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
Create a context for parsing a child element.
Definition FictionBook2BinaryContext.cpp:26
libebook::FictionBook2Collector
Definition FictionBook2Collector.h:23
libebook::FictionBook2NodeContextBase::FictionBook2NodeContextBase
FictionBook2NodeContextBase(std::shared_ptr< FictionBook2ParserContext > parentContext, FictionBook2Collector *collector=nullptr)
Definition FictionBook2ParserContext.cpp:43
libebook::EBOOKHTMLToken::value
@ value
Definition EBOOKHTMLToken.h:261
libebook::EBOOKHTMLToken::name
@ name
Definition EBOOKHTMLToken.h:214
libebook::EBOOKHTMLToken::text
@ text
Definition EBOOKHTMLToken.h:257
libebook
Definition BBeBCollector.cpp:20
libebook::FictionBook2TokenData
Definition FictionBook2Token.h:134