WPGXParser.h Source File documentation

WPGXParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpg
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 * Major Contributor(s):
10 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
11 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
12 * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 *
21 * For further information visit http://libwpg.sourceforge.net
22 */
23
24 /* "This product is not manufactured, approved, or supported by
25 * Corel Corporation or Corel Corporation Limited."
26 */
27
28 #ifndef __WPGXPARSER_H__
29 #define __WPGXPARSER_H__
30
31 #include <map>
32
33 #include <librevenge/librevenge.h>
34
35 #include <librevenge-stream/librevenge-stream.h>
36
37 #include "WPGColor.h"
38
39 class WPGXParser
40 {
41 public:
42 WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
43 WPGXParser(const WPGXParser &parser);
44 virtual ~WPGXParser() {}
45 virtual bool parse() = 0;
46
47 unsigned char readU8();
48 unsigned short readU16();
49 unsigned int readU32();
50 short readS16();
51 int readS32();
52 unsigned int readVariableLengthInteger();
53 WPGXParser &operator=(const WPGXParser &parser);
54
55 protected:
56 librevenge::RVNGInputStream *m_input;
57 librevenge::RVNGDrawingInterface *m_painter;
58 std::map<int,libwpg::WPGColor> m_colorPalette;
59 };
60
61 #endif // __WPGXPARSER_H__
62 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPGXParser::readVariableLengthInteger
unsigned int readVariableLengthInteger()
Definition: WPGXParser.cpp:79
WPGXParser::parse
virtual bool parse()=0
WPGXParser::m_painter
librevenge::RVNGDrawingInterface * m_painter
Definition: WPGXParser.h:57
WPGXParser
Definition: WPGXParser.h:40
WPGXParser::WPGXParser
WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
Definition: WPGXParser.cpp:30
WPGColor.h
WPGXParser::readU16
unsigned short readU16()
Definition: WPGXParser.cpp:53
WPGXParser::m_input
librevenge::RVNGInputStream * m_input
Definition: WPGXParser.h:56
WPGXParser.h
WPGXParser::readS32
int readS32()
Definition: WPGXParser.cpp:74
WPGXParser::readU8
unsigned char readU8()
Definition: WPGXParser.cpp:41
WPGXParser::~WPGXParser
virtual ~WPGXParser()
Definition: WPGXParser.h:44
WPGXParser::operator=
WPGXParser & operator=(const WPGXParser &parser)
Definition: WPGXParser.cpp:108
libwpg
Definition: libwpg_utils.cpp:26
WPGXParser::readS16
short readS16()
Definition: WPGXParser.cpp:69
WPGXParser::m_colorPalette
std::map< int, libwpg::WPGColor > m_colorPalette
Definition: WPGXParser.h:58
WPGXParser::readU32
unsigned int readU32()
Definition: WPGXParser.cpp:60