X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fpipe.cpp;h=639743f4ca79cab6ad1733383d69e5ff77e9556b;hp=3b74a0f2b6bea34ed7ca0a49991781de6331d6f8;hb=f041a31f9a6e19da86a63912e5a8050f216e5bc5;hpb=5b541316a8c7bbf8b812c0f1e2dbebaa6563b0ee diff --git a/source/io/pipe.cpp b/source/io/pipe.cpp index 3b74a0f..639743f 100644 --- a/source/io/pipe.cpp +++ b/source/io/pipe.cpp @@ -86,5 +86,15 @@ unsigned Pipe::do_read(char *buf, unsigned size) return ret; } +const Handle &Pipe::get_handle(Mode m) +{ + if(m==M_READ) + return read_handle; + else if(m==M_WRITE) + return write_handle; + else + throw invalid_argument("Pipe::get_handle"); +} + } // namespace IO } // namespace Msp