Navigation Menu

Skip to content

Commit

Permalink
Add missing /Factory/ annotations to geometry classes
Browse files Browse the repository at this point in the history
(cherry picked from commit 93e559d)
  • Loading branch information
wonder-sk committed Nov 5, 2016
1 parent ecef7d7 commit 32eaac0
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion python/core/geometry/qgsabstractgeometryv2.sip
Expand Up @@ -77,7 +77,7 @@ class QgsAbstractGeometryV2

/** Clones the geometry by performing a deep copy
*/
virtual QgsAbstractGeometryV2* clone() const = 0;
virtual QgsAbstractGeometryV2* clone() const = 0 /Factory/;

/** Clears the geometry, ie reset it to a null geometry
*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgscircularstringv2.sip
Expand Up @@ -13,7 +13,7 @@ class QgsCircularStringV2: public QgsCurveV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsCircularStringV2* clone() const;
virtual QgsCircularStringV2* clone() const /Factory/;
virtual void clear();

virtual bool fromWkb( QgsConstWkbPtr wkb );
Expand Down Expand Up @@ -57,7 +57,7 @@ class QgsCircularStringV2: public QgsCurveV2
/**
* @copydoc QgsCurveV2::curveToLine()
*/
virtual QgsLineStringV2* curveToLine() const;
virtual QgsLineStringV2* curveToLine() const /Factory/;

void draw( QPainter& p ) const;

Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgscompoundcurvev2.sip
Expand Up @@ -15,7 +15,7 @@ class QgsCompoundCurveV2: public QgsCurveV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsCompoundCurveV2* clone() const;
virtual QgsCompoundCurveV2* clone() const /Factory/;
virtual void clear();

virtual bool fromWkb( QgsConstWkbPtr wkb );
Expand All @@ -34,7 +34,7 @@ class QgsCompoundCurveV2: public QgsCurveV2
virtual QgsPointV2 endPoint() const;
virtual void points( QList<QgsPointV2>& pts ) const;
virtual int numPoints() const;
virtual QgsLineStringV2* curveToLine() const;
virtual QgsLineStringV2* curveToLine() const /Factory/;

/** Returns the number of curves in the geometry.
*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgscurvepolygonv2.sip
Expand Up @@ -12,7 +12,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2

virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsCurvePolygonV2* clone() const;
virtual QgsCurvePolygonV2* clone() const /Factory/;
void clear();

virtual bool fromWkb( QgsConstWkbPtr wkb );
Expand All @@ -28,7 +28,7 @@ class QgsCurvePolygonV2: public QgsSurfaceV2
//surface interface
virtual double area() const;
virtual double perimeter() const;
QgsPolygonV2* surfaceToPolygon() const;
QgsPolygonV2* surfaceToPolygon() const /Factory/;

//curve polygon interface
int numInteriorRings() const;
Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgscurvev2.sip
Expand Up @@ -10,7 +10,7 @@ class QgsCurveV2: public QgsAbstractGeometryV2
virtual bool operator==( const QgsCurveV2& other ) const = 0;
virtual bool operator!=( const QgsCurveV2& other ) const = 0;

virtual QgsCurveV2* clone() const = 0;
virtual QgsCurveV2* clone() const = 0 /Factory/;

/** Returns the starting point of the curve.
* @see endPoint
Expand All @@ -33,7 +33,7 @@ class QgsCurveV2: public QgsAbstractGeometryV2
/** Returns a new line string geometry corresponding to a segmentized approximation
* of the curve.
*/
virtual QgsLineStringV2* curveToLine() const = 0;
virtual QgsLineStringV2* curveToLine() const = 0 /Factory/;

/** Adds a curve to a painter path.
*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgsgeometrycollectionv2.sip
Expand Up @@ -10,7 +10,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
//QgsGeometryCollectionV2& operator=( const QgsGeometryCollectionV2& c );
virtual ~QgsGeometryCollectionV2();

virtual QgsGeometryCollectionV2* clone() const;
virtual QgsGeometryCollectionV2* clone() const /Factory/;

/** Returns the number of geometries within the collection.
*/
Expand Down Expand Up @@ -85,7 +85,7 @@ class QgsGeometryCollectionV2: public QgsAbstractGeometryV2
bool hasCurvedSegments() const;

/** Returns a geometry without curves. Caller takes ownership*/
QgsAbstractGeometryV2* segmentize() const;
QgsAbstractGeometryV2* segmentize() const /Factory/;

/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
* @param vertex the vertex id
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmulticurvev2.sip
Expand Up @@ -6,7 +6,7 @@ class QgsMultiCurveV2: public QgsGeometryCollectionV2

public:
virtual QString geometryType() const;
virtual QgsMultiCurveV2* clone() const;
virtual QgsMultiCurveV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultilinestringv2.sip
Expand Up @@ -6,7 +6,7 @@ class QgsMultiLineStringV2: public QgsMultiCurveV2

public:
virtual QString geometryType() const;
virtual QgsMultiLineStringV2* clone() const;
virtual QgsMultiLineStringV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultipointv2.sip
Expand Up @@ -5,7 +5,7 @@ class QgsMultiPointV2: public QgsGeometryCollectionV2
%End
public:
virtual QString geometryType() const;
virtual QgsMultiPointV2* clone() const;
virtual QgsMultiPointV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultipolygonv2.sip
Expand Up @@ -5,7 +5,7 @@ class QgsMultiPolygonV2: public QgsMultiSurfaceV2
%End
public:
virtual QString geometryType() const;
virtual QgsMultiPolygonV2* clone() const;
virtual QgsMultiPolygonV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgsmultisurfacev2.sip
Expand Up @@ -5,7 +5,7 @@ class QgsMultiSurfaceV2: public QgsGeometryCollectionV2
%End
public:
virtual QString geometryType() const;
virtual QgsMultiSurfaceV2* clone() const;
virtual QgsMultiSurfaceV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

Expand Down
4 changes: 2 additions & 2 deletions python/core/geometry/qgspolygonv2.sip
Expand Up @@ -11,7 +11,7 @@ class QgsPolygonV2: public QgsCurvePolygonV2
bool operator!=( const QgsPolygonV2& other ) const;

virtual QString geometryType() const;
virtual QgsPolygonV2* clone() const;
virtual QgsPolygonV2* clone() const /Factory/;

virtual bool fromWkb( QgsConstWkbPtr wkb );

Expand All @@ -24,7 +24,7 @@ class QgsPolygonV2: public QgsCurvePolygonV2
// inherited: QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
// inherited: QString asJSON( int precision = 17 ) const;

QgsPolygonV2* surfaceToPolygon() const;
QgsPolygonV2* surfaceToPolygon() const /Factory/;

/** Returns the geometry converted to the more generic curve type QgsCurvePolygon
@return the converted geometry. Caller takes ownership*/
Expand Down
2 changes: 1 addition & 1 deletion python/core/geometry/qgssurfacev2.sip
Expand Up @@ -6,7 +6,7 @@ class QgsSurfaceV2: public QgsAbstractGeometryV2

public:

virtual QgsPolygonV2* surfaceToPolygon() const = 0;
virtual QgsPolygonV2* surfaceToPolygon() const = 0 /Factory/;

virtual QgsRectangle boundingBox() const;

Expand Down

0 comments on commit 32eaac0

Please sign in to comment.