Commit 8de50fda authored by Manuel Grizonnet's avatar Manuel Grizonnet

ENH: add ITK_OVERRIDE when missing

Add ITK_OVERRIDE msotly in Monteverdi

save override in OTB (need to manually fix this after tidy)
  cd src/Modules ; grep -nR "override" * > ~/temporary/override_otb.txt
  cd ~/software
  python run-clang-tidy.py -checks=-*,modernize-use-override -header-filter=/home/grizonnetm/projets/otb/src/OTB/Modules/.*/.*/include/.* -j8 -fix -p ~/projets/otb/bin/release/OTB-clang3.8/ ~/projets/otb/src/OTB/Modules/*/*/src/*.cxx ~/projets/otb/src/OTB/Examples/*/*.cxx ~/projets/otb/src/OTB/Modules/*/*/test/*.cxx > ~/temporary/run-clang-tidy-log.txt
  #rename override with ITK macro ITK_OVERRIDE
  cd src/Modules
  find . -path ./ThirdParty -prune -o -type f -print -name "*.h" -o -name "*.txx" | xargs perl -pi -e 's/\ override/\ ITK_OVERRIDE/g'
parent c3efc8c6
......@@ -88,16 +88,16 @@ public:
protected:
/** Actually process the input */
virtual void GenerateData();
void GenerateData() ITK_OVERRIDE;
/** Constructor */
SiftFastImageFilter();
/** Destructor */
virtual ~SiftFastImageFilter() {}
~SiftFastImageFilter() ITK_OVERRIDE {}
/** PrintSelf method */
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
private:
/** The number of scales */
......
......@@ -81,18 +81,18 @@ public:
itkStaticConstMacro(ImageDimension, unsigned int, InputImageType::ImageDimension);
/** Evalulate the function at specified index */
virtual FloatType EvaluateAtIndex(const IndexType& index) const;
FloatType EvaluateAtIndex(const IndexType& index) const ITK_OVERRIDE;
/** Evaluate the function at non-integer positions */
virtual FloatType Evaluate(const PointType& point) const
FloatType Evaluate(const PointType& point) const ITK_OVERRIDE
{
IndexType index;
this->ConvertPointToNearestIndex(point, index);
return this->EvaluateAtIndex(index);
}
virtual FloatType EvaluateAtContinuousIndex(
const ContinuousIndexType& cindex) const
FloatType EvaluateAtContinuousIndex(
const ContinuousIndexType& cindex) const ITK_OVERRIDE
{
IndexType index;
this->ConvertContinuousIndexToNearestIndex(cindex, index);
......@@ -103,8 +103,8 @@ public:
protected:
GroundSpacingImageFunction();
virtual ~GroundSpacingImageFunction(){}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
~GroundSpacingImageFunction() ITK_OVERRIDE{}
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
private:
GroundSpacingImageFunction(const Self &); //purposely not implemented
......
......@@ -86,7 +86,7 @@ public:
/**
* Method that resets the internal state of the sampler
*/
virtual void Reset(void);
void Reset(void) ITK_OVERRIDE;
/**
* Method to call during iteration, returns true if the sample is selected,
......@@ -115,7 +115,7 @@ protected:
PatternSampler();
/** Destructor */
virtual ~PatternSampler() {}
~PatternSampler() ITK_OVERRIDE {}
private:
// Not implemented
......
......@@ -80,7 +80,7 @@ public:
/**
* Method that resets the internal state of the sampler
*/
virtual void Reset(void);
void Reset(void) ITK_OVERRIDE;
/**
* Method to call during iteration, returns true if the sample is selected,
......@@ -93,7 +93,7 @@ protected:
PeriodicSampler();
/** Destructor */
virtual ~PeriodicSampler() {}
~PeriodicSampler() ITK_OVERRIDE {}
private:
// Not implemented
......
......@@ -77,7 +77,7 @@ public:
/**
* Reset internal counter (to be called before starting iteration)
*/
virtual void Reset(void);
void Reset(void) ITK_OVERRIDE;
/**
* Method to call during iteration, returns true if the sample is selected,
......@@ -90,7 +90,7 @@ protected:
RandomSampler();
/** Destructor */
virtual ~RandomSampler() {}
~RandomSampler() ITK_OVERRIDE {}
private:
// Not implemented
......
......@@ -75,7 +75,7 @@ protected:
SamplerBase();
/** Destructor */
virtual ~SamplerBase() {}
~SamplerBase() ITK_OVERRIDE {}
/** Current count of selected elements */
unsigned long m_ChosenElements;
......
......@@ -68,7 +68,7 @@ public:
};
/* Set Methods */
virtual void SetExtendedFileName(const char * extFname);
void SetExtendedFileName(const char * extFname) ITK_OVERRIDE;
/* Get Methods */
bool SimpleFileNameIsSet () const;
bool ExtGEOMFileNameIsSet () const;
......
......@@ -73,7 +73,7 @@ public:
};
/* Set Methods */
virtual void SetExtendedFileName(const char * extFname);
void SetExtendedFileName(const char * extFname) ITK_OVERRIDE;
/* Get Methods */
bool SimpleFileNameIsSet () const;
bool WriteGEOMFileIsSet () const;
......
......@@ -70,10 +70,10 @@ public:
/** Get the output samples OGR container */
ogr::DataSource* GetOutputSamples();
virtual void Synthetize(void){}
void Synthetize(void) ITK_OVERRIDE{}
/** Reset method called before starting the streaming*/
virtual void Reset(void);
void Reset(void) ITK_OVERRIDE;
itkSetMacro(SampleFieldPrefix, std::string);
itkGetMacro(SampleFieldPrefix, std::string);
......@@ -88,14 +88,14 @@ protected:
/** Constructor */
PersistentImageSampleExtractorFilter();
/** Destructor */
virtual ~PersistentImageSampleExtractorFilter() {}
~PersistentImageSampleExtractorFilter() ITK_OVERRIDE {}
virtual void GenerateOutputInformation();
void GenerateOutputInformation() ITK_OVERRIDE;
virtual void GenerateInputRequestedRegion();
void GenerateInputRequestedRegion() ITK_OVERRIDE;
/** process only points */
virtual void ThreadedGenerateVectorData(const ogr::Layer& layerForThread, itk::ThreadIdType threadid);
void ThreadedGenerateVectorData(const ogr::Layer& layerForThread, itk::ThreadIdType threadid) ITK_OVERRIDE;
private:
PersistentImageSampleExtractorFilter(const Self &); //purposely not implemented
......@@ -175,7 +175,7 @@ protected:
/** Constructor */
ImageSampleExtractorFilter() {}
/** Destructor */
virtual ~ImageSampleExtractorFilter() {}
~ImageSampleExtractorFilter() ITK_OVERRIDE {}
private:
ImageSampleExtractorFilter(const Self &); //purposely not implemented
......
......@@ -85,10 +85,10 @@ public:
/** Runtime information support. */
itkTypeMacro(PersistentOGRDataToSamplePositionFilter, PersistentSamplingFilterBase);
virtual void Synthetize(void){}
void Synthetize(void) ITK_OVERRIDE{}
/** Reset method called before starting the streaming*/
virtual void Reset(void);
void Reset(void) ITK_OVERRIDE;
/** Get a reference to the internal samplers at a given level */
SamplerMapType& GetSamplers(unsigned int level);
......@@ -112,7 +112,7 @@ public:
/** Make a DataObject of the correct type to be used as the specified
* output. */
virtual itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx);
itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
using Superclass::MakeOutput;
/** Get/Set of the field name storing the original FID of each sample */
......@@ -123,18 +123,18 @@ protected:
/** Constructor */
PersistentOGRDataToSamplePositionFilter();
/** Destructor */
virtual ~PersistentOGRDataToSamplePositionFilter() {}
~PersistentOGRDataToSamplePositionFilter() ITK_OVERRIDE {}
/** Call samplers on a current position, for a given class */
virtual void ProcessSample(const ogr::Feature& feature,
void ProcessSample(const ogr::Feature& feature,
typename TInputImage::IndexType& imgIndex,
typename TInputImage::PointType& imgPoint,
itk::ThreadIdType& threadid);
itk::ThreadIdType& threadid) ITK_OVERRIDE;
/** Method to split the input OGRDataSource
* according to the class partition
*/
virtual void DispatchInputVectors(void);
void DispatchInputVectors(void) ITK_OVERRIDE;
private:
PersistentOGRDataToSamplePositionFilter(const Self &); //purposely not implemented
......@@ -249,7 +249,7 @@ protected:
/** Constructor */
OGRDataToSamplePositionFilter() {}
/** Destructor */
virtual ~OGRDataToSamplePositionFilter() {}
~OGRDataToSamplePositionFilter() ITK_OVERRIDE {}
private:
OGRDataToSamplePositionFilter(const Self &); //purposely not implemented
......
......@@ -94,21 +94,21 @@ protected:
/** Constructor */
PersistentSamplingFilterBase();
/** Destructor */
virtual ~PersistentSamplingFilterBase() {}
~PersistentSamplingFilterBase() ITK_OVERRIDE {}
/** Use the same output information as input image, check the field index
* and the mask footprint */
virtual void GenerateOutputInformation();
void GenerateOutputInformation() ITK_OVERRIDE;
/** Use an empty region to input image (pixel values not needed) and set
* the requested region for the mask */
virtual void GenerateInputRequestedRegion();
void GenerateInputRequestedRegion() ITK_OVERRIDE;
/** Generate data should thread over */
virtual void GenerateData(void);
void GenerateData(void) ITK_OVERRIDE;
/** Allocate in-memory layers for input and outputs */
virtual void AllocateOutputs(void);
void AllocateOutputs(void) ITK_OVERRIDE;
/** Start of main processing loop */
virtual void ThreadedGenerateVectorData(const ogr::Layer& layerForThread, itk::ThreadIdType threadid);
......
......@@ -107,10 +107,10 @@ protected:
SamplingRateCalculator();
/** Destructor */
virtual ~SamplingRateCalculator() {}
~SamplingRateCalculator() ITK_OVERRIDE {}
/**PrintSelf method */
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
private:
SamplingRateCalculator(const Self &); //purposely not implemented
......
......@@ -98,7 +98,7 @@ public:
MaplaApplication( QApplication* qtApp );
/** \brief Destructor. */
virtual ~MaplaApplication();
~MaplaApplication() ITK_OVERRIDE;
//
// STATIC METHODS.
......@@ -141,7 +141,7 @@ protected:
// Protected attributes.
protected:
void virtual_InitializeCore();
void virtual_InitializeCore() ITK_OVERRIDE;
/*-[ PRIVATE SECTION ]-----------------------------------------------------*/
......
......@@ -102,7 +102,7 @@ public:
MaplaMainWindow( QWidget* Parent =0, Qt::WindowFlags flags =0 );
/** \brief Destructor. */
virtual ~MaplaMainWindow();
~MaplaMainWindow() ITK_OVERRIDE;
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
......@@ -117,9 +117,9 @@ signals:
protected:
//
// QMainWindow overrides.
// QMainWindow methods.
void closeEvent( QCloseEvent* event );
void closeEvent( QCloseEvent* event ) ITK_OVERRIDE;
//
// Protected attributes.
......@@ -133,11 +133,11 @@ protected slots:
/**
*/
void OnAboutToChangeModel( const AbstractModel* );
void OnAboutToChangeModel( const AbstractModel* ) ITK_OVERRIDE;
/**
*/
void OnModelChanged( AbstractModel* );
void OnModelChanged( AbstractModel* ) ITK_OVERRIDE;
/**
*/
......@@ -174,11 +174,11 @@ private:
void InitializeCentralWidget();
//
// I18nMainWindow overrides.
// I18nMainWindow methods.
virtual void virtual_SetupUI();
void virtual_SetupUI() ITK_OVERRIDE;
virtual void virtual_ConnectUI();
void virtual_ConnectUI() ITK_OVERRIDE;
//
// Private attributes.
......
......@@ -97,7 +97,7 @@ public:
Application( QApplication* qtApp );
/** \brief Destructor. */
virtual ~Application();
~Application() ITK_OVERRIDE;
/**
* \return The number of outdated dataset-models present in the
......@@ -158,7 +158,7 @@ protected:
// Protected attributes.
protected:
void virtual_InitializeCore();
void virtual_InitializeCore() ITK_OVERRIDE;
/*-[ PRIVATE SECTION ]-----------------------------------------------------*/
......
......@@ -122,7 +122,7 @@ public:
MainWindow( QWidget* p =0, Qt::WindowFlags flags =0 );
/** \brief Destructor. */
virtual ~MainWindow();
~MainWindow() ITK_OVERRIDE;
/**
*/
......@@ -178,9 +178,9 @@ protected:
using I18nMainWindow::ImportImage;
//
// QMainWindow overrides.
// QMainWindow methods.
void closeEvent( QCloseEvent* event );
void closeEvent( QCloseEvent* event ) ITK_OVERRIDE;
//
// Protected attributes.
......@@ -194,11 +194,11 @@ protected slots:
/**
*/
void OnAboutToChangeModel( const AbstractModel * );
void OnAboutToChangeModel( const AbstractModel * ) ITK_OVERRIDE;
/**
*/
void OnModelChanged( AbstractModel * );
void OnModelChanged( AbstractModel * ) ITK_OVERRIDE;
/**
*/
......@@ -327,13 +327,13 @@ private:
#endif // USE_PIXEL_DESCRIPTION
//
// I18nMainWindow overrides.
// I18nMainWindow methods.
virtual void virtual_SetupUI();
void virtual_SetupUI() ITK_OVERRIDE;
virtual void virtual_ConnectUI();
void virtual_ConnectUI() ITK_OVERRIDE;
virtual void virtual_InitializeUI();
void virtual_InitializeUI() ITK_OVERRIDE;
//
// Private attributes.
......
......@@ -90,7 +90,7 @@ public:
PreferencesDialog( QWidget* p =NULL, Qt::WindowFlags flags =0 );
/** Destructor */
virtual ~PreferencesDialog();
~PreferencesDialog() ITK_OVERRIDE;
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
......
......@@ -169,7 +169,7 @@ public:
public:
/** Destructor */
virtual ~AbstractImageModel();
~AbstractImageModel() ITK_OVERRIDE;
/** */
inline int GetId() const;
......@@ -318,9 +318,9 @@ protected:
GetMetaDataInterface() const;
//
// AbstractModel overrides.
// AbstractModel methods.
virtual void virtual_BuildModel( void* context );
void virtual_BuildModel( void* context ) ITK_OVERRIDE;
//
// Protected attributes.
......
......@@ -119,7 +119,7 @@ class OTBMonteverdiCore_EXPORT AbstractLayerModel :
public:
/** \brief Destructor. */
virtual ~AbstractLayerModel();
~AbstractLayerModel() ITK_OVERRIDE;
/**
*/
......@@ -190,7 +190,7 @@ private:
//
// VisibleInterface overloads.
virtual void virtual_SignalVisibilityChanged( bool );
void virtual_SignalVisibilityChanged( bool ) ITK_OVERRIDE;
//
// Private attributes.
......
......@@ -89,7 +89,7 @@ class OTBMonteverdiCore_EXPORT AbstractModel :
public:
/** Destructor */
virtual ~AbstractModel();
~AbstractModel() ITK_OVERRIDE;
/** */
template< typename TModel >
......
......@@ -89,7 +89,7 @@ class OTBMonteverdiCore_EXPORT AbstractWorker :
public:
/** \brief Destructor. */
virtual ~AbstractWorker();
~AbstractWorker() ITK_OVERRIDE;
/**
*/
......
......@@ -110,7 +110,7 @@ public:
ApplicationsBrowser( QObject* p =NULL );
/** \brief Destructor. */
virtual ~ApplicationsBrowser();
~ApplicationsBrowser() ITK_OVERRIDE;
/** set the path where to look for applications */
void SetAutoLoadPath(const std::string & itk_auto_load_path);
......
......@@ -98,7 +98,7 @@ public:
/**
* \brief Destructor.
*/
virtual ~BackgroundTask();
~BackgroundTask() ITK_OVERRIDE;
/**
*/
......
......@@ -174,7 +174,7 @@ public:
HistogramModel( QObject* p =NULL );
/** \brief Destructor. */
virtual ~HistogramModel();
~HistogramModel() ITK_OVERRIDE;
/**
*/
......@@ -229,10 +229,10 @@ signals:
protected:
//
// AbstractModel overrides.
// AbstractModel methods.
/** */
virtual void virtual_BuildModel( void* context =NULL );
void virtual_BuildModel( void* context =NULL ) ITK_OVERRIDE;
//
// Protected attributes.
......@@ -271,12 +271,12 @@ private:
void template_BuildModel_M( BuildContext * =NULL );
//
// SerializableInterface overrides.
// SerializableInterface methods.
//
virtual void virtual_Read( QIODevice* device );
void virtual_Read( QIODevice* device ) ITK_OVERRIDE;
virtual void virtual_Write( QIODevice& device ) const;
void virtual_Write( QIODevice& device ) const ITK_OVERRIDE;
//
// Private attributes.
......
......@@ -140,7 +140,7 @@ public:
I18nCoreApplication( QCoreApplication* qtApp );
/** \brief Destructor. */
virtual ~I18nCoreApplication();
~I18nCoreApplication() ITK_OVERRIDE;
/**
*/
......
......@@ -120,7 +120,7 @@ public:
/**
* \brief Destructor.
*/
virtual ~ImageImporter();
~ImageImporter() ITK_OVERRIDE;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
......@@ -175,9 +175,9 @@ private:
//
// AbstractWorker oveloads.
QObject* virtual_Do();
QObject* virtual_Do() ITK_OVERRIDE;
QString virtual_GetFirstProgressText() const;
QString virtual_GetFirstProgressText() const ITK_OVERRIDE;
//
......
......@@ -92,7 +92,7 @@ public:
MyClass( QObject* p =NULL );
/** \brief Destructor. */
virtual ~MyClass();
~MyClass() ITK_OVERRIDE;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
......
......@@ -108,12 +108,12 @@ public:
/**
* \brief Destructor.
*/
virtual ~OverviewBuilder();
~OverviewBuilder() ITK_OVERRIDE;
//
// ProgressInterface overloads.
virtual void SetProgress( double );
void SetProgress( double ) ITK_OVERRIDE;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
......@@ -164,9 +164,9 @@ private:
//
// AbstractWorker oveloads.
QObject * virtual_Do();
QObject * virtual_Do() ITK_OVERRIDE;
QString virtual_GetFirstProgressText() const;
QString virtual_GetFirstProgressText() const ITK_OVERRIDE;
//
......
......@@ -99,7 +99,7 @@ public:
public:
/** \brief Destructor. */
virtual ~ProcessObjectObserver();
~ProcessObjectObserver() ITK_OVERRIDE;
const ProgressInterface * GetProgressInterface() const;
ProgressInterface * GetProgressInterface();
......@@ -109,11 +109,11 @@ public:
//
// itk::Command overloads.
virtual void Execute( itk::Object * caller,
const itk::EventObject & event );
void Execute( itk::Object * caller,
const itk::EventObject & event ) ITK_OVERRIDE;
virtual void Execute( const itk::Object * caller,
const itk::EventObject & event );
void Execute( const itk::Object * caller,
const itk::EventObject & event ) ITK_OVERRIDE;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
......
......@@ -98,7 +98,7 @@ public:
QuicklookModel( QObject* p =NULL );
/** Destructor */
virtual ~QuicklookModel();
~QuicklookModel() ITK_OVERRIDE;
/**
* \brief Get the parent image-model of this quicklook image as an
......@@ -159,7 +159,7 @@ signals:
protected:
/** */
virtual void virtual_BuildModel( void* context =NULL );
void virtual_BuildModel( void* context =NULL ) ITK_OVERRIDE;
//
// Protected attributes.
......
......@@ -114,7 +114,7 @@ public:
StackedLayerModel( QObject* p =NULL );
/** \brief Destructor. */
virtual ~StackedLayerModel();
~StackedLayerModel() ITK_OVERRIDE;
inline const AbstractLayerModel * operator[]( SizeType ) const;
inline AbstractLayerModel * operator[]( SizeType );
......