CommonParser.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 __COMMONPARSER_H__
11 #define __COMMONPARSER_H__
12 
13 #include "CDRCollector.h"
14 #include "CDRPath.h"
15 
16 class WPXInputSTream;
17 
18 namespace libcdr
19 {
20 
23 
25 {
26 public:
27  CommonParser(CDRCollector *collector);
28  virtual ~CommonParser();
29 
30 private:
31  CommonParser();
32  CommonParser(const CommonParser &);
34 
35 
36 protected:
37  double readRectCoord(WPXInputStream *input, bool bigEndian = false);
38  double readCoordinate(WPXInputStream *input, bool bigEndian = false);
39  unsigned readUnsigned(WPXInputStream *input, bool bigEndian = false);
40  unsigned short readUnsignedShort(WPXInputStream *input, bool bigEndian = false);
41  int readInteger(WPXInputStream *input, bool bigEndian = false);
42  double readAngle(WPXInputStream *input, bool bigEndian = false);
43 
44  void processPath(const std::vector<std::pair<double, double> > &points, const std::vector<unsigned char> &types, CDRPath &path);
45  void outputPath(const std::vector<std::pair<double, double> > &points, const std::vector<unsigned char> &types);
46 
49 };
50 } // namespace libcdr
51 
52 #endif // __COMMONPARSER_H__
53 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: CommonParser.h:24
void processPath(const std::vector< std::pair< double, double > > &points, const std::vector< unsigned char > &types, CDRPath &path)
Definition: CommonParser.cpp:78
int readInteger(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.cpp:52
double readCoordinate(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.cpp:25
Definition: CDRPath.h:34
CDRCollector * m_collector
Definition: CommonParser.h:47
Definition: CommonParser.h:22
CommonParser & operator=(const CommonParser &)
double readRectCoord(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.h:22
CoordinatePrecision
Definition: CommonParser.h:21
void outputPath(const std::vector< std::pair< double, double > > &points, const std::vector< unsigned char > &types)
Definition: CommonParser.cpp:70
unsigned short readUnsignedShort(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.cpp:43
CoordinatePrecision m_precision
Definition: CommonParser.h:48
double readAngle(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.cpp:61
Definition: CommonParser.h:22
virtual ~CommonParser()
Definition: CommonParser.cpp:21
unsigned readUnsigned(WPXInputStream *input, bool bigEndian=false)
Definition: CommonParser.cpp:34
Definition: CDRCollector.h:59

Generated for libcdr by doxygen 1.8.6