1 /* libwpg\r
2 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)\r
3 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)\r
4 * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)\r
5 *\r
6 * This library is free software; you can redistribute it and/or\r
7 * modify it under the terms of the GNU Library General Public\r
8 * License as published by the Free Software Foundation; either\r
9 * version 2 of the License, or (at your option) any later version.\r
10 *\r
11 * This library is distributed in the hope that it will be useful,\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
14 * Library General Public License for more details.\r
15 *\r
16 * You should have received a copy of the GNU Library General Public\r
17 * License along with this library; if not, write to the \r
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, \r
19 * Boston, MA 02111-1301 USA\r
20 *\r
21 * For further information visit http://libwpg.sourceforge.net\r
22 */\r
23 \r
24 /* "This product is not manufactured, approved, or supported by\r
25 * Corel Corporation or Corel Corporation Limited."\r
26 */\r
27 \r
28 #ifndef __WPGXPARSER_H__\r
29 #define __WPGXPARSER_H__\r
30 \r
31 #include "WPGPaintInterface.h"\r
32 #include "WPGStream.h"\r
33 #include "WPGColor.h"\r
34 \r
35 #include <map>\r
36 \r
37 using namespace libwpg;\r
38 \r
39 class WPGXParser\r
40 {\r
41 public:\r
42 WPGXParser(WPGInputStream *input, WPGPaintInterface* painter);\r
43 virtual ~WPGXParser() {}\r
44 virtual bool parse() = 0;\r
45 \r
46 unsigned char readU8();\r
47 unsigned short readU16(); \r
48 unsigned long readU32(); \r
49 char readS8();\r
50 short readS16(); \r
51 long readS32(); \r
52 unsigned int readVariableLengthInteger();\r
53 \r
54 protected:\r
55 WPGInputStream* m_input;\r
56 WPGPaintInterface* m_painter;\r
57 std::map<int,WPGColor> m_colorPalette;\r
58 };\r
59 \r
60 #endif // __WPGXPARSER_H__\r