]>
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)
6 // Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_
11 #define _WX_MSW_PRIVATE_PIPESTREAM_H_
13 class wxPipeInputStream
: public wxInputStream
16 wxEXPLICIT
wxPipeInputStream(HANDLE hInput
);
17 virtual ~wxPipeInputStream();
19 // returns true if the pipe is still opened
20 bool IsOpened() const { return m_hInput
!= INVALID_HANDLE_VALUE
; }
22 // returns true if there is any data to be read from the pipe
23 virtual bool CanRead() const;
26 virtual size_t OnSysRead(void *buffer
, size_t len
);
31 wxDECLARE_NO_COPY_CLASS(wxPipeInputStream
);
34 class wxPipeOutputStream
: public wxOutputStream
37 wxEXPLICIT
wxPipeOutputStream(HANDLE hOutput
);
38 virtual ~wxPipeOutputStream() { Close(); }
42 size_t OnSysWrite(const void *buffer
, size_t len
);
47 wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream
);
50 #endif // _WX_MSW_PRIVATE_PIPESTREAM_H_