FB2MetadataCollector.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 FB2METADATACOLLECTOR_H_INCLUDED
11 #define FB2METADATACOLLECTOR_H_INCLUDED
12
13 #include "FB2Collector.h"
14
15
16 namespace libebook
17 {
18
19 class FB2MetadataCollector : public FB2Collector
20 {
21 public:
22 FB2MetadataCollector(librevenge::RVNGPropertyList &metadata);
23
24 private:
25 virtual void defineMetadataEntry(const char *name, const char *value);
26 virtual void openMetadataEntry(const char *name);
27 virtual void closeMetadataEntry();
28
29 virtual void defineID(const char *id);
30
31 virtual void openPageSpan();
32 virtual void closePageSpan();
33
34 virtual void openBlock();
35 virtual void closeBlock();
36
37 virtual void openParagraph(const FB2BlockFormat &format);
38 virtual void closeParagraph();
39
40 virtual void openSpan(const FB2Style &style);
41 virtual void closeSpan();
42
43 virtual void insertText(const char *text);
44
45 virtual void openTable(const FB2BlockFormat &format);
46 virtual void closeTable();
47
48 virtual void openTableRow(const FB2BlockFormat &format);
49 virtual void closeTableRow();
50
51 virtual void openTableCell(int rowspan, int colspan);
52 virtual void closeTableCell();
53 virtual void insertCoveredTableCell();
54
55 virtual void insertFootnote(const char *id);
56
57 virtual void insertBitmap(const char *id);
58 virtual void insertBitmapData(const char *contentType, const char *base64Data);
59
60 private:
61 librevenge::RVNGPropertyList &m_metadata;
62 };
63
64 }
65
66 #endif // FB2METADATACOLLECTOR_H_INCLUDED
67
68 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::FB2MetadataCollector::closeBlock
virtual void closeBlock()
Definition: FB2MetadataCollector.cpp:52
libebook::FB2MetadataCollector::defineMetadataEntry
virtual void defineMetadataEntry(const char *name, const char *value)
Definition: FB2MetadataCollector.cpp:22
style
optional< Style > style
Definition: TDParser.cpp:106
libebook::EBOOKHTMLToken::rowspan
Definition: EBOOKHTMLToken.h:244
libebook::FB2MetadataCollector::openSpan
virtual void openSpan(const FB2Style &style)
Definition: FB2MetadataCollector.cpp:64
libebook::FB2MetadataCollector::openTableRow
virtual void openTableRow(const FB2BlockFormat &format)
Definition: FB2MetadataCollector.cpp:85
libebook::FB2Collector
Definition: FB2Collector.h:19
libebook::FB2MetadataCollector::closeMetadataEntry
virtual void closeMetadataEntry()
Definition: FB2MetadataCollector.cpp:32
libebook::FB2MetadataCollector::closeSpan
virtual void closeSpan()
Definition: FB2MetadataCollector.cpp:68
FB2Collector.h
libebook::EBOOKHTMLToken::text
Definition: EBOOKHTMLToken.h:259
libebook::FB2MetadataCollector::FB2MetadataCollector
FB2MetadataCollector(librevenge::RVNGPropertyList &metadata)
Definition: FB2MetadataCollector.cpp:17
libebook::FB2Style
Definition: FB2Style.h:55
libebook::EBOOKHTMLToken::value
Definition: EBOOKHTMLToken.h:263
libebook::FB2MetadataCollector::m_metadata
librevenge::RVNGPropertyList & m_metadata
Definition: FB2MetadataCollector.h:61
libebook::FB2MetadataCollector::openTable
virtual void openTable(const FB2BlockFormat &format)
Definition: FB2MetadataCollector.cpp:77
libebook::FB2MetadataCollector::insertBitmapData
virtual void insertBitmapData(const char *contentType, const char *base64Data)
Definition: FB2MetadataCollector.cpp:113
libebook::FB2MetadataCollector::insertBitmap
virtual void insertBitmap(const char *id)
Definition: FB2MetadataCollector.cpp:109
libebook::EBOOKHTMLToken::colspan
Definition: EBOOKHTMLToken.h:185
libebook::FB2MetadataCollector
Definition: FB2MetadataCollector.h:19
libebook::FB2MetadataCollector::openTableCell
virtual void openTableCell(int rowspan, int colspan)
Definition: FB2MetadataCollector.cpp:93
metadata
RVNGPropertyList metadata
Definition: EBOOKOPFParser.cpp:63
libebook::FB2MetadataCollector::closeTableRow
virtual void closeTableRow()
Definition: FB2MetadataCollector.cpp:89
libebook::FB2MetadataCollector::insertFootnote
virtual void insertFootnote(const char *id)
Definition: FB2MetadataCollector.cpp:105
libebook::FB2MetadataCollector::insertText
virtual void insertText(const char *text)
Definition: FB2MetadataCollector.cpp:72
libebook::FB2MetadataCollector::closeTable
virtual void closeTable()
Definition: FB2MetadataCollector.cpp:81
name
string name
Definition: CHMStream.cpp:80
libebook::EBOOKOPFToken::format
Definition: EBOOKOPFToken.h:56
libebook::FB2MetadataCollector::insertCoveredTableCell
virtual void insertCoveredTableCell()
Definition: FB2MetadataCollector.cpp:101
libebook::FB2MetadataCollector::closeTableCell
virtual void closeTableCell()
Definition: FB2MetadataCollector.cpp:97
libebook::FB2MetadataCollector::openParagraph
virtual void openParagraph(const FB2BlockFormat &format)
Definition: FB2MetadataCollector.cpp:56
libebook::FB2MetadataCollector::closeParagraph
virtual void closeParagraph()
Definition: FB2MetadataCollector.cpp:60
libebook
Definition: CHMParser.cpp:20
libebook::FB2MetadataCollector::closePageSpan
virtual void closePageSpan()
Definition: FB2MetadataCollector.cpp:44
libebook::FB2BlockFormat
Definition: FB2Style.h:35
libebook::FB2MetadataCollector::openBlock
virtual void openBlock()
Definition: FB2MetadataCollector.cpp:48
libebook::FB2MetadataCollector::openMetadataEntry
virtual void openMetadataEntry(const char *name)
Definition: FB2MetadataCollector.cpp:27
libebook::FB2MetadataCollector::defineID
virtual void defineID(const char *id)
Definition: FB2MetadataCollector.cpp:36
libebook::FB2MetadataCollector::openPageSpan
virtual void openPageSpan()
Definition: FB2MetadataCollector.cpp:40