]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/unix/private/pipestream.h
e57b4d360e7ed16f122afe4f85e81fb2a6351360
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/private/pipestream.h
3 // Purpose: Unix wxPipeInputStream and wxPipeOutputStream declarations
4 // Author: Vadim Zeitlin
5 // Created: 2013-06-08 (extracted from wx/unix/pipe.h)
7 // Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_UNIX_PRIVATE_PIPESTREAM_H_
12 #define _WX_UNIX_PRIVATE_PIPESTREAM_H_
14 #include "wx/wfstream.h"
16 class wxPipeInputStream
: public wxFileInputStream
19 wxEXPLICIT
wxPipeInputStream(int fd
) : wxFileInputStream(fd
) { }
21 // return true if the pipe is still opened
22 bool IsOpened() const { return !Eof(); }
24 // return true if we have anything to read, don't block
25 virtual bool CanRead() const;
28 class wxPipeOutputStream
: public wxFileOutputStream
31 wxPipeOutputStream(int fd
) : wxFileOutputStream(fd
) { }
33 // Override the base class version to ignore "pipe full" errors: this is
34 // not an error for this class.
35 size_t OnSysWrite(const void *buffer
, size_t size
);
38 #endif // _WX_UNIX_PRIVATE_PIPESTREAM_H_