Skip to content
Permalink
Browse files
Add missing overrides
  • Loading branch information
nyalldawson committed May 27, 2015
1 parent b1dd253 commit c729a753c51f81078d512cbbbcf27bb2fdb8a728
@@ -27,50 +27,50 @@ class CORE_EXPORT QgsCircularStringV2: public QgsCurveV2
QgsCircularStringV2();
~QgsCircularStringV2();

virtual QString geometryType() const { return "CircularString"; }
virtual int dimension() const { return 1; }
virtual QgsAbstractGeometryV2* clone() const;
virtual void clear();
virtual QString geometryType() const override { return "CircularString"; }
virtual int dimension() const override { return 1; }
virtual QgsAbstractGeometryV2* clone() const override;
virtual void clear() override;

virtual QgsRectangle calculateBoundingBox() const;
virtual QgsRectangle calculateBoundingBox() const override;

virtual bool fromWkb( const unsigned char * wkb );
virtual bool fromWkt( const QString& wkt );
virtual bool fromWkb( const unsigned char * wkb ) override;
virtual bool fromWkt( const QString& wkt ) override;

int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

int numPoints() const;
int numPoints() const override;
QgsPointV2 pointN( int i ) const;
void points( QList<QgsPointV2>& pts ) const;
void points( QList<QgsPointV2>& pts ) const override;
void setPoints( const QList<QgsPointV2>& points );


//curve interface
virtual double length() const;
virtual QgsPointV2 startPoint() const;
virtual QgsPointV2 endPoint() const;
virtual QgsLineStringV2* curveToLine() const;

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QTransform& t );
void clip( const QgsRectangle& rect );
void addToPainterPath( QPainterPath& path ) const;
void drawAsPolygon( QPainter& p ) const;

virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos );
virtual bool deleteVertex( const QgsVertexId& position );

double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool pointAt( int i, QgsPointV2& vertex, QgsVertexId::VertexType& type ) const;

void sumUpArea( double& sum ) const;
virtual double length() const override;
virtual QgsPointV2 startPoint() const override;
virtual QgsPointV2 endPoint() const override;
virtual QgsLineStringV2* curveToLine() const override;

void draw( QPainter& p ) const override;
void transform( const QgsCoordinateTransform& ct ) override;
void transform( const QTransform& t ) override;
void clip( const QgsRectangle& rect ) override;
void addToPainterPath( QPainterPath& path ) const override;
void drawAsPolygon( QPainter& p ) const override;

virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex ) override;
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos ) override;
virtual bool deleteVertex( const QgsVertexId& position ) override;

double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const override;
bool pointAt( int i, QgsPointV2& vertex, QgsVertexId::VertexType& type ) const override;

void sumUpArea( double& sum ) const override;

private:
QVector<double> mX;
@@ -28,30 +28,30 @@ class CORE_EXPORT QgsCompoundCurveV2: public QgsCurveV2
QgsCompoundCurveV2& operator=( const QgsCompoundCurveV2& curve );
~QgsCompoundCurveV2();

virtual QString geometryType() const { return "CompoundCurve"; }
virtual int dimension() const { return 1; }
virtual QgsAbstractGeometryV2* clone() const;
virtual void clear();
virtual QString geometryType() const override { return "CompoundCurve"; }
virtual int dimension() const override { return 1; }
virtual QgsAbstractGeometryV2* clone() const override;
virtual void clear() override;

virtual QgsRectangle calculateBoundingBox() const;
virtual QgsRectangle calculateBoundingBox() const override;

virtual bool fromWkb( const unsigned char* wkb );
virtual bool fromWkt( const QString& wkt );
virtual bool fromWkb( const unsigned char* wkb ) override;
virtual bool fromWkt( const QString& wkt ) override;

int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

//curve interface
virtual double length() const;
virtual QgsPointV2 startPoint() const;
virtual QgsPointV2 endPoint() const;
virtual void points( QList<QgsPointV2>& pts ) const;
virtual int numPoints() const;
virtual QgsLineStringV2* curveToLine() const;
virtual double length() const override;
virtual QgsPointV2 startPoint() const override;
virtual QgsPointV2 endPoint() const override;
virtual void points( QList<QgsPointV2>& pts ) const override;
virtual int numPoints() const override;
virtual QgsLineStringV2* curveToLine() const override;
int nCurves() const { return mCurves.size(); }
const QgsCurveV2* curveAt( int i ) const;

@@ -60,20 +60,20 @@ class CORE_EXPORT QgsCompoundCurveV2: public QgsCurveV2
void removeCurve( int i );
void addVertex( const QgsPointV2& pt );

void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QTransform& t );
void addToPainterPath( QPainterPath& path ) const;
void drawAsPolygon( QPainter& p ) const;
void draw( QPainter& p ) const override;
void transform( const QgsCoordinateTransform& ct ) override;
void transform( const QTransform& t ) override;
void addToPainterPath( QPainterPath& path ) const override;
void drawAsPolygon( QPainter& p ) const override;

virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos );
virtual bool deleteVertex( const QgsVertexId& position );
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex ) override;
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos ) override;
virtual bool deleteVertex( const QgsVertexId& position ) override;

virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool pointAt( int i, QgsPointV2& vertex, QgsVertexId::VertexType& type ) const;
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const override;
bool pointAt( int i, QgsPointV2& vertex, QgsVertexId::VertexType& type ) const override;

void sumUpArea( double& sum ) const;
void sumUpArea( double& sum ) const override;

/**Appends first point if not already closed*/
void close();
@@ -30,29 +30,29 @@ class CORE_EXPORT QgsCurvePolygonV2: public QgsSurfaceV2
QgsCurvePolygonV2& operator=( const QgsCurvePolygonV2& p );
~QgsCurvePolygonV2();

virtual QString geometryType() const { return "CurvePolygon"; }
virtual int dimension() const { return 2; }
virtual QgsAbstractGeometryV2* clone() const;
void clear();
virtual QString geometryType() const override { return "CurvePolygon"; }
virtual int dimension() const override { return 2; }
virtual QgsAbstractGeometryV2* clone() const override;
void clear() override;


virtual QgsRectangle calculateBoundingBox() const;
virtual bool fromWkb( const unsigned char* wkb );
virtual bool fromWkt( const QString& wkt );
virtual QgsRectangle calculateBoundingBox() const override;
virtual bool fromWkb( const unsigned char* wkb ) override;
virtual bool fromWkt( const QString& wkt ) override;

int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

//surface interface
virtual double area() const;
virtual double length() const;
QgsPointV2 centroid() const;
QgsPointV2 pointOnSurface() const;
QgsPolygonV2* surfaceToPolygon() const;
virtual double area() const override;
virtual double length() const override;
QgsPointV2 centroid() const override;
QgsPointV2 pointOnSurface() const override;
QgsPolygonV2* surfaceToPolygon() const override;

//curve polygon interface
int numInteriorRings() const;
@@ -68,17 +68,17 @@ class CORE_EXPORT QgsCurvePolygonV2: public QgsSurfaceV2
/**Removes ring. Exterior ring is 0, first interior ring 1, ...*/
bool removeInteriorRing( int nr );

virtual void draw( QPainter& p ) const;
void transform( const QgsCoordinateTransform& ct );
void transform( const QTransform& t );
virtual void draw( QPainter& p ) const override;
void transform( const QgsCoordinateTransform& ct ) override;
void transform( const QTransform& t ) override;

virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos );
virtual bool deleteVertex( const QgsVertexId& position );
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex ) override;
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos ) override;
virtual bool deleteVertex( const QgsVertexId& position ) override;

virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const;
double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const;
virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const override;
double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const override;
bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const override;

protected:

@@ -40,11 +40,11 @@ class CORE_EXPORT QgsCurveV2: public QgsAbstractGeometryV2
virtual void points( QList<QgsPointV2>& pt ) const = 0;
virtual int numPoints() const = 0;

virtual double area() const;
virtual void sumUpArea( double& sum ) const = 0;
virtual double area() const override;
virtual void sumUpArea( double& sum ) const = 0;

virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const;
virtual bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const;
virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const override;
virtual bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const override;
virtual bool pointAt( int i, QgsPointV2& vertex, QgsVertexId::VertexType& type ) const = 0;
};

@@ -27,48 +27,48 @@ class CORE_EXPORT QgsGeometryCollectionV2: public QgsAbstractGeometryV2
QgsGeometryCollectionV2& operator=( const QgsGeometryCollectionV2& c );
virtual ~QgsGeometryCollectionV2();

virtual QgsAbstractGeometryV2* clone() const;
virtual QgsAbstractGeometryV2* clone() const override;

int numGeometries() const;
const QgsAbstractGeometryV2* geometryN( int n ) const;
QgsAbstractGeometryV2* geometryN( int n );

//methods inherited from QgsAbstractGeometry
virtual int dimension() const;
virtual QString geometryType() const { return "GeometryCollection"; }
virtual void clear();
virtual int dimension() const override;
virtual QString geometryType() const override { return "GeometryCollection"; }
virtual void clear() override;

/**Adds a geometry and takes ownership. Returns true in case of success*/
virtual bool addGeometry( QgsAbstractGeometryV2* g );
virtual bool removeGeometry( int nr );

virtual void transform( const QgsCoordinateTransform& ct );
void transform( const QTransform& t );
virtual void clip( const QgsRectangle& rect );
virtual void draw( QPainter& p ) const;
virtual void transform( const QgsCoordinateTransform& ct ) override;
void transform( const QTransform& t ) override;
virtual void clip( const QgsRectangle& rect ) override;
virtual void draw( QPainter& p ) const override;

bool fromWkb( const unsigned char * wkb );
virtual bool fromWkt( const QString& wkt );
int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
bool fromWkb( const unsigned char * wkb ) override;
virtual bool fromWkt( const QString& wkt ) override;
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

virtual QgsRectangle calculateBoundingBox() const;
virtual QgsRectangle calculateBoundingBox() const override;

virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const;
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const;
virtual void coordinateSequence( QList< QList< QList< QgsPointV2 > > >& coord ) const override;
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const override;
bool nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const override;

//low-level editing
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex );
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos );
virtual bool deleteVertex( const QgsVertexId& position );
virtual bool insertVertex( const QgsVertexId& position, const QgsPointV2& vertex ) override;
virtual bool moveVertex( const QgsVertexId& position, const QgsPointV2& newPos ) override;
virtual bool deleteVertex( const QgsVertexId& position ) override;

virtual double length() const;
virtual double area() const;
virtual double length() const override;
virtual double area() const override;

protected:
QVector< QgsAbstractGeometryV2* > mGeometries;

0 comments on commit c729a75

Please sign in to comment.