#ifndef MSP_IO_SLICE_H_
#define MSP_IO_SLICE_H_
+#include <msp/core/mspcore_api.h>
#include "seekable.h"
namespace Msp {
restore it before the next access. This enables multiple Slices to be created
on top of the same object.
*/
-class Slice: public Seekable, public sigc::trackable
+class MSPCORE_API Slice: public Seekable, public sigc::trackable
{
private:
Seekable &below;
public:
Slice(Seekable &, SeekOffset, SeekOffset);
- virtual void set_block(bool);
- virtual void set_inherit(bool);
+ void set_block(bool) override;
+ void set_inherit(bool) override;
private:
void flush();
unsigned prepare_op(unsigned, Mode);
protected:
- virtual std::size_t do_write(const char *, std::size_t);
- virtual std::size_t do_read(char *, std::size_t);
+ std::size_t do_write(const char *, std::size_t) override;
+ std::size_t do_read(char *, std::size_t) override;
public:
- virtual std::size_t put(char);
- virtual int get();
+ std::size_t put(char) override;
+ int get() override;
- virtual const Handle &get_handle(Mode);
+ const Handle &get_handle(Mode) override;
- virtual SeekOffset seek(SeekOffset, SeekType);
- virtual SeekOffset tell() const { return position; }
+ SeekOffset seek(SeekOffset, SeekType) override;
+ SeekOffset tell() const override { return position; }
};
} // namespace IO