X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbuffered.cpp;h=2836e4bbbaeb879de07be26bf5fba2ecea8fcad9;hp=f53d2fc23fa49e38ede87da0188b40d3cfeadb50;hb=be8ea216d23bf36bdfb2d3e302638782575fc136;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848 diff --git a/source/io/buffered.cpp b/source/io/buffered.cpp index f53d2fc..2836e4b 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,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 Exception("Buffered doesn't support events"); -} - } // namespace IO } // namespace Msp