zlibstream.cxx: explicitly mark as virtual the inherited virtual methods
Since the virtuality of a method is inherited by derived classes, this makes the virtual status of such methods clearly visible in the declarations of derived classes.
This commit is contained in:
@@ -161,7 +161,7 @@ public:
|
|||||||
|
|
||||||
ZlibAbstractIStreambuf(const ZlibAbstractIStreambuf&) = delete;
|
ZlibAbstractIStreambuf(const ZlibAbstractIStreambuf&) = delete;
|
||||||
ZlibAbstractIStreambuf& operator=(const ZlibAbstractIStreambuf&) = delete;
|
ZlibAbstractIStreambuf& operator=(const ZlibAbstractIStreambuf&) = delete;
|
||||||
~ZlibAbstractIStreambuf();
|
virtual ~ZlibAbstractIStreambuf();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum class OperationType {
|
enum class OperationType {
|
||||||
@@ -194,12 +194,12 @@ protected:
|
|||||||
private:
|
private:
|
||||||
// Callback whose role is to refill the output buffer when it's empty and
|
// Callback whose role is to refill the output buffer when it's empty and
|
||||||
// the “client” tries to read more.
|
// the “client” tries to read more.
|
||||||
int underflow() override;
|
virtual int underflow() override;
|
||||||
// Optional override when subclassing std::streambuf. This is the most
|
// Optional override when subclassing std::streambuf. This is the most
|
||||||
// efficient way of reading several characters (as soon as we've emptied the
|
// efficient way of reading several characters (as soon as we've emptied the
|
||||||
// output buffer, data is written by zlib directly to the destination
|
// output buffer, data is written by zlib directly to the destination
|
||||||
// buffer).
|
// buffer).
|
||||||
std::streamsize xsgetn(char* dest, std::streamsize n) override;
|
virtual std::streamsize xsgetn(char* dest, std::streamsize n) override;
|
||||||
// Utility method for xsgetn()
|
// Utility method for xsgetn()
|
||||||
std::size_t xsgetn_preparePutbackArea(char* origGptr, char* dest,
|
std::size_t xsgetn_preparePutbackArea(char* origGptr, char* dest,
|
||||||
char* writePtr);
|
char* writePtr);
|
||||||
@@ -321,15 +321,15 @@ public:
|
|||||||
|
|
||||||
ZlibCompressorIStreambuf(const ZlibCompressorIStreambuf&) = delete;
|
ZlibCompressorIStreambuf(const ZlibCompressorIStreambuf&) = delete;
|
||||||
ZlibCompressorIStreambuf& operator=(const ZlibCompressorIStreambuf&) = delete;
|
ZlibCompressorIStreambuf& operator=(const ZlibCompressorIStreambuf&) = delete;
|
||||||
~ZlibCompressorIStreambuf();
|
virtual ~ZlibCompressorIStreambuf();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OperationType operationType() const override;
|
virtual OperationType operationType() const override;
|
||||||
// Initialize the z_stream struct used by zlib
|
// Initialize the z_stream struct used by zlib
|
||||||
void zStreamInit(int compressionLevel, ZLibCompressionFormat format,
|
void zStreamInit(int compressionLevel, ZLibCompressionFormat format,
|
||||||
ZLibMemoryStrategy memStrategy);
|
ZLibMemoryStrategy memStrategy);
|
||||||
// Call zlib's deflate() function to compress data.
|
// Call zlib's deflate() function to compress data.
|
||||||
int zlibProcessData() override;
|
virtual int zlibProcessData() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -371,12 +371,12 @@ public:
|
|||||||
ZlibDecompressorIStreambuf(const ZlibDecompressorIStreambuf&) = delete;
|
ZlibDecompressorIStreambuf(const ZlibDecompressorIStreambuf&) = delete;
|
||||||
ZlibDecompressorIStreambuf& operator=(const ZlibDecompressorIStreambuf&)
|
ZlibDecompressorIStreambuf& operator=(const ZlibDecompressorIStreambuf&)
|
||||||
= delete;
|
= delete;
|
||||||
~ZlibDecompressorIStreambuf();
|
virtual ~ZlibDecompressorIStreambuf();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
OperationType operationType() const override;
|
virtual OperationType operationType() const override;
|
||||||
void zStreamInit(ZLibCompressionFormat format);
|
void zStreamInit(ZLibCompressionFormat format);
|
||||||
int zlibProcessData() override;
|
virtual int zlibProcessData() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
// std::istream subclass for compressing data. Input data is obtained from an
|
// std::istream subclass for compressing data. Input data is obtained from an
|
||||||
@@ -421,7 +421,7 @@ public:
|
|||||||
|
|
||||||
ZlibCompressorIStream(const ZlibCompressorIStream&) = delete;
|
ZlibCompressorIStream(const ZlibCompressorIStream&) = delete;
|
||||||
ZlibCompressorIStream& operator=(const ZlibCompressorIStream&) = delete;
|
ZlibCompressorIStream& operator=(const ZlibCompressorIStream&) = delete;
|
||||||
~ZlibCompressorIStream();
|
virtual ~ZlibCompressorIStream();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ZlibCompressorIStreambuf _streamBuf;
|
ZlibCompressorIStreambuf _streamBuf;
|
||||||
@@ -465,7 +465,7 @@ public:
|
|||||||
|
|
||||||
ZlibDecompressorIStream(const ZlibDecompressorIStream&) = delete;
|
ZlibDecompressorIStream(const ZlibDecompressorIStream&) = delete;
|
||||||
ZlibDecompressorIStream& operator=(const ZlibDecompressorIStream&) = delete;
|
ZlibDecompressorIStream& operator=(const ZlibDecompressorIStream&) = delete;
|
||||||
~ZlibDecompressorIStream();
|
virtual ~ZlibDecompressorIStream();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ZlibDecompressorIStreambuf _streamBuf;
|
ZlibDecompressorIStreambuf _streamBuf;
|
||||||
|
|||||||
Reference in New Issue
Block a user