VDXParser.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 libvisio 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 __VDXPARSER_H__
11#define __VDXPARSER_H__
12
13#include <librevenge/librevenge.h>
14#include "VSDXMLParserBase.h"
15
16 namespace libvisio
17{
18
19 class VSDCollector;
20
21 class VDXParser : public VSDXMLParserBase
22{
23 using VSDXMLParserBase::readExtendedColourData;
24 using VSDXMLParserBase::readDoubleData;
25 using VSDXMLParserBase::readBoolData;
26 using VSDXMLParserBase::readLongData;
27 using VSDXMLParserBase::readStringData;
28
29 public:
30 explicit VDXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
31 ~VDXParser() override;
32 bool parseMain() override;
33 bool extractStencils() override;
34
35 private:
36 VDXParser();
37 VDXParser(const VDXParser &);
38 VDXParser &operator=(const VDXParser &);
39
40 // Helper functions
41
42 xmlChar *readStringData(xmlTextReaderPtr reader) override;
43
44 int getElementToken(xmlTextReaderPtr reader) override;
45 int getElementDepth(xmlTextReaderPtr reader) override;
46
47 // Functions to read the DatadiagramML document structure
48
49 bool processXmlDocument(librevenge::RVNGInputStream *input);
50 void processXmlNode(xmlTextReaderPtr reader);
51
52 // Functions reading the DiagramML document content
53
54 void readLine(xmlTextReaderPtr reader);
55 void readFillAndShadow(xmlTextReaderPtr reader);
56 void readXFormData(xmlTextReaderPtr reader);
57 void readMisc(xmlTextReaderPtr reader);
58 void readTxtXForm(xmlTextReaderPtr reader);
59 void readXForm1D(xmlTextReaderPtr reader);
60 void readPageProps(xmlTextReaderPtr reader);
61 void readFonts(xmlTextReaderPtr reader);
62 void readTextBlock(xmlTextReaderPtr reader);
63 void readForeignInfo(xmlTextReaderPtr reader);
64 void readLayerMem(xmlTextReaderPtr reader);
65 void readTabs(xmlTextReaderPtr reader);
66 void readTab(xmlTextReaderPtr reader);
67
68 void getBinaryData(xmlTextReaderPtr reader) override;
69
70 // Private data
71
72 librevenge::RVNGInputStream *m_input;
73 librevenge::RVNGDrawingInterface *m_painter;
74};
75
76} // namespace libvisio
77
78#endif // __VDXPARSER_H__
79/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDXMLParserBase.h
libvisio::VDXParser
Definition VDXParser.h:22
libvisio::VDXParser::readPageProps
void readPageProps(xmlTextReaderPtr reader)
Definition VDXParser.cpp:729
libvisio::VDXParser::processXmlDocument
bool processXmlDocument(librevenge::RVNGInputStream *input)
Definition VDXParser.cpp:73
libvisio::VDXParser::processXmlNode
void processXmlNode(xmlTextReaderPtr reader)
Definition VDXParser.cpp:92
libvisio::VDXParser::readXFormData
void readXFormData(xmlTextReaderPtr reader)
Definition VDXParser.cpp:509
libvisio::VDXParser::readLine
void readLine(xmlTextReaderPtr reader)
Definition VDXParser.cpp:313
libvisio::VDXParser::readTextBlock
void readTextBlock(xmlTextReaderPtr reader)
Definition VDXParser.cpp:825
libvisio::VDXParser::VDXParser
VDXParser(const VDXParser &)
libvisio::VDXParser::getElementDepth
int getElementDepth(xmlTextReaderPtr reader) override
Definition VDXParser.cpp:928
libvisio::VDXParser::readFillAndShadow
void readFillAndShadow(xmlTextReaderPtr reader)
Definition VDXParser.cpp:378
libvisio::VDXParser::readTab
void readTab(xmlTextReaderPtr reader)
Definition VDXParser.cpp:1035
libvisio::VDXParser::m_painter
librevenge::RVNGDrawingInterface * m_painter
Definition VDXParser.h:73
libvisio::VDXParser::readFonts
void readFonts(xmlTextReaderPtr reader)
Definition VDXParser.cpp:795
libvisio::VDXParser::m_input
librevenge::RVNGInputStream * m_input
Definition VDXParser.h:72
libvisio::VDXParser::readForeignInfo
void readForeignInfo(xmlTextReaderPtr reader)
Definition VDXParser.cpp:949
libvisio::VDXParser::getElementToken
int getElementToken(xmlTextReaderPtr reader) override
Definition VDXParser.cpp:923
libvisio::VDXParser::readTxtXForm
void readTxtXForm(xmlTextReaderPtr reader)
Definition VDXParser.cpp:595
libvisio::VDXParser::operator=
VDXParser & operator=(const VDXParser &)
libvisio::VDXParser::readLayerMem
void readLayerMem(xmlTextReaderPtr reader)
Definition VDXParser.cpp:568
libvisio::VDXParser::VDXParser
VDXParser()
libvisio::VDXParser::readXForm1D
void readXForm1D(xmlTextReaderPtr reader)
Definition VDXParser.cpp:674
libvisio::VDXParser::getBinaryData
void getBinaryData(xmlTextReaderPtr reader) override
Definition VDXParser.cpp:933
libvisio::VDXParser::readMisc
void readMisc(xmlTextReaderPtr reader)
Definition VDXParser.cpp:466
libvisio::VDXParser::extractStencils
bool extractStencils() override
Definition VDXParser.cpp:67
libvisio::VDXParser::parseMain
bool parseMain() override
Definition VDXParser.cpp:34
libvisio::VDXParser::readTabs
void readTabs(xmlTextReaderPtr reader)
Definition VDXParser.cpp:1004
libvisio::VDXParser::~VDXParser
~VDXParser() override
Definition VDXParser.cpp:30
libvisio::VDXParser::readStringData
xmlChar * readStringData(xmlTextReaderPtr reader) override
Definition VDXParser.cpp:907
libvisio::VSDXMLParserBase
Definition VSDXMLParserBase.h:31
libvisio::VSDXMLParserBase::readStringData
int readStringData(VSDName &text, xmlTextReaderPtr reader)
Definition VSDXMLParserBase.cpp:2074
libvisio::VSDXMLParserBase::readDoubleData
int readDoubleData(boost::optional< double > &value, xmlTextReaderPtr reader)
Definition VSDXMLParserBase.cpp:2090
libvisio::VSDXMLParserBase::readBoolData
int readBoolData(boost::optional< bool > &value, xmlTextReaderPtr reader)
Definition VSDXMLParserBase.cpp:2142
libvisio::VSDXMLParserBase::readExtendedColourData
int readExtendedColourData(Colour &value, long &idx, xmlTextReaderPtr reader)
Definition VSDXMLParserBase.cpp:2181
libvisio::VSDXMLParserBase::readLongData
int readLongData(boost::optional< long > &value, xmlTextReaderPtr reader)
Definition VSDXMLParserBase.cpp:2116
libvisio
Definition libvisio_utils.h:49