Skip to content

Commit

Permalink
Rename QgsGeometryData to QgsGeometryPrivate. Update class comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 9, 2015
1 parent 73ae0f7 commit 06b4725
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/core/geometry/qgsgeometry.cpp
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 );
}
Expand Down
21 changes: 5 additions & 16 deletions src/core/geometry/qgsgeometry.h
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 06b4725

Please sign in to comment.