Skip to content
Permalink
Browse files

Add missing /Factory/ annotations to geometry classes

  • Loading branch information
wonder-sk committed Nov 5, 2016
1 parent bef0309 commit 5984b21852dcb0323f6a14609106c9ad6620c281
@@ -85,7 +85,7 @@ class QgsAbstractGeometry

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

/** Clears the geometry, ie reset it to a null geometry
*/
@@ -13,7 +13,7 @@ class QgsCircularString: public QgsCurve

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

virtual bool fromWkb( QgsConstWkbPtr wkb );
@@ -58,7 +58,7 @@ class QgsCircularString: public QgsCurve
* of the curve.
* @param tolerance segmentation tolerance
* @param toleranceType maximum segmentation angle or maximum difference between approximation and curve*/
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const;
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform,
@@ -15,7 +15,7 @@ class QgsCompoundCurve: public QgsCurve

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

virtual bool fromWkb( QgsConstWkbPtr wkb );
@@ -38,7 +38,7 @@ class QgsCompoundCurve: public QgsCurve
* of the curve.
* @param tolerance segmentation tolerance
* @param toleranceType maximum segmentation angle or maximum difference between approximation and curve*/
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const;
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;

/** Returns the number of curves in the geometry.
*/
@@ -10,7 +10,7 @@ class QgsCurve: public QgsAbstractGeometry
virtual bool operator==( const QgsCurve& other ) const = 0;
virtual bool operator!=( const QgsCurve& other ) const = 0;

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

/** Returns the starting point of the curve.
* @see endPoint
@@ -35,7 +35,7 @@ class QgsCurve: public QgsAbstractGeometry
* @param tolerance segmentation tolerance
* @param toleranceType maximum segmentation angle or maximum difference between approximation and curve
*/
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const = 0;
virtual QgsLineString* curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const = 0 /Factory/;

/** Adds a curve to a painter path.
*/
@@ -12,7 +12,7 @@ class QgsCurvePolygon: public QgsSurface

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

virtual bool fromWkb( QgsConstWkbPtr wkb );
@@ -28,7 +28,7 @@ class QgsCurvePolygon: public QgsSurface
//surface interface
virtual double area() const;
virtual double perimeter() const;
QgsPolygonV2* surfaceToPolygon() const;
QgsPolygonV2* surfaceToPolygon() const /Factory/;
virtual QgsAbstractGeometry* boundary() const /Factory/;


@@ -10,7 +10,7 @@ class QgsGeometryCollection: public QgsAbstractGeometry
//QgsGeometryCollection& operator=( const QgsGeometryCollection& c );
virtual ~QgsGeometryCollection();

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

/** Returns the number of geometries within the collection.
*/
@@ -85,7 +85,7 @@ class QgsGeometryCollection: public QgsAbstractGeometry
/** Returns a geometry without curves. Caller takes ownership
* @param tolerance segmentation tolerance
* @param toleranceType maximum segmentation angle or maximum difference between approximation and curve*/
QgsAbstractGeometry* segmentize( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const;
QgsAbstractGeometry* segmentize( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;

/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
* @param vertex the vertex id
@@ -6,7 +6,7 @@ class QgsMultiCurve: public QgsGeometryCollection

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

bool fromWkt( const QString& wkt );

@@ -6,7 +6,7 @@ class QgsMultiLineString: public QgsMultiCurve

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

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiPointV2: public QgsGeometryCollection
%End
public:
virtual QString geometryType() const;
virtual QgsMultiPointV2* clone() const;
virtual QgsMultiPointV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiPolygonV2: public QgsMultiSurface
%End
public:
virtual QString geometryType() const;
virtual QgsMultiPolygonV2* clone() const;
virtual QgsMultiPolygonV2* clone() const /Factory/;

bool fromWkt( const QString& wkt );

@@ -5,7 +5,7 @@ class QgsMultiSurface: public QgsGeometryCollection
%End
public:
virtual QString geometryType() const;
virtual QgsMultiSurface* clone() const;
virtual QgsMultiSurface* clone() const /Factory/;

bool fromWkt( const QString& wkt );

@@ -11,7 +11,7 @@ class QgsPolygonV2: public QgsCurvePolygon
bool operator!=( const QgsPolygonV2& other ) const;

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

virtual bool fromWkb( QgsConstWkbPtr wkb );
@@ -25,7 +25,7 @@ class QgsPolygonV2: public QgsCurvePolygon
// 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*/
@@ -6,7 +6,7 @@ class QgsSurface: public QgsAbstractGeometry

public:

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

virtual QgsRectangle boundingBox() const;

0 comments on commit 5984b21

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