CMXParser.h Source File documentation

- 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 /*
3 * This file is part of the libcdr 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 __CMXPARSER_H__
11 #define __CMXPARSER_H__
12
13 #include <stdio.h>
14 #include <iostream>
15 #include <vector>
16 #include <map>
17 #include <librevenge-stream/librevenge-stream.h>
18 #include "CDRTypes.h"
19 #include "CommonParser.h"
20
21 namespace libcdr
22 {
23
24 class CDRCollector;
25
26 class CMXParser : protected CommonParser
27 {
28 public:
29 explicit CMXParser(CDRCollector *collector);
30 virtual ~CMXParser();
31 bool parseRecords(librevenge::RVNGInputStream *input, long size = -1, unsigned level = 0);
32
33 private:
34 CMXParser();
35 CMXParser(const CMXParser &);
36 CMXParser &operator=(const CMXParser &);
37 bool parseRecord(librevenge::RVNGInputStream *input, unsigned level = 0);
38 void readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input);
39
40 void readCMXHeader(librevenge::RVNGInputStream *input);
41 void readDisp(librevenge::RVNGInputStream *input, unsigned length);
42 void readCcmm(librevenge::RVNGInputStream *input, long &recordEnd);
43 void readPage(librevenge::RVNGInputStream *input, unsigned length);
44
45 // Command readers
46 void readBeginPage(librevenge::RVNGInputStream *input);
47 void readBeginLayer(librevenge::RVNGInputStream *input);
48 void readBeginGroup(librevenge::RVNGInputStream *input);
49 void readPolyCurve(librevenge::RVNGInputStream *input);
50 void readEllipse(librevenge::RVNGInputStream *input);
51 void readRectangle(librevenge::RVNGInputStream *input);
52 void readJumpAbsolute(librevenge::RVNGInputStream *input);
53
54 // Types readers
55 CDRTransform readMatrix(librevenge::RVNGInputStream *input);
56 CDRBox readBBox(librevenge::RVNGInputStream *input);
57 void readFill(librevenge::RVNGInputStream *input);
58
59 // Complex types readers
60 void readRenderingAttributes(librevenge::RVNGInputStream *input);
61
62 bool m_bigEndian;
63 unsigned short m_unit;
64 double m_scale;
65 double m_xmin, m_xmax, m_ymin, m_ymax;
66 unsigned m_indexSectionOffset;
67 unsigned m_infoSectionOffset;
68 unsigned m_thumbnailOffset;
69 unsigned m_fillIndex;
70 unsigned m_nextInstructionOffset;
71 };
72
73 } // namespace libcdr
74
75 #endif // __CMXPARSER_H__
76 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CMXParser::readRenderingAttributes
void readRenderingAttributes(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:688
libcdr::CommonParser
Definition: CommonParser.h:22
libcdr::CMXParser::readBeginPage
void readBeginPage(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:281
libcdr::CMXParser::m_nextInstructionOffset
unsigned m_nextInstructionOffset
Definition: CMXParser.h:70
libcdr::CMXParser::readCcmm
void readCcmm(librevenge::RVNGInputStream *input, long &recordEnd)
Definition: CMXParser.cpp:233
libcdr::CMXParser::m_xmax
double m_xmax
Definition: CMXParser.h:65
libcdr::CDRBox
Definition: CDRTypes.h:23
libcdr::CMXParser::m_infoSectionOffset
unsigned m_infoSectionOffset
Definition: CMXParser.h:67
libcdr::CMXParser::readPolyCurve
void readPolyCurve(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:337
libcdr::CDRTransform
Definition: CDRTransforms.h:20
libcdr::CMXParser::operator=
CMXParser & operator=(const CMXParser &)
libcdr::CMXParser::readRecord
void readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:110
libcdr::CMXParser::m_unit
unsigned short m_unit
Definition: CMXParser.h:63
libcdr::CMXParser
Definition: CMXParser.h:26
libcdr::CMXParser::m_bigEndian
bool m_bigEndian
Definition: CMXParser.h:62
libcdr
Definition: CDRCollector.h:29
libcdr::CMXParser::readDisp
void readDisp(librevenge::RVNGInputStream *input, unsigned length)
Definition: CMXParser.cpp:192
libcdr::CMXParser::readJumpAbsolute
void readJumpAbsolute(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:825
libcdr::CMXParser::m_ymin
double m_ymin
Definition: CMXParser.h:65
libcdr::CMXParser::parseRecords
bool parseRecords(librevenge::RVNGInputStream *input, long size=-1, unsigned level=0)
Definition: CMXParser.cpp:42
libcdr::CMXParser::m_thumbnailOffset
unsigned m_thumbnailOffset
Definition: CMXParser.h:68
CommonParser.h
libcdr::CMXParser::readEllipse
void readEllipse(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:410
libcdr::CMXParser::m_ymax
double m_ymax
Definition: CMXParser.h:65
libcdr::CMXParser::readPage
void readPage(librevenge::RVNGInputStream *input, unsigned length)
Definition: CMXParser.cpp:239
libcdr::CMXParser::m_indexSectionOffset
unsigned m_indexSectionOffset
Definition: CMXParser.h:66
libcdr::CMXParser::m_fillIndex
unsigned m_fillIndex
Definition: CMXParser.h:69
libcdr::CMXParser::readFill
void readFill(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:630
libcdr::CMXParser::readMatrix
CDRTransform readMatrix(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:599
libcdr::CMXParser::readRectangle
void readRectangle(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:512
libcdr::CMXParser::readBeginGroup
void readBeginGroup(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:333
libcdr::CMXParser::readBBox
CDRBox readBBox(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:620
libcdr::CMXParser::CMXParser
CMXParser()
libcdr::CMXParser::parseRecord
bool parseRecord(librevenge::RVNGInputStream *input, unsigned level=0)
Definition: CMXParser.cpp:60
libcdr::CMXParser::readBeginLayer
void readBeginLayer(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:330
libcdr::CMXParser::~CMXParser
virtual ~CMXParser()
Definition: CMXParser.cpp:38
libcdr::CMXParser::m_scale
double m_scale
Definition: CMXParser.h:64
CDRTypes.h
libcdr::CMXParser::m_xmin
double m_xmin
Definition: CMXParser.h:65
libcdr::CMXParser::readCMXHeader
void readCMXHeader(librevenge::RVNGInputStream *input)
Definition: CMXParser.cpp:134
libcdr::CDRCollector
Definition: CDRCollector.h:59