]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/pipestream.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/private/pipestream.h
3 // Purpose: MSW wxPipeInputStream and wxPipeOutputStream declarations
4 // Author: Vadim Zeitlin
5 // Created: 2013-06-08 (extracted from src/msw/utilsexc.cpp)
7 // Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_
12 #define _WX_MSW_PRIVATE_PIPESTREAM_H_
14 class wxPipeInputStream
: public wxInputStream
17 wxEXPLICIT
wxPipeInputStream(HANDLE hInput
);
18 virtual ~wxPipeInputStream();
20 // returns true if the pipe is still opened
21 bool IsOpened() const { return m_hInput
!= INVALID_HANDLE_VALUE
; }
23 // returns true if there is any data to be read from the pipe
24 virtual bool CanRead() const;
27 virtual size_t OnSysRead(void *buffer
, size_t len
);
32 wxDECLARE_NO_COPY_CLASS(wxPipeInputStream
);
35 class wxPipeOutputStream
: public wxOutputStream
38 wxEXPLICIT
wxPipeOutputStream(HANDLE hOutput
);
39 virtual ~wxPipeOutputStream() { Close(); }
43 size_t OnSysWrite(const void *buffer
, size_t len
);
48 wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream
);
51 #endif // _WX_MSW_PRIVATE_PIPESTREAM_H_