|
| 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" |
| 19 | +#include "qgsvectorsimplifymethod.h" |
| 20 | + |
| 21 | +class QgsGeometry; |
| 22 | + |
| 23 | +/** \class QgsConstWkbSimplifierPtr |
| 24 | + * \note not available in Python bindings |
| 25 | + */ |
| 26 | + |
| 27 | +class CORE_EXPORT QgsConstWkbSimplifierPtr : public QgsConstWkbPtr |
| 28 | +{ |
| 29 | + /** Simplification object which holds the information about how to simplify the features for fast rendering */ |
| 30 | + const QgsVectorSimplifyMethod& mSimplifyMethod; |
| 31 | + |
| 32 | + public: |
| 33 | + QgsConstWkbSimplifierPtr( const unsigned char *p, int size, const QgsVectorSimplifyMethod &simplifyMethod ); |
| 34 | + |
| 35 | + inline const QgsConstWkbPtr &operator>>( double &v ) const { return QgsConstWkbPtr::operator>>( v ); } |
| 36 | + inline const QgsConstWkbPtr &operator>>( float &r ) const { return QgsConstWkbPtr::operator>>( r ); } |
| 37 | + inline const QgsConstWkbPtr &operator>>( int &v ) const { return QgsConstWkbPtr::operator>>( v ); } |
| 38 | + inline const QgsConstWkbPtr &operator>>( unsigned int &v ) const { return QgsConstWkbPtr::operator>>( v ); } |
| 39 | + inline const QgsConstWkbPtr &operator>>( char &v ) const { return QgsConstWkbPtr::operator>>( v ); } |
| 40 | + |
| 41 | + virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const override; |
| 42 | + virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const override; |
| 43 | + |
| 44 | + inline void operator+=( int n ) { QgsConstWkbPtr::operator+=( n ); } |
| 45 | + inline void operator-=( int n ) { QgsConstWkbPtr::operator-=( n ); } |
| 46 | + |
| 47 | + inline operator const unsigned char *() const { return mP; } |
| 48 | +}; |
| 49 | + |
| 50 | +#endif // QGSWKBSIMPLIFIERPTR_H |
0 commit comments