1 #ifndef MSP_IO_SEEKABLE_H_
2 #define MSP_IO_SEEKABLE_H_
13 typedef std::int64_t SeekOffset;
23 class bad_seek: public std::runtime_error
26 bad_seek(SeekOffset, SeekType);
27 virtual ~bad_seek() throw() = default;
31 class Seekable: public Base
37 /** Changes the read/write offset. Returns the new offset. */
38 virtual SeekOffset seek(SeekOffset, SeekType) = 0;
40 /** Returns the current read/write offset. */
41 virtual SeekOffset tell() const = 0;
45 SeekOffset sys_seek(Handle &, SeekOffset, SeekType);