- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

CMXParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libcdr
3 * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License or as specified alternatively below. You may obtain a copy of
8 * the License at http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * Major Contributor(s):
16 * Copyright (C) 2011 Fridrich Strba <fridrich.strba@bluewin.ch>
17 *
18 *
19 * All Rights Reserved.
20 *
21 * For minor contributions see the git repository.
22 *
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
25 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
26 * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
27 * instead of those above.
28 */
29
30 #ifndef __CMXPARSER_H__
31 #define __CMXPARSER_H__
32
33 #include <stdio.h>
34 #include <iostream>
35 #include <vector>
36 #include <map>
37 #include <libwpd/libwpd.h>
38 #include <libwpd-stream/libwpd-stream.h>
39
40 namespace libcdr
41 {
42
43 class CDRCollector;
44
45 class CMXParser
46 {
47 public:
48 explicit CMXParser(WPXInputStream *input, CDRCollector *collector);
49 virtual ~CMXParser();
50 bool parseRecords(WPXInputStream *input, unsigned level = 0);
51
52 private:
53 CMXParser();
54 CMXParser(const CMXParser &);
55 CMXParser &operator=(const CMXParser &);
56 bool parseRecord(WPXInputStream *input, unsigned level = 0);
57 void readRecord(WPXString fourCC, unsigned length, WPXInputStream *input);
58
59 void readCMXHeader(WPXInputStream *input);
60 void readDisp(WPXInputStream *input, unsigned length);
61
62 WPXInputStream *m_input;
63 CDRCollector *m_collector;
64
65 bool m_bigEndian;
66 unsigned short m_coordSize;
67 unsigned short m_unit;
68 double m_scale;
69 double m_xmin, m_xmax, m_ymin, m_ymax;
70 };
71
72 } // namespace libcdr
73
74 #endif // __CMXPARSER_H__
75 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CMXParser::readRecord
void readRecord(WPXString fourCC, unsigned length, WPXInputStream *input)
Definition: CMXParser.cpp:117
libcdr::CMXParser::m_xmax
double m_xmax
Definition: CMXParser.h:69
libcdr::CMXParser::parseRecords
bool parseRecords(WPXInputStream *input, unsigned level=0)
Definition: CMXParser.cpp:58
libcdr::CMXParser::operator=
CMXParser & operator=(const CMXParser &)
libcdr::CMXParser::m_unit
unsigned short m_unit
Definition: CMXParser.h:67
libcdr::CMXParser
Definition: CMXParser.h:45
libcdr::CMXParser::m_input
WPXInputStream * m_input
Definition: CMXParser.h:62
libcdr::CMXParser::m_bigEndian
bool m_bigEndian
Definition: CMXParser.h:65
libcdr::CMXParser::m_ymin
double m_ymin
Definition: CMXParser.h:69
libcdr::CMXParser::m_ymax
double m_ymax
Definition: CMXParser.h:69
libcdr::CMXParser::m_collector
CDRCollector * m_collector
Definition: CMXParser.h:63
libcdr::CMXParser::parseRecord
bool parseRecord(WPXInputStream *input, unsigned level=0)
Definition: CMXParser.cpp:73
libcdr::CMXParser::readDisp
void readDisp(WPXInputStream *input, unsigned length)
Definition: CMXParser.cpp:169
libcdr::CMXParser::m_coordSize
unsigned short m_coordSize
Definition: CMXParser.h:66
libcdr::CMXParser::CMXParser
CMXParser()
libcdr::CMXParser::readCMXHeader
void readCMXHeader(WPXInputStream *input)
Definition: CMXParser.cpp:127
libcdr::CMXParser::~CMXParser
virtual ~CMXParser()
Definition: CMXParser.cpp:54
libcdr::CMXParser::m_scale
double m_scale
Definition: CMXParser.h:68
libcdr::CMXParser::m_xmin
double m_xmin
Definition: CMXParser.h:69
libcdr::CDRCollector
Definition: CDRCollector.h:96