Skip to content
Permalink
Browse files

Rename QgsGeometryData to QgsGeometryPrivate. Update class comment

  • Loading branch information
mhugent committed Jun 9, 2015
1 parent 73ae0f7 commit 06b472550d86283eaeaa7e94b92ba7042dab7b47
Showing with 9 additions and 20 deletions.
  1. +4 −4 src/core/geometry/qgsgeometry.cpp
  2. +5 −16 src/core/geometry/qgsgeometry.h
@@ -50,13 +50,13 @@ email : morb at ozemail dot com dot au
#include <winsock.h>
#endif

struct QgsGeometryData
struct QgsGeometryPrivate
{
QAtomicInt ref;
QgsAbstractGeometryV2* geometry;
};

QgsGeometry::QgsGeometry(): d( new QgsGeometryData() ), mWkb( 0 ), mWkbSize( 0 ), mGeos( 0 )
QgsGeometry::QgsGeometry(): d( new QgsGeometryPrivate() ), mWkb( 0 ), mWkbSize( 0 ), mGeos( 0 )
{
d->geometry = 0;
d->ref = QAtomicInt( 1 );
@@ -75,7 +75,7 @@ QgsGeometry::~QgsGeometry()
removeWkbGeos();
}

QgsGeometry::QgsGeometry( QgsAbstractGeometryV2* geom ): d( new QgsGeometryData() ), mWkb( 0 ), mWkbSize( 0 ), mGeos( 0 )
QgsGeometry::QgsGeometry( QgsAbstractGeometryV2* geom ): d( new QgsGeometryPrivate() ), mWkb( 0 ), mWkbSize( 0 ), mGeos( 0 )
{
d->geometry = geom;
d->ref = QAtomicInt( 1 );
@@ -119,7 +119,7 @@ void QgsGeometry::detach( bool cloneGeom )
{
cGeom = d->geometry->clone();
}
d = new QgsGeometryData();
d = new QgsGeometryPrivate();
d->geometry = cGeom;
d->ref = QAtomicInt( 1 );
}
@@ -59,23 +59,12 @@ typedef QVector<QgsPolygon> QgsMultiPolygon;

class QgsRectangle;

/** \ingroup core
* A geometry is the spatial representation of a feature.
* Represents a geometry with input and output in formats specified by
* (at least) the Open Geospatial Consortium (WKB / Wkt), and containing
* various functions for geoprocessing of the geometry.
*
* The geometry is represented internally by the OGC WKB format or
* as GEOS geometry. Some functions use WKB for their work, others
* use GEOS.
*
* TODO: migrate completely to GEOS and only support WKB/Wkt import/export.
*
* @author Brendan Morley
*/
class QgsConstWkbPtr;

struct QgsGeometryData;
struct QgsGeometryPrivate;

/** \ingroup core
- * A geometry is the spatial representation of a feature. This class is deprecated. Please use QgsAbstractGeometryV2 directly for new code*/

class CORE_EXPORT QgsGeometry
{
@@ -715,7 +704,7 @@ class CORE_EXPORT QgsGeometry

private:

QgsGeometryData* d; //implicitely shared data pointer
QgsGeometryPrivate* d; //implicitely shared data pointer
mutable const unsigned char* mWkb; //store wkb pointer for backward compatibility
mutable int mWkbSize;
mutable GEOSGeometry* mGeos;

0 comments on commit 06b4725

Please sign in to comment.
You can’t perform that action at this time.