ZTXTParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libe-book
3  * Version: MPL 2.0 / LGPLv2.1+
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  * Alternatively, the contents of this file may be used under the terms
10  * of the GNU Lesser General Public License Version 2.1 or later
11  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
12  * applicable instead of those above.
13  *
14  * For further information visit http://libebook.sourceforge.net
15  */
16 
17 #ifndef ZTXTPARSER_H_INCLUDED
18 #define ZTXTPARSER_H_INCLUDED
19 
20 #include "PDXParser.h"
21 
22 class WPXDocumentInterface;
23 class WPXInputStream;
24 class WPXString;
25 
26 namespace libebook
27 {
28 
29 class ZTXTParser : public PDXParser
30 {
31 public:
32  explicit ZTXTParser(WPXInputStream *input, WPXDocumentInterface *document = 0);
33 
34  virtual bool isFormatSupported(unsigned type, unsigned creator);
35 
36  virtual void readAppInfoRecord(WPXInputStream *record);
37  virtual void readSortInfoRecord(WPXInputStream *record);
38  virtual void readIndexRecord(WPXInputStream *record);
39  virtual void readDataRecord(WPXInputStream *record, bool = true);
40 
41  virtual void readDataRecords();
42 
43 private:
44  void openDocument();
45  void closeDocument();
46  void handleText(const WPXString &text);
47 
48 private:
49  unsigned m_recordCount;
50  unsigned m_size;
51  unsigned m_recordSize;
52 };
53 
54 } // namespace libebook
55 
56 #endif // ZTXTPARSER_H_INCLUDED
57 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
virtual void readDataRecord(WPXInputStream *record, bool=true)
Definition: ZTXTParser.cpp:64
void closeDocument()
Definition: ZTXTParser.cpp:102
Definition: PDXParser.h:32
unsigned m_size
Definition: ZTXTParser.h:50
virtual void readIndexRecord(WPXInputStream *record)
Definition: ZTXTParser.cpp:55
virtual void readAppInfoRecord(WPXInputStream *record)
Definition: ZTXTParser.cpp:47
Definition: ZTXTParser.h:29
Definition: FB2Token.h:124
unsigned m_recordSize
Definition: ZTXTParser.h:51
ZTXTParser(WPXInputStream *input, WPXDocumentInterface *document=0)
Definition: ZTXTParser.cpp:34
virtual void readSortInfoRecord(WPXInputStream *record)
Definition: ZTXTParser.cpp:51
virtual bool isFormatSupported(unsigned type, unsigned creator)
Check whether a specific subformat is supported.
Definition: ZTXTParser.cpp:42
virtual void readDataRecords()
Definition: ZTXTParser.cpp:83
void openDocument()
Definition: ZTXTParser.cpp:92
void handleText(const WPXString &text)
Definition: ZTXTParser.cpp:108
unsigned m_recordCount
Definition: ZTXTParser.h:49

Generated for libe-book by doxygen 1.8.5