FB2BinaryContext.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 FB2BINARYCONTEXT_H_INCLUDED
11 #define FB2BINARYCONTEXT_H_INCLUDED
12
13 #include <string>
14
15 #include "FB2ParserContext.h"
16
17 namespace libebook
18 {
19
20 class FB2BinaryContext : public FB2NodeContextBase
21 {
22 public:
23 FB2BinaryContext(FB2ParserContext *parentContext, FB2Collector *collector);
24
25 private:
26 virtual FB2XMLParserContext *element(const FB2TokenData &name, const FB2TokenData &ns);
27 virtual void endOfElement();
28 virtual void attribute(const FB2TokenData &name, const FB2TokenData *ns, const char *value);
29 virtual void text(const char *text);
30
31 private:
32 std::string m_id;
33 std::string m_contentType;
34 };
35
36 }
37
38 #endif // FB2BINARYCONTEXT_H_INCLUDED
39
40 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::FB2BinaryContext::m_contentType
std::string m_contentType
Definition: FB2BinaryContext.h:33
libebook::FB2NodeContextBase
Base class for non-leaf element contexts.
Definition: FB2ParserContext.h:61
FB2ParserContext.h
libebook::FB2BinaryContext::endOfElement
virtual void endOfElement()
Signalize the end of an element.
Definition: FB2BinaryContext.cpp:32
libebook::FB2Collector
Definition: FB2Collector.h:19
libebook::FB2XMLParserContext
Definition: FB2XMLParserContext.h:18
libebook::FB2TokenData
Definition: FB2Token.h:135
libebook::EBOOKHTMLToken::value
Definition: EBOOKHTMLToken.h:263
libebook::FB2BinaryContext::FB2BinaryContext
FB2BinaryContext(FB2ParserContext *parentContext, FB2Collector *collector)
Definition: FB2BinaryContext.cpp:20
libebook::FB2BinaryContext::element
virtual FB2XMLParserContext * element(const FB2TokenData &name, const FB2TokenData &ns)
Create a context for parsing a child element.
Definition: FB2BinaryContext.cpp:27
libebook::FB2BinaryContext::text
virtual void text(const char *text)
Process textual content of an element.
Definition: FB2BinaryContext.cpp:58
name
string name
Definition: CHMStream.cpp:80
libebook::FB2BinaryContext
Definition: FB2BinaryContext.h:20
libebook::FB2BinaryContext::m_id
std::string m_id
Definition: FB2BinaryContext.h:32
libebook
Definition: CHMParser.cpp:20
libebook::FB2BinaryContext::attribute
virtual void attribute(const FB2TokenData &name, const FB2TokenData *ns, const char *value)
Process an attribute.
Definition: FB2BinaryContext.cpp:36
libebook::FB2ParserContext
Base class for all contexts.
Definition: FB2ParserContext.h:23