X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbuffered.cpp;h=6567fff9b3739e4fabf8abb1f2a706a98e0d5d85;hp=f53d2fc23fa49e38ede87da0188b40d3cfeadb50;hb=481b844ed7d180ffbf70223075f2fc1ffdb5b444;hpb=6e0fd758970bcb5bad5e3f2454b694cc4d7b4b66 diff --git a/source/io/buffered.cpp b/source/io/buffered.cpp index f53d2fc..6567fff 100644 --- a/source/io/buffered.cpp +++ b/source/io/buffered.cpp @@ -1,6 +1,7 @@ #include +#include #include "buffered.h" -#include "except.h" +#include "handle.h" using namespace std; @@ -31,6 +32,11 @@ Buffered::~Buffered() delete[] buf; } +void Buffered::set_block(bool) +{ + throw logic_error("Buffered::set_block"); +} + void Buffered::flush() { if(cur_op==M_WRITE) @@ -40,14 +46,14 @@ void Buffered::flush() { unsigned len = below.write(begin, used); - begin=end = buf; + begin = end = buf; if(len(c); } +const Handle &Buffered::get_handle(Mode) +{ + throw logic_error("Buffered::get_handle"); +} + void Buffered::set_op(Mode op) { if(op!=cur_op) @@ -179,10 +190,5 @@ unsigned Buffered::get_current_size() const return end-begin; } -Handle Buffered::get_event_handle() -{ - throw Exception("Buffered doesn't support events"); -} - } // namespace IO } // namespace Msp