]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/pipe.cpp
Implement get_handle in File and Pipe
[libs/core.git] / source / io / pipe.cpp
index 3b74a0f2b6bea34ed7ca0a49991781de6331d6f8..639743f4ca79cab6ad1733383d69e5ff77e9556b 100644 (file)
@@ -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