Skip to content

Commit

Permalink
OVERRIDE macro breaks globeplugin (OVERRIDE is an enum value in OpenS…
Browse files Browse the repository at this point in the history
…ceneGraph)

replace 'OVERRIDE' macro with 'override' keyword in code and define it an empty
macro where C++11 is not available (followup 466f256)
  • Loading branch information
jef-n committed Jan 16, 2015
1 parent 11d331d commit 313f2c8
Show file tree
Hide file tree
Showing 404 changed files with 2,600 additions and 2,603 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Expand Up @@ -337,12 +337,9 @@ ELSE()
ENDIF()

#allow override keyword if available
IF (USE_CXX_11)
SET(OVERRIDEKEYWORD "override")
ELSE()
SET(OVERRIDEKEYWORD "")
IF (NOT USE_CXX_11)
ADD_DEFINITIONS("-Doverride=")
ENDIF()
ADD_DEFINITIONS("-DOVERRIDE=${OVERRIDEKEYWORD}")

#############################################################
# enable warnings
Expand Down
24 changes: 12 additions & 12 deletions src/analysis/interpolation/Bezier3D.h
Expand Up @@ -36,34 +36,34 @@ class ANALYSIS_EXPORT Bezier3D: public ParametricLine
/**Destructor*/
virtual ~Bezier3D();
/**Do not use this method, since a Bezier curve does not consist of other curves*/
virtual void add( ParametricLine *pl ) OVERRIDE;
virtual void add( ParametricLine *pl ) override;
/**Calculates the first derivative and assigns it to v*/
virtual void calcFirstDer( float t, Vector3D* v ) OVERRIDE;
virtual void calcFirstDer( float t, Vector3D* v ) override;
/**Calculates the second derivative and assigns it to v*/
virtual void calcSecDer( float t, Vector3D* v ) OVERRIDE;
virtual void calcSecDer( float t, Vector3D* v ) override;
//virtual Point3D calcPoint(float t);
/**Calculates the point on the curve and assigns it to p*/
virtual void calcPoint( float t, Point3D* p ) OVERRIDE;
virtual void calcPoint( float t, Point3D* p ) override;
/**changes the order of control points*/
virtual void changeDirection() OVERRIDE;
virtual void changeDirection() override;
//virtual void draw(QPainter* p);
//virtual bool intersects(ParametricLine* pal);
/**Do not use this method, since a Bezier curve does not consist of other curves*/
virtual void remove( int i ) OVERRIDE;
virtual void remove( int i ) override;
/**Returns a control point*/
virtual const Point3D* getControlPoint( int number ) const OVERRIDE;
virtual const Point3D* getControlPoint( int number ) const override;
/**Returns a pointer to the control polygon*/
//! @note not available in python binding
virtual const QVector<Point3D*>* getControlPoly() const OVERRIDE;
virtual const QVector<Point3D*>* getControlPoly() const override;
/**Returns the degree of the curve*/
virtual int getDegree() const OVERRIDE;
virtual int getDegree() const override;
/**Returns the parent*/
virtual ParametricLine* getParent() const OVERRIDE;
virtual ParametricLine* getParent() const override;
/** Sets the parent*/
virtual void setParent( ParametricLine* par ) OVERRIDE;
virtual void setParent( ParametricLine* par ) override;
/**Sets the control polygon*/
//! @note not available in python binding
virtual void setControlPoly( QVector<Point3D*>* cp ) OVERRIDE;
virtual void setControlPoly( QVector<Point3D*>* cp ) override;

};

Expand Down
4 changes: 2 additions & 2 deletions src/analysis/interpolation/CloughTocherInterpolator.h
Expand Up @@ -85,9 +85,9 @@ class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
/**destructor*/
virtual ~CloughTocherInterpolator();
/**Calculates the normal vector and assigns it to vec (not implemented at the moment)*/
virtual bool calcNormVec( double x, double y, Vector3D* result ) OVERRIDE;
virtual bool calcNormVec( double x, double y, Vector3D* result ) override;
/**Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
virtual bool calcPoint( double x, double y, Point3D* result ) OVERRIDE;
virtual bool calcPoint( double x, double y, Point3D* result ) override;
virtual void setTriangulation( NormVecDecorator* tin );
};

Expand Down
52 changes: 26 additions & 26 deletions src/analysis/interpolation/DualEdgeTriangulation.h
Expand Up @@ -43,69 +43,69 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation
virtual ~DualEdgeTriangulation();
void setDecorator( Triangulation* d ) {mDecorator = d;}
/**Adds a line (e.g. a break-, structure- or an isoline) to the triangulation. The class takes ownership of the line object and its points*/
void addLine( Line3D* line, bool breakline ) OVERRIDE;
void addLine( Line3D* line, bool breakline ) override;
/**Adds a point to the triangulation and returns the number of this point in case of success or -100 in case of failure*/
int addPoint( Point3D* p ) OVERRIDE;
int addPoint( Point3D* p ) override;
/**Performs a consistency check, remove this later*/
virtual void performConsistencyTest() OVERRIDE;
virtual void performConsistencyTest() override;
/**Calculates the normal at a point on the surface*/
virtual bool calcNormal( double x, double y, Vector3D* result ) OVERRIDE;
virtual bool calcNormal( double x, double y, Vector3D* result ) override;
/**Calculates x-, y and z-value of the point on the surface*/
virtual bool calcPoint( double x, double y, Point3D* result ) OVERRIDE;
virtual bool calcPoint( double x, double y, Point3D* result ) override;
/**draws the points, edges and the forced lines*/
//virtual void draw(QPainter* p, double xlowleft, double ylowleft, double xupright, double yupright, double width, double height) const;
/**Returns a pointer to the point with number i*/
virtual Point3D* getPoint( unsigned int i ) const OVERRIDE;
virtual Point3D* getPoint( unsigned int i ) const override;
/**Returns the number of the point opposite to the triangle points p1, p2 (which have to be on a halfedge)*/
int getOppositePoint( int p1, int p2 ) OVERRIDE;
int getOppositePoint( int p1, int p2 ) override;
/**Finds out, in which triangle the point with coordinates x and y is and assigns the numbers of the vertices to 'n1', 'n2' and 'n3' and the vertices to 'p1', 'p2' and 'p3'*/
//! @note not available in python bindings
virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ) OVERRIDE;
virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ) override;
/**Finds out, in which triangle the point with coordinates x and y is and assigns addresses to the points at the vertices to 'p1', 'p2' and 'p3*/
virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ) OVERRIDE;
virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ) override;
/**Returns a pointer to a value list with the information of the triangles surrounding (counterclockwise) a point. Four integer values describe a triangle, the first three are the number of the half edges of the triangle and the fourth is -10, if the third (and most counterclockwise) edge is a breakline, and -20 otherwise. The value list has to be deleted by the code which called the method*/
QList<int>* getSurroundingTriangles( int pointno ) OVERRIDE;
QList<int>* getSurroundingTriangles( int pointno ) override;
/**Returns the largest x-coordinate value of the bounding box*/
virtual double getXMax() const OVERRIDE;
virtual double getXMax() const override;
/**Returns the smallest x-coordinate value of the bounding box*/
virtual double getXMin() const OVERRIDE;
virtual double getXMin() const override;
/**Returns the largest y-coordinate value of the bounding box*/
virtual double getYMax() const OVERRIDE;
virtual double getYMax() const override;
/**Returns the smallest x-coordinate value of the bounding box*/
virtual double getYMin() const OVERRIDE;
virtual double getYMin() const override;
/**Returns the number of points*/
virtual int getNumberOfPoints() const OVERRIDE;
virtual int getNumberOfPoints() const override;
/**Removes the line with number i from the triangulation*/
void removeLine( int i );
/**Removes the point with the number i from the triangulation*/
void removePoint( int i );
/**Sets the behaviour of the triangulation in case of crossing forced lines*/
virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) OVERRIDE;
virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) override;
/**Sets the color of the normal edges*/
virtual void setEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setEdgeColor( int r, int g, int b ) override;
/**Sets the color of the forced edges*/
virtual void setForcedEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setForcedEdgeColor( int r, int g, int b ) override;
/**Sets the color of the breaklines*/
virtual void setBreakEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setBreakEdgeColor( int r, int g, int b ) override;
/**Sets an interpolator object*/
void setTriangleInterpolator( TriangleInterpolator* interpolator ) OVERRIDE;
void setTriangleInterpolator( TriangleInterpolator* interpolator ) override;
/**Eliminates the horizontal triangles by swapping or by insertion of new points*/
void eliminateHorizontalTriangles() OVERRIDE;
void eliminateHorizontalTriangles() override;
/**Adds points to make the triangles better shaped (algorithm of ruppert)*/
virtual void ruppertRefinement() OVERRIDE;
virtual void ruppertRefinement() override;
/**Returns true, if the point with coordinates x and y is inside the convex hull and false otherwise*/
bool pointInside( double x, double y ) OVERRIDE;
bool pointInside( double x, double y ) override;
/**Reads the dual edge structure of a taff file*/
//bool readFromTAFF(QString fileName);
/**Saves the dual edge structure to a taff file*/
//bool saveToTAFF(QString fileName) const;
/**Swaps the edge which is closest to the point with x and y coordinates (if this is possible)*/
virtual bool swapEdge( double x, double y ) OVERRIDE;
virtual bool swapEdge( double x, double y ) override;
/**Returns a value list with the numbers of the four points, which would be affected by an edge swap. This function is e.g. needed by NormVecDecorator to know the points, for which the normals have to be recalculated. The returned ValueList has to be deleted by the code which calls the method*/
virtual QList<int>* getPointsAroundEdge( double x, double y ) OVERRIDE;
virtual QList<int>* getPointsAroundEdge( double x, double y ) override;
/**Saves the triangulation as a (line) shapefile
@return true in case of success*/
virtual bool saveAsShapefile( const QString& fileName ) const OVERRIDE;
virtual bool saveAsShapefile( const QString& fileName ) const override;

protected:
/**X-coordinate of the upper right corner of the bounding box*/
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/interpolation/LinTriangleInterpolator.h
Expand Up @@ -31,9 +31,9 @@ class ANALYSIS_EXPORT LinTriangleInterpolator : public TriangleInterpolator
/** Destructor*/
virtual ~LinTriangleInterpolator();
/**Calculates the normal vector and assigns it to vec*/
virtual bool calcNormVec( double x, double y, Vector3D* result ) OVERRIDE;
virtual bool calcNormVec( double x, double y, Vector3D* result ) override;
/**Performs a linear interpolation in a triangle and assigns the x-,y- and z-coordinates to point*/
virtual bool calcPoint( double x, double y, Point3D* result ) OVERRIDE;
virtual bool calcPoint( double x, double y, Point3D* result ) override;
/**Returns a pointer to the current Triangulation object*/
virtual DualEdgeTriangulation* getTriangulation() const;
/**Sets a Triangulation*/
Expand Down
14 changes: 7 additions & 7 deletions src/analysis/interpolation/NormVecDecorator.h
Expand Up @@ -33,15 +33,15 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator
NormVecDecorator( Triangulation* tin );
virtual ~NormVecDecorator();
/**Adds a point to the triangulation*/
int addPoint( Point3D* p ) OVERRIDE;
int addPoint( Point3D* p ) override;
/**Calculates the normal at a point on the surface and assigns it to 'result'. Returns true in case of success and false in case of failure*/
bool calcNormal( double x, double y, Vector3D* result ) OVERRIDE;
bool calcNormal( double x, double y, Vector3D* result ) override;
/**Calculates the normal of a triangle-point for the point with coordinates x and y. This is needed, if a point is on a break line and there is no unique normal stored in 'mNormVec'. Returns false, it something went wrong and true otherwise*/
bool calcNormalForPoint( double x, double y, int point, Vector3D* result );
/**Calculates x-, y and z-value of the point on the surface and assigns it to 'result'. Returns true in case of success and flase in case of failure*/
bool calcPoint( double x, double y, Point3D* result ) OVERRIDE;
bool calcPoint( double x, double y, Point3D* result ) override;
/**Eliminates the horizontal triangles by swapping or by insertion of new points. If alreadyestimated is true, a re-estimation of the normals will be done*/
virtual void eliminateHorizontalTriangles() OVERRIDE;
virtual void eliminateHorizontalTriangles() override;
/**Estimates the first derivative a point. Return true in case of succes and false otherwise*/
bool estimateFirstDerivative( int pointno );
/**This method adds the functionality of estimating normals at the data points. Return true in the case of success and false otherwise*/
Expand All @@ -56,12 +56,12 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator
/**Returns the state of the point with the number 'pointno'*/
pointState getState( int pointno ) const;
/**Sets an interpolator*/
void setTriangleInterpolator( TriangleInterpolator* inter ) OVERRIDE;
void setTriangleInterpolator( TriangleInterpolator* inter ) override;
/**Swaps the edge which is closest to the point with x and y coordinates (if this is possible) and forces recalculation of the concerned normals (if alreadyestimated is true)*/
virtual bool swapEdge( double x, double y ) OVERRIDE;
virtual bool swapEdge( double x, double y ) override;
/**Saves the triangulation as a (line) shapefile
@return true in case of success*/
virtual bool saveAsShapefile( const QString& fileName ) const OVERRIDE;
virtual bool saveAsShapefile( const QString& fileName ) const override;

protected:
/**Is true, if the normals already have been estimated*/
Expand Down
50 changes: 25 additions & 25 deletions src/analysis/interpolation/TriDecorator.h
Expand Up @@ -26,35 +26,35 @@ class TriDecorator: public Triangulation
TriDecorator();
TriDecorator( Triangulation* t );
virtual ~TriDecorator();
virtual void addLine( Line3D* line, bool breakline ) OVERRIDE;
virtual int addPoint( Point3D* p ) OVERRIDE;
virtual void addLine( Line3D* line, bool breakline ) override;
virtual int addPoint( Point3D* p ) override;
/**Adds an association to a triangulation*/
virtual void addTriangulation( Triangulation* t );
/**Performs a consistency check, remove this later*/
virtual void performConsistencyTest() OVERRIDE;
virtual bool calcNormal( double x, double y, Vector3D* result ) OVERRIDE;
virtual bool calcPoint( double x, double y, Point3D* result ) OVERRIDE;
virtual Point3D* getPoint( unsigned int i ) const OVERRIDE;
virtual int getNumberOfPoints() const OVERRIDE;
virtual void performConsistencyTest() override;
virtual bool calcNormal( double x, double y, Vector3D* result ) override;
virtual bool calcPoint( double x, double y, Point3D* result ) override;
virtual Point3D* getPoint( unsigned int i ) const override;
virtual int getNumberOfPoints() const override;
//! @note not available in python bindings
bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ) OVERRIDE;
bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ) OVERRIDE;
virtual int getOppositePoint( int p1, int p2 ) OVERRIDE;
virtual QList<int>* getSurroundingTriangles( int pointno ) OVERRIDE;
virtual double getXMax() const OVERRIDE;
virtual double getXMin() const OVERRIDE;
virtual double getYMax() const OVERRIDE;
virtual double getYMin() const OVERRIDE;
virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) OVERRIDE;
virtual void setEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setForcedEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setBreakEdgeColor( int r, int g, int b ) OVERRIDE;
virtual void setTriangleInterpolator( TriangleInterpolator* interpolator ) OVERRIDE;
virtual void eliminateHorizontalTriangles() OVERRIDE;
virtual void ruppertRefinement() OVERRIDE;
virtual bool pointInside( double x, double y ) OVERRIDE;
virtual bool swapEdge( double x, double y ) OVERRIDE;
virtual QList<int>* getPointsAroundEdge( double x, double y ) OVERRIDE;
bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ) override;
bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ) override;
virtual int getOppositePoint( int p1, int p2 ) override;
virtual QList<int>* getSurroundingTriangles( int pointno ) override;
virtual double getXMax() const override;
virtual double getXMin() const override;
virtual double getYMax() const override;
virtual double getYMin() const override;
virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) override;
virtual void setEdgeColor( int r, int g, int b ) override;
virtual void setForcedEdgeColor( int r, int g, int b ) override;
virtual void setBreakEdgeColor( int r, int g, int b ) override;
virtual void setTriangleInterpolator( TriangleInterpolator* interpolator ) override;
virtual void eliminateHorizontalTriangles() override;
virtual void ruppertRefinement() override;
virtual bool pointInside( double x, double y ) override;
virtual bool swapEdge( double x, double y ) override;
virtual QList<int>* getPointsAroundEdge( double x, double y ) override;
protected:
/**Association with a Triangulation object*/
Triangulation* mTIN;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/interpolation/qgsidwinterpolator.h
Expand Up @@ -31,7 +31,7 @@ class ANALYSIS_EXPORT QgsIDWInterpolator: public QgsInterpolator
@param y y-coordinate (in map units)
@param result out: interpolation result
@return 0 in case of success*/
int interpolatePoint( double x, double y, double& result ) OVERRIDE;
int interpolatePoint( double x, double y, double& result ) override;

void setDistanceCoefficient( double p ) {mDistanceCoefficient = p;}

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/interpolation/qgstininterpolator.h
Expand Up @@ -43,7 +43,7 @@ class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator
@param y y-coordinate (in map units)
@param result out: interpolation result
@return 0 in case of success*/
int interpolatePoint( double x, double y, double& result ) OVERRIDE;
int interpolatePoint( double x, double y, double& result ) override;

void setExportTriangulationToFile( bool e ) {mExportTriangulationToFile = e;}
void setTriangulationFilePath( const QString& filepath ) {mTriangulationFilePath = filepath;}
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/network/qgsdistancearcproperter.h
Expand Up @@ -25,6 +25,6 @@
class ANALYSIS_EXPORT QgsDistanceArcProperter : public QgsArcProperter
{
public:
virtual QVariant property( double distance, const QgsFeature& ) const OVERRIDE;
virtual QVariant property( double distance, const QgsFeature& ) const override;
};
#endif //QGSEDGEDISTANCEPROPERTYH
4 changes: 2 additions & 2 deletions src/analysis/network/qgsgraphbuilder.h
Expand Up @@ -46,9 +46,9 @@ class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
/*
* MANDATORY BUILDER PROPERTY DECLARATION
*/
virtual void addVertex( int id, const QgsPoint& pt ) OVERRIDE;
virtual void addVertex( int id, const QgsPoint& pt ) override;

virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& prop ) OVERRIDE;
virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& prop ) override;

/**
* return QgsGraph result;
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/network/qgslinevectorlayerdirector.h
Expand Up @@ -58,9 +58,9 @@ class ANALYSIS_EXPORT QgsLineVectorLayerDirector : public QgsGraphDirector
*/
void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPoint >& additionalPoints,
QVector< QgsPoint>& tiedPoints ) const OVERRIDE;
QVector< QgsPoint>& tiedPoints ) const override;

QString name() const OVERRIDE;
QString name() const override;

private:
QgsVectorLayer *mVectorLayer;
Expand Down

1 comment on commit 313f2c8

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n sorry about that !

Please sign in to comment.