ZTXTParser.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 ZTXTPARSER_H_INCLUDED
11 #define ZTXTPARSER_H_INCLUDED
12
13 #include "PDXParser.h"
14
15
16 namespace libebook
17 {
18
19 class ZTXTParser : public PDXParser
20 {
21 public:
22 explicit ZTXTParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document = 0);
23
24 static bool checkType(unsigned type, unsigned creator);
25
26 virtual void readAppInfoRecord(librevenge::RVNGInputStream *record);
27 virtual void readSortInfoRecord(librevenge::RVNGInputStream *record);
28 virtual void readIndexRecord(librevenge::RVNGInputStream *record);
29 virtual void readDataRecord(librevenge::RVNGInputStream *record, bool = true);
30
31 virtual void readDataRecords();
32
33 private:
34 void openDocument();
35 void closeDocument();
36 void handleText(const librevenge::RVNGString &text);
37
38 private:
39 unsigned m_recordCount;
40 unsigned m_size;
41 unsigned m_recordSize;
42 };
43
44 } // namespace libebook
45
46 #endif // ZTXTPARSER_H_INCLUDED
47 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::ZTXTParser::readDataRecord
virtual void readDataRecord(librevenge::RVNGInputStream *record, bool=true)
Definition: ZTXTParser.cpp:55
libebook::ZTXTParser::readSortInfoRecord
virtual void readSortInfoRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:42
libebook::ZTXTParser::closeDocument
void closeDocument()
Definition: ZTXTParser.cpp:94
libebook::ZTXTParser::handleText
void handleText(const librevenge::RVNGString &text)
Definition: ZTXTParser.cpp:100
libebook::EBOOKHTMLToken::text
Definition: EBOOKHTMLToken.h:259
libebook::PDXParser
Definition: PDXParser.h:25
libebook::EBOOKOPFToken::creator
Definition: EBOOKOPFToken.h:52
type
EBOOKDocument::Type type
Definition: EBOOKDocument.cpp:328
PDXParser.h
libebook::ZTXTParser::m_size
unsigned m_size
Definition: ZTXTParser.h:40
libebook::ZTXTParser::readAppInfoRecord
virtual void readAppInfoRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:38
libebook::ZTXTParser
Definition: ZTXTParser.h:19
libebook::ZTXTParser::readIndexRecord
virtual void readIndexRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:46
libebook::ZTXTParser::checkType
static bool checkType(unsigned type, unsigned creator)
Definition: ZTXTParser.cpp:33
document
XMLTreeNodePtr_t document
Definition: EBOOKHTMLParser.cpp:169
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook::ZTXTParser::m_recordSize
unsigned m_recordSize
Definition: ZTXTParser.h:41
libebook
Definition: CHMParser.cpp:20
libebook::ZTXTParser::ZTXTParser
ZTXTParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document=0)
Definition: ZTXTParser.cpp:25
libebook::ZTXTParser::readDataRecords
virtual void readDataRecords()
Definition: ZTXTParser.cpp:74
libebook::ZTXTParser::openDocument
void openDocument()
Definition: ZTXTParser.cpp:83
libebook::ZTXTParser::m_recordCount
unsigned m_recordCount
Definition: ZTXTParser.h:39