Skip to content

Commit

Permalink
Remove some doxygen comments from overridden methods (pt 1)
Browse files Browse the repository at this point in the history
It's nearly always better to let doxygen use the base class
documentation (unless the subclass docs explicitly add something
of value for that subclass). The overriden docs are usually
out of date and the duplication makes documentation maintenance
harder.
  • Loading branch information
nyalldawson committed Dec 30, 2016
1 parent 14e2b98 commit 8319dac
Show file tree
Hide file tree
Showing 24 changed files with 2 additions and 882 deletions.
6 changes: 0 additions & 6 deletions src/providers/db2/qgsdb2featureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,13 @@ class QgsDb2FeatureIterator : public QgsAbstractFeatureIteratorFromSource<QgsDb2

~QgsDb2FeatureIterator();

//! reset the iterator to the starting position
virtual bool rewind() override;

//! end of iterating: free the resources / lock
virtual bool close() override;

protected:
void BuildStatement( const QgsFeatureRequest& request );

//! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ) override;

//! fetch next feature filter expression
bool nextFeatureFilterExpression( QgsFeature& f ) override;

private:
Expand Down
4 changes: 0 additions & 4 deletions src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,14 @@ class QgsDelimitedTextFeatureIterator : public QgsAbstractFeatureIteratorFromSou

~QgsDelimitedTextFeatureIterator();

//! reset the iterator to the starting position
virtual bool rewind() override;

//! end of iterating: free the resources / lock
virtual bool close() override;

// Tests whether the geometry is required, given that testGeometry is true.
bool wantGeometry( const QgsPoint & point ) const;
bool wantGeometry( const QgsGeometry& geom ) const;

protected:
//! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ) override;

bool setNextFeatureId( qint64 fid );
Expand Down
85 changes: 1 addition & 84 deletions src/providers/gdal/qgsgdalprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,114 +76,35 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase

QgsGdalProvider * clone() const override;

/** \brief Renders the layer as an image
*/
QImage* draw( QgsRectangle const & viewExtent, int pixelWidth, int pixelHeight ) override;

/** Return a provider name
*
* Essentially just returns the provider key. Should be used to build file
* dialogs so that providers can be shown with their supported types. Thus
* if more than one provider supports a given format, the user is able to
* select a specific provider to open that file.
*
* @note
*
* Instead of being pure virtual, might be better to generalize this
* behavior and presume that none of the sub-classes are going to do
* anything strange with regards to their name or description?
*
*/
QString name() const override;


/** Return description
*
* Return a terse string describing what the provider is.
*
* @note
*
* Instead of being pure virtual, might be better to generalize this
* behavior and presume that none of the sub-classes are going to do
* anything strange with regards to their name or description?
*
*/
QString description() const override;

virtual QgsCoordinateReferenceSystem crs() const override;

virtual QgsRectangle extent() const override;

bool isValid() const override;

QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override;

/**
* \brief Returns the caption error text for the last error in this provider
*
* If an operation returns 0 (e.g. draw()), this function
* returns the text of the error associated with the failure.
* Interactive users of this provider can then, for example,
* call a QMessageBox to display the contents.
*/
QString lastErrorTitle() override;

/**
* \brief Returns the verbose error text for the last error in this provider
*
* If an operation returns 0 (e.g. draw()), this function
* returns the text of the error associated with the failure.
* Interactive users of this provider can then, for example,
* call a QMessageBox to display the contents.
*/

QString lastError() override;

/** Returns a bitmask containing the supported capabilities
Note, some capabilities may change depending on which
sublayers are visible on this provider, so it may
be prudent to check this value per intended operation.
*/
int capabilities() const override;

Qgis::DataType dataType( int bandNo ) const override;
Qgis::DataType sourceDataType( int bandNo ) const override;

int bandCount() const override;

int colorInterpretation( int bandNo ) const override;

int xBlockSize() const override;
int yBlockSize() const override;

int xSize() const override;
int ySize() const override;

QString generateBandName( int theBandNumber ) const override;

//! Reimplemented from QgsRasterDataProvider to bypass second resampling (more efficient for local file based sources)
// Reimplemented from QgsRasterDataProvider to bypass second resampling (more efficient for local file based sources)
QgsRasterBlock *block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback = nullptr ) override;

void readBlock( int bandNo, int xBlock, int yBlock, void *data ) override;
void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override;

/** Read band scale for raster value
* @@note added in 2.3 */
double bandScale( int bandNo ) const override;

/** Read band offset for raster value
* @@note added in 2.3 */
double bandOffset( int bandNo ) const override;

QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo )const override;

/**
* Get metadata in a format suitable for feeding directly
* into a subset of the GUI raster properties "Metadata" tab.
*/
QString metadata() override;

//! \brief Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS
QStringList subLayers() const override;
static QStringList subLayers( GDALDatasetH dataset );

Expand Down Expand Up @@ -228,12 +149,8 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase

static QMap<QString, QString> supportedMimes();

//! Writes into the provider datasource
bool write( void* data, int band, int width, int height, int xOffset, int yOffset ) override;

bool setNoDataValue( int bandNo, double noDataValue ) override;

//! Remove dataset
bool remove() override;

QString validateCreationOptions( const QStringList& createOptions, const QString& format ) override;
Expand Down
4 changes: 0 additions & 4 deletions src/providers/gpx/qgsgpxfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,11 @@ class QgsGPXFeatureIterator : public QgsAbstractFeatureIteratorFromSource<QgsGPX

~QgsGPXFeatureIterator();

//! reset the iterator to the starting position
virtual bool rewind() override;

//! end of iterating: free the resources / lock
virtual bool close() override;

protected:

//! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ) override;

bool readFid( QgsFeature& feature );
Expand Down
40 changes: 0 additions & 40 deletions src/providers/gpx/qgsgpxprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,64 +49,24 @@ class QgsGPXProvider : public QgsVectorDataProvider
/* Functions inherited from QgsVectorDataProvider */

virtual QgsAbstractFeatureSource* featureSource() const override;

/**
* Returns the permanent storage type for this layer as a friendly name.
*/
virtual QString storageType() const override;

virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& request ) const override;

/**
* Get feature type.
* @return int representing the feature type
*/
virtual QgsWkbTypes::Type wkbType() const override;

/**
* Number of features in the layer
* @return long containing number of features
*/
virtual long featureCount() const override;

virtual QgsFields fields() const override;

/**
* Adds a list of features
* @return true in case of success and false in case of failure
*/
virtual bool addFeatures( QgsFeatureList & flist ) override;

/**
* Deletes a feature
* @param id list containing feature ids to delete
* @return true in case of success and false in case of failure
*/
virtual bool deleteFeatures( const QgsFeatureIds & id ) override;

/**
* Changes attribute values of existing features.
* @param attr_map a map containing changed attributes
* @return true in case of success and false in case of failure
*/
virtual bool changeAttributeValues( const QgsChangedAttributesMap & attr_map ) override;

virtual QgsVectorDataProvider::Capabilities capabilities() const override;

virtual QVariant defaultValue( int fieldId ) const override;


/* Functions inherited from QgsDataProvider */

virtual QgsRectangle extent() const override;
virtual bool isValid() const override;

//! Return a provider name
virtual QString name() const override;

//! Return description
virtual QString description() const override;

virtual QgsCoordinateReferenceSystem crs() const override;


Expand Down
5 changes: 0 additions & 5 deletions src/providers/grass/qgsgrassfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,8 @@ class GRASS_LIB_EXPORT QgsGrassFeatureIterator : public QObject, public QgsAbstr

~QgsGrassFeatureIterator();

//! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ) override;

//! reset the iterator to the starting position
virtual bool rewind() override;

//! end of iterating: free the resources / lock
virtual bool close() override;

// create QgsFeatureId from GRASS geometry object id, cat and layer number (editing)
Expand Down
23 changes: 1 addition & 22 deletions src/providers/grass/qgsgrassprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,12 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider
virtual ~QgsGrassProvider();

virtual QgsVectorDataProvider::Capabilities capabilities() const override;

virtual QgsAbstractFeatureSource* featureSource() const override;

/**
* Returns the permanent storage type for this layer as a friendly name.
*/
virtual QString storageType() const override;

virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& request ) const override;

/**
* Get the feature type as defined in WkbType (qgis.h).
* @return int representing the feature type
*/
QgsWkbTypes::Type wkbType() const override;


/**
* Get the number of features in the layer
*/
long featureCount() const override;

virtual QgsRectangle extent() const override;

QgsFields fields() const override;

// ! Key (category) field index
Expand All @@ -98,7 +80,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider

QVariant minimumValue( int index ) const override;

/** Returns the maximum value of an attributs
/** Returns the maximum value of an attribute
* @param index the index of the attribute */
QVariant maxValue( int index );

Expand Down Expand Up @@ -347,10 +329,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider
*/
static int grassLayerType( const QString & );

//! Return a provider name
QString name() const override;

//! Return description
QString description() const override;

// Layer type (layerType)
Expand Down
4 changes: 0 additions & 4 deletions src/providers/memory/qgsmemoryfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ class QgsMemoryFeatureIterator : public QgsAbstractFeatureIteratorFromSource<Qgs

~QgsMemoryFeatureIterator();

//! reset the iterator to the starting position
virtual bool rewind() override;

//! end of iterating: free the resources / lock
virtual bool close() override;

protected:

//! fetch next feature, return true on success
virtual bool fetchFeature( QgsFeature& feature ) override;

bool nextFeatureUsingList( QgsFeature& feature );
Expand Down
Loading

0 comments on commit 8319dac

Please sign in to comment.