X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/184b5d99a5382cd7a19888c85aff11f8a21af2f6..28d52eed36a2b4ee6ea36b3c5d4861b3ea292074:/include/wx/stream.h diff --git a/include/wx/stream.h b/include/wx/stream.h index f70fb820ea..0872a9ba81 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -16,6 +16,10 @@ #pragma interface #endif +#include "wx/defs.h" + +#if wxUSE_STREAMS + #include #include "wx/object.h" #include "wx/string.h" @@ -114,8 +118,10 @@ class WXDLLEXPORT wxStreamBuffer { // --------------------------------------------------------------------------- typedef enum { - wxStream_NOERROR, - wxStream_EOF + wxStream_NOERROR = 0, + wxStream_EOF, + wxStream_WRITE_ERR, + wxStream_READ_ERR } wxStreamError; class WXDLLEXPORT wxStreamBase { @@ -148,7 +154,7 @@ class WXDLLEXPORT wxInputStream: public wxStreamBase { // IO functions virtual char Peek(); char GetC(); - wxInputStream& Read(void *buffer, size_t size); + virtual wxInputStream& Read(void *buffer, size_t size); wxInputStream& Read(wxOutputStream& stream_out); // Position functions @@ -189,7 +195,7 @@ class WXDLLEXPORT wxOutputStream: public wxStreamBase { wxOutputStream(wxStreamBuffer *sbuf); virtual ~wxOutputStream(); - wxOutputStream& Write(const void *buffer, size_t size); + virtual wxOutputStream& Write(const void *buffer, size_t size); wxOutputStream& Write(wxInputStream& stream_in); off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart); @@ -257,3 +263,7 @@ class WXDLLEXPORT wxFilterOutputStream: public wxOutputStream { }; #endif + // wxUSE_STREAMS + +#endif + // _WX_WXSTREAM_H__