From: Mikko Rasa Date: Mon, 4 Dec 2017 14:28:15 +0000 (+0200) Subject: Add stub implementations of the pure virtual functions to Asset X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=7ad451f4b5e4352d15165f472a00cf33957a1687 Add stub implementations of the pure virtual functions to Asset --- diff --git a/source/io/asset.cpp b/source/io/asset.cpp index a5ce175..526133e 100644 --- a/source/io/asset.cpp +++ b/source/io/asset.cpp @@ -1,12 +1,29 @@ #include "asset.h" +using namespace std; + namespace Msp { namespace IO { +void Asset::set_block(bool) +{ + throw logic_error("Asset::set_block"); +} + +void Asset::set_inherit(bool) +{ + throw logic_error("Asset::set_inherit"); +} + unsigned Asset::do_write(const char *, unsigned) { throw invalid_access(M_WRITE); } +const Handle &Asset::get_handle(Mode) +{ + throw logic_error("Asset::get_handle"); +} + } // namespace IO } // namespace Msp diff --git a/source/io/asset.h b/source/io/asset.h index d1d63b5..c5b98cb 100644 --- a/source/io/asset.h +++ b/source/io/asset.h @@ -22,11 +22,16 @@ public: Asset(const std::string &); ~Asset(); + virtual void set_block(bool); + virtual void set_inherit(bool); + private: virtual unsigned do_write(const char *, unsigned); virtual unsigned do_read(char *, unsigned); public: + virtual const Handle &get_handle(Mode); + virtual SeekOffset seek(SeekOffset, SeekType); virtual SeekOffset tell() const; };