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: */
Definition: EBOOKHTMLToken.h:91
virtual void readDataRecord(librevenge::RVNGInputStream *record, bool=true)
Definition: ZTXTParser.cpp:55
virtual void readSortInfoRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:42
void closeDocument()
Definition: ZTXTParser.cpp:94
void handleText(const librevenge::RVNGString &text)
Definition: ZTXTParser.cpp:100
Definition: EBOOKOPFToken.h:52
Definition: PDXParser.h:25
EBOOKDocument::Type type
Definition: EBOOKDocument.cpp:328
Definition: EBOOKHTMLToken.h:259
unsigned m_size
Definition: ZTXTParser.h:40
virtual void readAppInfoRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:38
Definition: ZTXTParser.h:19
virtual void readIndexRecord(librevenge::RVNGInputStream *record)
Definition: ZTXTParser.cpp:46
static bool checkType(unsigned type, unsigned creator)
Definition: ZTXTParser.cpp:33
XMLTreeNodePtr_t document
Definition: EBOOKHTMLParser.cpp:169
unsigned m_recordSize
Definition: ZTXTParser.h:41
Definition: CHMParser.cpp:20
ZTXTParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *document=0)
Definition: ZTXTParser.cpp:25
virtual void readDataRecords()
Definition: ZTXTParser.cpp:74
void openDocument()
Definition: ZTXTParser.cpp:83
unsigned m_recordCount
Definition: ZTXTParser.h:39

Generated for libe-book by doxygen 1.8.8