X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fseekable.h;h=84a556163e764e40ed837703434a01dfd60fe9a9;hb=85ef592fb1eab68283b12607701e4fb9b9014630;hp=1fc3f89ed58576fd73c1b68527b51f80133c1f1d;hpb=95bd04e16acacde19fcfdcc722baf72b06dcdfee;p=libs%2Fcore.git diff --git a/source/io/seekable.h b/source/io/seekable.h index 1fc3f89..84a5561 100644 --- a/source/io/seekable.h +++ b/source/io/seekable.h @@ -1,7 +1,8 @@ #ifndef MSP_IO_SEEKABLE_H_ #define MSP_IO_SEEKABLE_H_ -#include +#include +#include #include "base.h" namespace Msp { @@ -9,7 +10,7 @@ namespace IO { class Handle; -typedef Int64 SeekOffset; +typedef std::int64_t SeekOffset; enum SeekType { @@ -19,10 +20,18 @@ enum SeekType }; +class bad_seek: public std::runtime_error +{ +public: + bad_seek(SeekOffset, SeekType); + ~bad_seek() throw() override = default; +}; + + class Seekable: public Base { protected: - Seekable() { } + Seekable() = default; public: /** Changes the read/write offset. Returns the new offset. */