]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stream.h
removed obsolete build files which are likely to confuse more than help people now
[wxWidgets.git] / include / wx / stream.h
index 8bfb43686d96ee2201993df52387ea4a4df61a15..ca3b84eb57ebee606bc297bfab7f9cfb4199697a 100644 (file)
 #ifndef _WX_WXSTREAM_H__
 #define _WX_WXSTREAM_H__
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "stream.h"
-#endif
-
 #include "wx/defs.h"
 
 #if wxUSE_STREAMS
@@ -46,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
 // ============================================================================
@@ -88,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;
@@ -223,7 +188,7 @@ public:
 protected:
     // do read up to size bytes of data into the provided buffer
     //
-    // this method should return 0 if EOF has been reached or an error occured
+    // this method should return 0 if EOF has been reached or an error occurred
     // (m_lasterror should be set accordingly as well) or the number of bytes
     // read
     virtual size_t OnSysRead(void *buffer, size_t size) = 0;
@@ -423,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!
@@ -500,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);
@@ -541,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);
@@ -554,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__
-