From 7ad451f4b5e4352d15165f472a00cf33957a1687 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 4 Dec 2017 16:28:15 +0200 Subject: [PATCH] Add stub implementations of the pure virtual functions to Asset --- source/io/asset.cpp | 17 +++++++++++++++++ source/io/asset.h | 5 +++++ 2 files changed, 22 insertions(+) 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; }; -- 2.45.2