X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbuffered.cpp;h=2836e4bbbaeb879de07be26bf5fba2ecea8fcad9;hp=f72522361b1d013d8f79d21fedefff910d0b1c1c;hb=ea8bf8f588310b0d7fd3297d74907602705bba1d;hpb=8f2711fba7a2817840038630d9cf9a2060ecbe8e diff --git a/source/io/buffered.cpp b/source/io/buffered.cpp index f725223..2836e4b 100644 --- a/source/io/buffered.cpp +++ b/source/io/buffered.cpp @@ -1,6 +1,7 @@ #include #include #include "buffered.h" +#include "handle.h" using namespace std; @@ -31,6 +32,16 @@ Buffered::~Buffered() delete[] buf; } +void Buffered::set_block(bool) +{ + throw logic_error("Buffered::set_block"); +} + +void Buffered::set_inherit(bool) +{ + throw logic_error("Buffered::set_block"); +} + void Buffered::flush() { if(cur_op==M_WRITE) @@ -40,14 +51,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 +195,5 @@ unsigned Buffered::get_current_size() const return end-begin; } -Handle Buffered::get_event_handle() -{ - throw logic_error("Buffered doesn't support events"); -} - } // namespace IO } // namespace Msp