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

Generated for libcdr by doxygen 1.8.5