X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fasset.h;h=41cf10ddc2dc44b8d5eb3aff934f65b8b617bbf2;hp=c5b98cbfe9abe764fe2945ee964daa904ad00d05;hb=HEAD;hpb=7ad451f4b5e4352d15165f472a00cf33957a1687 diff --git a/source/io/asset.h b/source/io/asset.h index c5b98cb..41cf10d 100644 --- a/source/io/asset.h +++ b/source/io/asset.h @@ -1,6 +1,7 @@ #ifndef MSP_IO_ASSET_H_ #define MSP_IO_ASSET_H_ +#include #include "seekable.h" namespace Msp { @@ -11,29 +12,29 @@ Opens a file from the application's assets. On Android, this means the assets contained within the APK. On other platfoms, assets are located in the directory indicated by FS::get_sys_data_dir(). Assets are always read-only. */ -class Asset: public Seekable +class MSPCORE_API Asset: public Seekable { private: struct Private; - Private *priv; + Private *priv = nullptr; public: Asset(const std::string &); ~Asset(); - virtual void set_block(bool); - virtual void set_inherit(bool); + void set_block(bool) override; + void set_inherit(bool) override; private: - virtual unsigned do_write(const char *, unsigned); - virtual unsigned do_read(char *, unsigned); + std::size_t do_write(const char *, std::size_t) override; + std::size_t do_read(char *, std::size_t) override; public: - virtual const Handle &get_handle(Mode); + const Handle &get_handle(Mode) override; - virtual SeekOffset seek(SeekOffset, SeekType); - virtual SeekOffset tell() const; + SeekOffset seek(SeekOffset, SeekType) override; + SeekOffset tell() const override; }; } // namespace IO