diff --git a/modules/imgcodecs/src/grfmt_bmp.hpp b/modules/imgcodecs/src/grfmt_bmp.hpp index b4443b7dcc..ccbaa9140d 100644 --- a/modules/imgcodecs/src/grfmt_bmp.hpp +++ b/modules/imgcodecs/src/grfmt_bmp.hpp @@ -58,18 +58,18 @@ enum BmpCompression // Windows Bitmap reader -class BmpDecoder : public BaseImageDecoder +class BmpDecoder CV_FINAL : public BaseImageDecoder { public: BmpDecoder(); - ~BmpDecoder(); + ~BmpDecoder() CV_OVERRIDE; - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -83,15 +83,15 @@ protected: // ... writer -class BmpEncoder : public BaseImageEncoder +class BmpEncoder CV_FINAL : public BaseImageEncoder { public: BmpEncoder(); - ~BmpEncoder(); + ~BmpEncoder() CV_OVERRIDE; - bool write( const Mat& img, const std::vector& params ); + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/grfmt_exr.hpp b/modules/imgcodecs/src/grfmt_exr.hpp index 331d099f71..ec08028e22 100644 --- a/modules/imgcodecs/src/grfmt_exr.hpp +++ b/modules/imgcodecs/src/grfmt_exr.hpp @@ -63,19 +63,19 @@ using namespace Imath; /* libpng version only */ -class ExrDecoder : public BaseImageDecoder +class ExrDecoder CV_FINAL : public BaseImageDecoder { public: ExrDecoder(); - ~ExrDecoder(); + ~ExrDecoder() CV_OVERRIDE; - int type() const; - bool readData( Mat& img ); - bool readHeader(); + int type() const CV_OVERRIDE; + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: void UpSample( uchar *data, int xstep, int ystep, int xsample, int ysample ); @@ -103,15 +103,15 @@ private: }; -class ExrEncoder : public BaseImageEncoder +class ExrEncoder CV_FINAL : public BaseImageEncoder { public: ExrEncoder(); - ~ExrEncoder(); + ~ExrEncoder() CV_OVERRIDE; - bool isFormatSupported( int depth ) const; - bool write( const Mat& img, const std::vector& params ); - ImageEncoder newEncoder() const; + bool isFormatSupported( int depth ) const CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/grfmt_gdal.hpp b/modules/imgcodecs/src/grfmt_gdal.hpp index 0273960490..47b360f855 100644 --- a/modules/imgcodecs/src/grfmt_gdal.hpp +++ b/modules/imgcodecs/src/grfmt_gdal.hpp @@ -103,7 +103,7 @@ void write_ctable_pixel( const double& pixelValue, /** * Loader for GDAL */ -class GdalDecoder : public BaseImageDecoder{ +class GdalDecoder CV_FINAL : public BaseImageDecoder{ public: @@ -115,17 +115,17 @@ class GdalDecoder : public BaseImageDecoder{ /** * Destructor */ - ~GdalDecoder(); + ~GdalDecoder() CV_OVERRIDE; /** * Read image data */ - bool readData( Mat& img ); + bool readData( Mat& img ) CV_OVERRIDE; /** * Read the image header */ - bool readHeader(); + bool readHeader() CV_OVERRIDE; /** * Close the module @@ -135,7 +135,7 @@ class GdalDecoder : public BaseImageDecoder{ /** * Create a new decoder */ - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; /** * Test the file signature @@ -144,7 +144,7 @@ class GdalDecoder : public BaseImageDecoder{ * The reason is that GDAL tends to overlap with other image formats and it is probably * safer to use other formats first. */ - virtual bool checkSignature( const String& signature ) const; + virtual bool checkSignature( const String& signature ) const CV_OVERRIDE; protected: diff --git a/modules/imgcodecs/src/grfmt_gdcm.hpp b/modules/imgcodecs/src/grfmt_gdcm.hpp index d8dc60f522..7cb7e13305 100644 --- a/modules/imgcodecs/src/grfmt_gdcm.hpp +++ b/modules/imgcodecs/src/grfmt_gdcm.hpp @@ -53,14 +53,14 @@ namespace cv { // DICOM image reader using GDCM -class DICOMDecoder : public BaseImageDecoder +class DICOMDecoder CV_FINAL : public BaseImageDecoder { public: DICOMDecoder(); - bool readData( Mat& img ); - bool readHeader(); - ImageDecoder newDecoder() const; - virtual bool checkSignature( const String& signature ) const; + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; + ImageDecoder newDecoder() const CV_OVERRIDE; + virtual bool checkSignature( const String& signature ) const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/grfmt_hdr.hpp b/modules/imgcodecs/src/grfmt_hdr.hpp index 3ed8015e00..04947eae58 100644 --- a/modules/imgcodecs/src/grfmt_hdr.hpp +++ b/modules/imgcodecs/src/grfmt_hdr.hpp @@ -55,34 +55,34 @@ enum HdrCompression }; // Radiance rgbe (.hdr) reader -class HdrDecoder : public BaseImageDecoder +class HdrDecoder CV_FINAL : public BaseImageDecoder { public: HdrDecoder(); - ~HdrDecoder(); - bool readHeader(); - bool readData( Mat& img ); - bool checkSignature( const String& signature ) const; - ImageDecoder newDecoder() const; - size_t signatureLength() const; + ~HdrDecoder() CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; + bool readData( Mat& img ) CV_OVERRIDE; + bool checkSignature( const String& signature ) const CV_OVERRIDE; + ImageDecoder newDecoder() const CV_OVERRIDE; + size_t signatureLength() const CV_OVERRIDE; protected: String m_signature_alt; FILE *file; }; // ... writer -class HdrEncoder : public BaseImageEncoder +class HdrEncoder CV_FINAL : public BaseImageEncoder { public: HdrEncoder(); - ~HdrEncoder(); - bool write( const Mat& img, const std::vector& params ); - ImageEncoder newEncoder() const; - bool isFormatSupported( int depth ) const; + ~HdrEncoder() CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; + ImageEncoder newEncoder() const CV_OVERRIDE; + bool isFormatSupported( int depth ) const CV_OVERRIDE; protected: }; } -#endif/*_GRFMT_HDR_H_*/ \ No newline at end of file +#endif/*_GRFMT_HDR_H_*/ diff --git a/modules/imgcodecs/src/grfmt_jpeg.hpp b/modules/imgcodecs/src/grfmt_jpeg.hpp index 628dd166e2..90d80b4b59 100644 --- a/modules/imgcodecs/src/grfmt_jpeg.hpp +++ b/modules/imgcodecs/src/grfmt_jpeg.hpp @@ -53,18 +53,18 @@ namespace cv { -class JpegDecoder : public BaseImageDecoder +class JpegDecoder CV_FINAL : public BaseImageDecoder { public: JpegDecoder(); virtual ~JpegDecoder(); - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -77,14 +77,14 @@ private: }; -class JpegEncoder : public BaseImageEncoder +class JpegEncoder CV_FINAL : public BaseImageEncoder { public: JpegEncoder(); virtual ~JpegEncoder(); - bool write( const Mat& img, const std::vector& params ); - ImageEncoder newEncoder() const; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/grfmt_jpeg2000.hpp b/modules/imgcodecs/src/grfmt_jpeg2000.hpp index 0c0954f8b3..586f16f0fa 100644 --- a/modules/imgcodecs/src/grfmt_jpeg2000.hpp +++ b/modules/imgcodecs/src/grfmt_jpeg2000.hpp @@ -50,17 +50,17 @@ namespace cv { -class Jpeg2KDecoder : public BaseImageDecoder +class Jpeg2KDecoder CV_FINAL : public BaseImageDecoder { public: Jpeg2KDecoder(); virtual ~Jpeg2KDecoder(); - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: bool readComponent8u( uchar *data, void *buffer, int step, int cmpt, @@ -73,15 +73,15 @@ protected: }; -class Jpeg2KEncoder : public BaseImageEncoder +class Jpeg2KEncoder CV_FINAL : public BaseImageEncoder { public: Jpeg2KEncoder(); virtual ~Jpeg2KEncoder(); - bool isFormatSupported( int depth ) const; - bool write( const Mat& img, const std::vector& params ); - ImageEncoder newEncoder() const; + bool isFormatSupported( int depth ) const CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; + ImageEncoder newEncoder() const CV_OVERRIDE; protected: bool writeComponent8u( void *img, const Mat& _img ); diff --git a/modules/imgcodecs/src/grfmt_pam.hpp b/modules/imgcodecs/src/grfmt_pam.hpp index 8b3b1f10c9..3b740e3692 100644 --- a/modules/imgcodecs/src/grfmt_pam.hpp +++ b/modules/imgcodecs/src/grfmt_pam.hpp @@ -59,19 +59,19 @@ namespace cv { -class PAMDecoder : public BaseImageDecoder +class PAMDecoder CV_FINAL : public BaseImageDecoder { public: PAMDecoder(); - virtual ~PAMDecoder(); + virtual ~PAMDecoder() CV_OVERRIDE; - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; - size_t signatureLength() const; - bool checkSignature( const String& signature ) const; - ImageDecoder newDecoder() const; + size_t signatureLength() const CV_OVERRIDE; + bool checkSignature( const String& signature ) const CV_OVERRIDE; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -82,18 +82,18 @@ protected: }; -class PAMEncoder : public BaseImageEncoder +class PAMEncoder CV_FINAL : public BaseImageEncoder { public: PAMEncoder(); - virtual ~PAMEncoder(); + virtual ~PAMEncoder() CV_OVERRIDE; - bool isFormatSupported( int depth ) const; - bool write( const Mat& img, const std::vector& params ); + bool isFormatSupported( int depth ) const CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } -#endif /* _OPENCV_PAM_HPP_ */ \ No newline at end of file +#endif /* _OPENCV_PAM_HPP_ */ diff --git a/modules/imgcodecs/src/grfmt_png.hpp b/modules/imgcodecs/src/grfmt_png.hpp index 3a3d004ffd..3d8d1a764a 100644 --- a/modules/imgcodecs/src/grfmt_png.hpp +++ b/modules/imgcodecs/src/grfmt_png.hpp @@ -51,18 +51,18 @@ namespace cv { -class PngDecoder : public BaseImageDecoder +class PngDecoder CV_FINAL : public BaseImageDecoder { public: PngDecoder(); virtual ~PngDecoder(); - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -78,16 +78,16 @@ protected: }; -class PngEncoder : public BaseImageEncoder +class PngEncoder CV_FINAL : public BaseImageEncoder { public: PngEncoder(); virtual ~PngEncoder(); - bool isFormatSupported( int depth ) const; - bool write( const Mat& img, const std::vector& params ); + bool isFormatSupported( int depth ) const CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; protected: static void writeDataToBuf(void* png_ptr, uchar* src, size_t size); diff --git a/modules/imgcodecs/src/grfmt_pxm.hpp b/modules/imgcodecs/src/grfmt_pxm.hpp index 3c7100b7d8..b4d5ad08fa 100644 --- a/modules/imgcodecs/src/grfmt_pxm.hpp +++ b/modules/imgcodecs/src/grfmt_pxm.hpp @@ -57,20 +57,20 @@ enum PxMMode PXM_TYPE_PPM = 3 // color format }; -class PxMDecoder : public BaseImageDecoder +class PxMDecoder CV_FINAL : public BaseImageDecoder { public: PxMDecoder(); - virtual ~PxMDecoder(); + virtual ~PxMDecoder() CV_OVERRIDE; - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - size_t signatureLength() const; - bool checkSignature( const String& signature ) const; - ImageDecoder newDecoder() const; + size_t signatureLength() const CV_OVERRIDE; + bool checkSignature( const String& signature ) const CV_OVERRIDE; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -82,16 +82,16 @@ protected: int m_maxval; }; -class PxMEncoder : public BaseImageEncoder +class PxMEncoder CV_FINAL : public BaseImageEncoder { public: PxMEncoder(PxMMode mode); - virtual ~PxMEncoder(); + virtual ~PxMEncoder() CV_OVERRIDE; - bool isFormatSupported( int depth ) const; - bool write( const Mat& img, const std::vector& params ); + bool isFormatSupported( int depth ) const CV_OVERRIDE; + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - ImageEncoder newEncoder() const + ImageEncoder newEncoder() const CV_OVERRIDE { return makePtr(mode_); } diff --git a/modules/imgcodecs/src/grfmt_sunras.hpp b/modules/imgcodecs/src/grfmt_sunras.hpp index ef09f9b1f9..ecd5c743fc 100644 --- a/modules/imgcodecs/src/grfmt_sunras.hpp +++ b/modules/imgcodecs/src/grfmt_sunras.hpp @@ -64,18 +64,18 @@ enum SunRasMapType // Sun Raster Reader -class SunRasterDecoder : public BaseImageDecoder +class SunRasterDecoder CV_FINAL : public BaseImageDecoder { public: SunRasterDecoder(); - virtual ~SunRasterDecoder(); + virtual ~SunRasterDecoder() CV_OVERRIDE; - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: @@ -89,15 +89,15 @@ protected: }; -class SunRasterEncoder : public BaseImageEncoder +class SunRasterEncoder CV_FINAL : public BaseImageEncoder { public: SunRasterEncoder(); - virtual ~SunRasterEncoder(); + virtual ~SunRasterEncoder() CV_OVERRIDE; - bool write( const Mat& img, const std::vector& params ); + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/grfmt_tiff.hpp b/modules/imgcodecs/src/grfmt_tiff.hpp index eb0756f4d6..cd1b55ed02 100644 --- a/modules/imgcodecs/src/grfmt_tiff.hpp +++ b/modules/imgcodecs/src/grfmt_tiff.hpp @@ -90,20 +90,20 @@ enum TiffFieldType // libtiff based TIFF codec -class TiffDecoder : public BaseImageDecoder +class TiffDecoder CV_FINAL : public BaseImageDecoder { public: TiffDecoder(); - virtual ~TiffDecoder(); + virtual ~TiffDecoder() CV_OVERRIDE; - bool readHeader(); - bool readData( Mat& img ); + bool readHeader() CV_OVERRIDE; + bool readData( Mat& img ) CV_OVERRIDE; void close(); - bool nextPage(); + bool nextPage() CV_OVERRIDE; - size_t signatureLength() const; - bool checkSignature( const String& signature ) const; - ImageDecoder newDecoder() const; + size_t signatureLength() const CV_OVERRIDE; + bool checkSignature( const String& signature ) const CV_OVERRIDE; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: void* m_tif; @@ -119,19 +119,19 @@ private: }; // ... and writer -class TiffEncoder : public BaseImageEncoder +class TiffEncoder CV_FINAL : public BaseImageEncoder { public: TiffEncoder(); - virtual ~TiffEncoder(); + virtual ~TiffEncoder() CV_OVERRIDE; - bool isFormatSupported( int depth ) const; + bool isFormatSupported( int depth ) const CV_OVERRIDE; - bool write( const Mat& img, const std::vector& params ); + bool write( const Mat& img, const std::vector& params ) CV_OVERRIDE; - bool writemulti(const std::vector& img_vec, const std::vector& params); + bool writemulti(const std::vector& img_vec, const std::vector& params) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; protected: void writeTag( WLByteStream& strm, TiffTag tag, diff --git a/modules/imgcodecs/src/grfmt_webp.hpp b/modules/imgcodecs/src/grfmt_webp.hpp index ea692bf8d2..79e041b212 100644 --- a/modules/imgcodecs/src/grfmt_webp.hpp +++ b/modules/imgcodecs/src/grfmt_webp.hpp @@ -52,36 +52,36 @@ namespace cv { -class WebPDecoder : public BaseImageDecoder +class WebPDecoder CV_FINAL : public BaseImageDecoder { public: WebPDecoder(); - ~WebPDecoder(); + ~WebPDecoder() CV_OVERRIDE; - bool readData( Mat& img ); - bool readHeader(); + bool readData( Mat& img ) CV_OVERRIDE; + bool readHeader() CV_OVERRIDE; void close(); - size_t signatureLength() const; - bool checkSignature( const String& signature) const; + size_t signatureLength() const CV_OVERRIDE; + bool checkSignature( const String& signature) const CV_OVERRIDE; - ImageDecoder newDecoder() const; + ImageDecoder newDecoder() const CV_OVERRIDE; protected: Mat data; int channels; }; -class WebPEncoder : public BaseImageEncoder +class WebPEncoder CV_FINAL : public BaseImageEncoder { public: WebPEncoder(); - ~WebPEncoder(); + ~WebPEncoder() CV_OVERRIDE; - bool write(const Mat& img, const std::vector& params); + bool write(const Mat& img, const std::vector& params) CV_OVERRIDE; - ImageEncoder newEncoder() const; + ImageEncoder newEncoder() const CV_OVERRIDE; }; } diff --git a/modules/imgcodecs/src/loadsave.cpp b/modules/imgcodecs/src/loadsave.cpp index 814d307748..c2042b8ae9 100644 --- a/modules/imgcodecs/src/loadsave.cpp +++ b/modules/imgcodecs/src/loadsave.cpp @@ -89,7 +89,7 @@ public: protected: virtual pos_type seekoff( off_type offset, std::ios_base::seekdir dir, - std::ios_base::openmode ) + std::ios_base::openmode ) CV_OVERRIDE { char* whence = eback(); if (dir == std::ios_base::cur)