]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stream.h
simplify the client data/non standard images handling code by unconditionally using...
[wxWidgets.git] / include / wx / stream.h
index 2c09e62a79aa21dc736507164ff134d1dd05215f..ca3b84eb57ebee606bc297bfab7f9cfb4199697a 100644 (file)
@@ -42,19 +42,6 @@ enum wxStreamError
     wxSTREAM_READ_ERROR         // generic read error
 };
 
-// compatibility
-#if WXWIN_COMPATIBILITY_2_2
-    #define wxStream_NOERROR    wxSTREAM_NOERROR
-    #define wxStream_EOF        wxSTREAM_EOF
-    #define wxStream_WRITE_ERR  wxSTREAM_WRITE_ERROR
-    #define wxStream_READ_ERR   wxSTREAM_READ_ERROR
-
-    #define wxSTREAM_NO_ERR     wxSTREAM_NO_ERROR
-    #define wxSTREAM_NOERROR    wxSTREAM_NO_ERROR
-    #define wxSTREAM_WRITE_ERR  wxSTREAM_WRITE_ERROR
-    #define wxSTREAM_READ_ERR   wxSTREAM_READ_ERROR
-#endif // WXWIN_COMPATIBILITY_2_2
-
 // ============================================================================
 // base stream classes: wxInputStream and wxOutputStream
 // ============================================================================
@@ -84,24 +71,6 @@ public:
     // returns true if the streams supports seeking to arbitrary offsets
     virtual bool IsSeekable() const { return false; }
 
-#if WXWIN_COMPATIBILITY_2_2
-    // deprecated, for compatibility only
-    wxDEPRECATED( wxStreamError LastError() const );
-    wxDEPRECATED( size_t StreamSize() const );
-#endif // WXWIN_COMPATIBILITY_2_2
-
-
-    // Reserved for future use
-    virtual void ReservedStreamFunc1() {}
-    virtual void ReservedStreamFunc2() {}
-    virtual void ReservedStreamFunc3() {}
-    virtual void ReservedStreamFunc4() {}
-    virtual void ReservedStreamFunc5() {}
-    virtual void ReservedStreamFunc6() {}
-    virtual void ReservedStreamFunc7() {}
-    virtual void ReservedStreamFunc8() {}
-    virtual void ReservedStreamFunc9() {}
-
 protected:
     virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode);
     virtual wxFileOffset OnSysTell() const;
@@ -419,8 +388,10 @@ public:
     wxInputStream *GetInputStream() const;
     wxOutputStream *GetOutputStream() const;
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBase *Stream() { return m_stream; }
+    wxDEPRECATED( wxStreamBase *Stream() );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // this constructs a dummy wxStreamBuffer, used by (and exists for)
     // wxMemoryStreams only, don't use!
@@ -496,8 +467,10 @@ public:
     void SetInputStreamBuffer(wxStreamBuffer *buffer);
     wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBuffer *InputStreamBuffer() const { return m_i_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *InputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     virtual size_t OnSysRead(void *buffer, size_t bufsize);
@@ -537,8 +510,10 @@ public:
     void SetOutputStreamBuffer(wxStreamBuffer *buffer);
     wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; }
 
+#if WXWIN_COMPATIBILITY_2_6
     // deprecated, for compatibility only
-    wxStreamBuffer *OutputStreamBuffer() const { return m_o_streambuf; }
+    wxDEPRECATED( wxStreamBuffer *OutputStreamBuffer() const );
+#endif // WXWIN_COMPATIBILITY_2_6
 
 protected:
     virtual size_t OnSysWrite(const void *buffer, size_t bufsize);
@@ -550,7 +525,12 @@ protected:
     DECLARE_NO_COPY_CLASS(wxBufferedOutputStream)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    inline wxStreamBase *wxStreamBuffer::Stream() { return m_stream; }
+    inline wxStreamBuffer *wxBufferedInputStream::InputStreamBuffer() const { return m_i_streambuf; }
+    inline wxStreamBuffer *wxBufferedOutputStream::OutputStreamBuffer() const { return m_o_streambuf; }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif // wxUSE_STREAMS
 
 #endif // _WX_WXSTREAM_H__
-