FB2ContentCollector.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 FB2CONTENTCOLLECTOR_H_INCLUDED
11 #define FB2CONTENTCOLLECTOR_H_INCLUDED
12
13 #include "FB2Collector.h"
14
15
16 namespace libebook
17 {
18
19 class FB2ContentMap;
20
21 class FB2ContentCollector : public FB2Collector
22 {
23 // no copying
24 FB2ContentCollector(const FB2ContentCollector &other);
25 FB2ContentCollector &operator=(const FB2ContentCollector &other);
26
27 public:
28 FB2ContentCollector(librevenge::RVNGTextInterface *m_document, const librevenge::RVNGPropertyList &metadata, const FB2ContentMap &notes, const FB2ContentMap &bitmaps);
29
30 private:
31 virtual void defineMetadataEntry(const char *name, const char *value);
32 virtual void openMetadataEntry(const char *name);
33 virtual void closeMetadataEntry();
34
35 virtual void defineID(const char *id);
36
37 virtual void openPageSpan();
38 virtual void closePageSpan();
39
40 virtual void openBlock();
41 virtual void closeBlock();
42
43 virtual void openParagraph(const FB2BlockFormat &format);
44 virtual void closeParagraph();
45
46 virtual void openSpan(const FB2Style &style);
47 virtual void closeSpan();
48
49 virtual void insertText(const char *text);
50
51 virtual void openTable(const FB2BlockFormat &format);
52 virtual void closeTable();
53
54 virtual void openTableRow(const FB2BlockFormat &format);
55 virtual void closeTableRow();
56
57 virtual void openTableCell(int rowspan, int colspan);
58 virtual void closeTableCell();
59 virtual void insertCoveredTableCell();
60
61 virtual void insertFootnote(const char *id);
62
63 virtual void insertBitmap(const char *id);
64 virtual void insertBitmapData(const char *contentType, const char *base64Data);
65
66 private:
67 librevenge::RVNGTextInterface *m_document;
68 const librevenge::RVNGPropertyList &m_metadata;
69 const FB2ContentMap &m_notes;
70 const FB2ContentMap &m_bitmaps;
71 int m_currentFootnote;
72 int m_openPara;
73 };
74
75 }
76
77 #endif // FB2CONTENTCOLLECTOR_H_INCLUDED
78
79 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::FB2ContentCollector::openParagraph
virtual void openParagraph(const FB2BlockFormat &format)
Definition: FB2ContentCollector.cpp:116
libebook::FB2ContentCollector::openBlock
virtual void openBlock()
Definition: FB2ContentCollector.cpp:108
style
optional< Style > style
Definition: TDParser.cpp:106
libebook::FB2ContentCollector::openSpan
virtual void openSpan(const FB2Style &style)
Definition: FB2ContentCollector.cpp:137
libebook::FB2ContentCollector::m_document
librevenge::RVNGTextInterface * m_document
Definition: FB2ContentCollector.h:67
libebook::EBOOKHTMLToken::rowspan
Definition: EBOOKHTMLToken.h:244
libebook::FB2ContentCollector::closePageSpan
virtual void closePageSpan()
Definition: FB2ContentCollector.cpp:103
libebook::FB2ContentCollector::openTableRow
virtual void openTableRow(const FB2BlockFormat &format)
Definition: FB2ContentCollector.cpp:182
libebook::FB2ContentCollector
Definition: FB2ContentCollector.h:21
libebook::FB2ContentCollector::m_notes
const FB2ContentMap & m_notes
Definition: FB2ContentCollector.h:69
libebook::FB2Collector
Definition: FB2Collector.h:19
libebook::FB2ContentCollector::insertBitmapData
virtual void insertBitmapData(const char *contentType, const char *base64Data)
Definition: FB2ContentCollector.cpp:261
libebook::FB2ContentCollector::m_currentFootnote
int m_currentFootnote
Definition: FB2ContentCollector.h:71
FB2Collector.h
libebook::EBOOKHTMLToken::text
Definition: EBOOKHTMLToken.h:259
libebook::FB2Style
Definition: FB2Style.h:55
libebook::EBOOKHTMLToken::value
Definition: EBOOKHTMLToken.h:263
libebook::FB2ContentCollector::closeSpan
virtual void closeSpan()
Definition: FB2ContentCollector.cpp:162
libebook::EBOOKHTMLToken::colspan
Definition: EBOOKHTMLToken.h:185
libebook::FB2ContentMap
Definition: FB2ContentMap.h:21
libebook::FB2ContentCollector::defineMetadataEntry
virtual void defineMetadataEntry(const char *name, const char *value)
Definition: FB2ContentCollector.cpp:82
libebook::FB2ContentCollector::closeTableCell
virtual void closeTableCell()
Definition: FB2ContentCollector.cpp:207
libebook::FB2ContentCollector::m_metadata
const librevenge::RVNGPropertyList & m_metadata
Definition: FB2ContentCollector.h:68
libebook::FB2ContentCollector::closeTableRow
virtual void closeTableRow()
Definition: FB2ContentCollector.cpp:191
libebook::FB2ContentCollector::closeTable
virtual void closeTable()
Definition: FB2ContentCollector.cpp:177
metadata
RVNGPropertyList metadata
Definition: EBOOKOPFParser.cpp:63
name
string name
Definition: CHMStream.cpp:80
libebook::FB2ContentCollector::closeBlock
virtual void closeBlock()
Definition: FB2ContentCollector.cpp:112
libebook::FB2ContentCollector::openTableCell
virtual void openTableCell(int rowspan, int colspan)
Definition: FB2ContentCollector.cpp:196
libebook::FB2ContentCollector::defineID
virtual void defineID(const char *id)
Definition: FB2ContentCollector.cpp:94
libebook::EBOOKOPFToken::format
Definition: EBOOKOPFToken.h:56
libebook::FB2ContentCollector::closeParagraph
virtual void closeParagraph()
Definition: FB2ContentCollector.cpp:131
libebook::FB2ContentCollector::insertCoveredTableCell
virtual void insertCoveredTableCell()
Definition: FB2ContentCollector.cpp:212
libebook::FB2ContentCollector::FB2ContentCollector
FB2ContentCollector(const FB2ContentCollector &other)
libebook
Definition: CHMParser.cpp:20
libebook::FB2ContentCollector::operator=
FB2ContentCollector & operator=(const FB2ContentCollector &other)
libebook::FB2ContentCollector::closeMetadataEntry
virtual void closeMetadataEntry()
Definition: FB2ContentCollector.cpp:90
libebook::FB2ContentCollector::openMetadataEntry
virtual void openMetadataEntry(const char *name)
Definition: FB2ContentCollector.cpp:86
libebook::FB2BlockFormat
Definition: FB2Style.h:35
libebook::FB2ContentCollector::openPageSpan
virtual void openPageSpan()
Definition: FB2ContentCollector.cpp:98
libebook::FB2ContentCollector::m_bitmaps
const FB2ContentMap & m_bitmaps
Definition: FB2ContentCollector.h:70
libebook::FB2ContentCollector::m_openPara
int m_openPara
Definition: FB2ContentCollector.h:72
libebook::FB2ContentCollector::insertText
virtual void insertText(const char *text)
Definition: FB2ContentCollector.cpp:167
libebook::FB2ContentCollector::insertFootnote
virtual void insertFootnote(const char *id)
Definition: FB2ContentCollector.cpp:217
libebook::FB2ContentCollector::insertBitmap
virtual void insertBitmap(const char *id)
Definition: FB2ContentCollector.cpp:232
libebook::FB2ContentCollector::openTable
virtual void openTable(const FB2BlockFormat &format)
Definition: FB2ContentCollector.cpp:172