ABWParser.h Source File documentation

ABWParser.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 libabw 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 __ABWPARSER_H__
11#define __ABWPARSER_H__
12
13#include <memory>
14
15#include <librevenge/librevenge.h>
16#include "ABWXMLHelper.h"
17
18namespace libabw
19{
20
21class ABWCollector;
22struct ABWParserState;
23
24 class ABWParser
25{
26public:
27 explicit ABWParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *iface);
28 virtual ~ABWParser();
29 bool parse();
30
31private:
32 ABWParser();
33 ABWParser(const ABWParser &);
34 ABWParser &operator=(const ABWParser &);
35
36 // Helper functions
37
38 int getElementToken(xmlTextReaderPtr reader);
39
40 // Functions to read the AWML document structure
41
42 bool processXmlDocument(librevenge::RVNGInputStream *input);
43 int processXmlNode(xmlTextReaderPtr reader);
44
45 void readAbiword(xmlTextReaderPtr reader);
46 void readM(xmlTextReaderPtr reader);
47 int readHistory(xmlTextReaderPtr reader);
48 int readRevisions(xmlTextReaderPtr reader);
49 int readIgnoredWords(xmlTextReaderPtr reader);
50 void readPageSize(xmlTextReaderPtr reader);
51 void readSection(xmlTextReaderPtr reader);
52 void readA(xmlTextReaderPtr reader);
53 void readC(xmlTextReaderPtr reader);
54 int readD(xmlTextReaderPtr reader);
55 void readL(xmlTextReaderPtr reader);
56 void readP(xmlTextReaderPtr reader);
57 void readS(xmlTextReaderPtr reader);
58 void readEndnote(xmlTextReaderPtr reader);
59 void readFoot(xmlTextReaderPtr reader);
60 void readField(xmlTextReaderPtr reader);
61 void readImage(xmlTextReaderPtr reader);
62
63 void readTable(xmlTextReaderPtr reader);
64 void readCell(xmlTextReaderPtr reader);
65
66 void readFrame(xmlTextReaderPtr reader);
67 void readCloseFrame();
68
69 librevenge::RVNGInputStream *m_input;
70 librevenge::RVNGTextInterface *m_iface;
71 std::unique_ptr<ABWCollector> m_collector;
72 std::unique_ptr<ABWParserState> m_state;
73};
74
75} // namespace libabw
76
77#endif // __ABWPARSER_H__
78/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
ABWXMLHelper.h
libabw::ABWParser
Definition ABWParser.h:25
libabw::ABWParser::readL
void readL(xmlTextReaderPtr reader)
Definition ABWParser.cpp:694
libabw::ABWParser::readRevisions
int readRevisions(xmlTextReaderPtr reader)
Definition ABWParser.cpp:421
libabw::ABWParser::readM
void readM(xmlTextReaderPtr reader)
Definition ABWParser.cpp:390
libabw::ABWParser::m_state
std::unique_ptr< ABWParserState > m_state
Definition ABWParser.h:72
libabw::ABWParser::readCell
void readCell(xmlTextReaderPtr reader)
Definition ABWParser.cpp:643
libabw::ABWParser::parse
bool parse()
Definition ABWParser.cpp:140
libabw::ABWParser::operator=
ABWParser & operator=(const ABWParser &)
libabw::ABWParser::readFrame
void readFrame(xmlTextReaderPtr reader)
Definition ABWParser.cpp:658
libabw::ABWParser::readTable
void readTable(xmlTextReaderPtr reader)
Definition ABWParser.cpp:636
libabw::ABWParser::readFoot
void readFoot(xmlTextReaderPtr reader)
Definition ABWParser.cpp:629
libabw::ABWParser::readCloseFrame
void readCloseFrame()
Definition ABWParser.cpp:674
libabw::ABWParser::readPageSize
void readPageSize(xmlTextReaderPtr reader)
Definition ABWParser.cpp:470
libabw::ABWParser::ABWParser
ABWParser(const ABWParser &)
libabw::ABWParser::m_collector
std::unique_ptr< ABWCollector > m_collector
Definition ABWParser.h:71
libabw::ABWParser::readA
void readA(xmlTextReaderPtr reader)
Definition ABWParser.cpp:584
libabw::ABWParser::~ABWParser
virtual ~ABWParser()
Definition ABWParser.cpp:136
libabw::ABWParser::readEndnote
void readEndnote(xmlTextReaderPtr reader)
Definition ABWParser.cpp:612
libabw::ABWParser::m_iface
librevenge::RVNGTextInterface * m_iface
Definition ABWParser.h:70
libabw::ABWParser::processXmlDocument
bool processXmlDocument(librevenge::RVNGInputStream *input)
Definition ABWParser.cpp:164
libabw::ABWParser::readSection
void readSection(xmlTextReaderPtr reader)
Definition ABWParser.cpp:480
libabw::ABWParser::readC
void readC(xmlTextReaderPtr reader)
Definition ABWParser.cpp:603
libabw::ABWParser::readImage
void readImage(xmlTextReaderPtr reader)
Definition ABWParser.cpp:650
libabw::ABWParser::readIgnoredWords
int readIgnoredWords(xmlTextReaderPtr reader)
Definition ABWParser.cpp:446
libabw::ABWParser::readD
int readD(xmlTextReaderPtr reader)
Definition ABWParser.cpp:510
libabw::ABWParser::m_input
librevenge::RVNGInputStream * m_input
Definition ABWParser.h:69
libabw::ABWParser::readS
void readS(xmlTextReaderPtr reader)
Definition ABWParser.cpp:560
libabw::ABWParser::readHistory
int readHistory(xmlTextReaderPtr reader)
Definition ABWParser.cpp:397
libabw::ABWParser::ABWParser
ABWParser()
libabw::ABWParser::getElementToken
int getElementToken(xmlTextReaderPtr reader)
Definition ABWParser.cpp:378
libabw::ABWParser::readP
void readP(xmlTextReaderPtr reader)
Definition ABWParser.cpp:591
libabw::ABWParser::readAbiword
void readAbiword(xmlTextReaderPtr reader)
Definition ABWParser.cpp:383
libabw::ABWParser::readField
void readField(xmlTextReaderPtr reader)
Definition ABWParser.cpp:619
libabw::ABWParser::processXmlNode
int processXmlNode(xmlTextReaderPtr reader)
Definition ABWParser.cpp:186
libabw
Definition AbiDocument.cpp:17