+ char *m_wback;
+ size_t m_wbacksize, m_wbackcur;
+
+ bool m_fixed, m_flushable;
+
+ wxStreamBase *m_stream;
+ BufMode m_mode;
+ bool m_destroybuf, m_destroystream;
+};
+
+// ---------------------------------------------------------------------------
+// wxStream: base classes
+// ---------------------------------------------------------------------------
+
+typedef enum {
+ wxStream_NOERROR = 0,
+ wxStream_EOF,
+ wxStream_WRITE_ERR,
+ wxStream_READ_ERR
+} wxStreamError;
+
+class WXDLLEXPORT wxStreamBase {
+ public:
+ wxStreamBase();
+ virtual ~wxStreamBase();
+
+ wxStreamError LastError() const { return m_lasterror; }
+ virtual size_t StreamSize() const { return ~((size_t)0); }
+
+ protected:
+ friend class wxStreamBuffer;
+
+ virtual size_t OnSysRead(void *buffer, size_t bufsize);
+ virtual size_t OnSysWrite(const void *buffer, size_t bufsize);
+ virtual off_t OnSysSeek(off_t seek, wxSeekMode mode);
+ virtual off_t OnSysTell() const;
+
+ protected:
+ size_t m_lastcount;
+ wxStreamError m_lasterror;