X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fzlibcompressed.h;h=eb35f6ce1b8c7c7b33e25cf86f39d36f83b8f782;hp=7a7973425bdcc573f48b65b838b062adf416b6d5;hb=HEAD;hpb=41363aed34382386f915f17c1a961750b4fdcb14 diff --git a/source/io/zlibcompressed.h b/source/io/zlibcompressed.h index 7a79734..1dc1569 100644 --- a/source/io/zlibcompressed.h +++ b/source/io/zlibcompressed.h @@ -4,21 +4,21 @@ #include #include #include +#include #include "base.h" namespace Msp { namespace IO { -class zlib_error: public std::runtime_error +class MSPCORE_API zlib_error: public std::runtime_error { private: int m_code; public: zlib_error(const std::string &, int); - virtual ~zlib_error() throw() = default; - int code() const throw() { return m_code; } + int code() const noexcept { return m_code; } }; /** @@ -28,7 +28,7 @@ operates on top of another I/O object. To ensure proper termination of the compressed data stream, the ZlibCompressed object must be destroyed before the underlying object is closed. */ -class ZlibCompressed: public Base, public sigc::trackable +class MSPCORE_API ZlibCompressed: public Base, public sigc::trackable { private: struct Private; @@ -50,15 +50,15 @@ public: write, and compatible with the underlying object. */ ZlibCompressed(Base &, Mode, unsigned level = 9); - virtual ~ZlibCompressed(); + ~ZlibCompressed() override; - virtual void set_block(bool); - virtual void set_inherit(bool); + void set_block(bool) override; + void set_inherit(bool) override; void flush(); protected: - virtual std::size_t do_write(const char *, std::size_t); + std::size_t do_write(const char *, std::size_t) override; private: /** Compresses data and writes it to the underlying object. Returns true if @@ -68,9 +68,9 @@ private: bool compress_data(int flush_mode); public: - virtual std::size_t do_read(char *, std::size_t); + std::size_t do_read(char *, std::size_t) override; - virtual const Handle &get_handle(Mode); + const Handle &get_handle(Mode) override; }; } // namespace IO