QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
qgswkbsimplifierptr.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswkbsimplifierptr.h
3  ---------------------
4  begin : February 2016
5  copyright : (C) 2016 by Alvaro Huarte
6  email : http://wiki.osgeo.org/wiki/Alvaro_Huarte
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSWKBSIMPLIFIERPTR_H
16 #define QGSWKBSIMPLIFIERPTR_H
17 
18 #include "qgswkbptr.h"
20 
21 class QgsGeometry;
22 
28 class CORE_EXPORT QgsConstWkbSimplifierPtr : public QgsConstWkbPtr
29 {
31  const QgsVectorSimplifyMethod& mSimplifyMethod;
32 
33  public:
35  QgsConstWkbSimplifierPtr( const unsigned char *p, int size, const QgsVectorSimplifyMethod &simplifyMethod );
36 
38  inline const QgsConstWkbPtr &operator>>( double &v ) const { return QgsConstWkbPtr::operator>>( v ); }
40  inline const QgsConstWkbPtr &operator>>( float &r ) const { return QgsConstWkbPtr::operator>>( r ); }
42  inline const QgsConstWkbPtr &operator>>( int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
44  inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { return QgsConstWkbPtr::operator>>( v ); }
46  inline const QgsConstWkbPtr &operator>>( char &v ) const { return QgsConstWkbPtr::operator>>( v ); }
47 
49  virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const override;
51  virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const override;
52 
54  inline void operator+=( int n ) { QgsConstWkbPtr::operator+=( n ); }
56  inline void operator-=( int n ) { QgsConstWkbPtr::operator-=( n ); }
57 
59  inline operator const unsigned char *() const { return mP; }
60 };
61 
62 #endif // QGSWKBSIMPLIFIERPTR_H
unsigned char * mP
Definition: qgswkbptr.h:96
const QgsConstWkbPtr & operator>>(double &v) const
Definition: qgswkbptr.h:118
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:76
void operator-=(int n)
Move position backward.
const QgsConstWkbPtr & operator>>(float &r) const
Read a float.
const QgsConstWkbPtr & operator>>(unsigned int &v) const
Read a uint.
const QgsConstWkbPtr & operator>>(int &v) const
Read a int.
void operator+=(int n)
Move position forward.
This class contains information how to simplify geometries fetched from a vector layer.
const QgsConstWkbPtr & operator>>(double &v) const
Read a double.
void operator+=(int n)
Definition: qgswkbptr.h:129
void operator-=(int n)
Definition: qgswkbptr.h:130
const QgsConstWkbPtr & operator>>(char &v) const
Read a char.