X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bddd7a8d8953cf4c09e56c13e1bfcc594ba0267e..36b79d445d08e08776e721d71a832f38daa7fa8c:/include/wx/wfstream.h diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 753e46fed1..514d795fff 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -12,7 +12,7 @@ #ifndef _WX_WXFSTREAM_H__ #define _WX_WXFSTREAM_H__ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "wfstream.h" #endif @@ -37,7 +37,7 @@ class WXDLLIMPEXP_BASE wxFileInputStream: public wxInputStream { wxFileInputStream(int fd); ~wxFileInputStream(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -45,8 +45,8 @@ class WXDLLIMPEXP_BASE wxFileInputStream: public wxInputStream { wxFileInputStream(); size_t OnSysRead(void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -67,7 +67,7 @@ class WXDLLIMPEXP_BASE wxFileOutputStream: public wxOutputStream { // { return wxOutputStream::Write(buffer, size); } void Sync(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -75,8 +75,8 @@ class WXDLLIMPEXP_BASE wxFileOutputStream: public wxOutputStream { wxFileOutputStream(); size_t OnSysWrite(const void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -85,9 +85,14 @@ class WXDLLIMPEXP_BASE wxFileOutputStream: public wxOutputStream { DECLARE_NO_COPY_CLASS(wxFileOutputStream) }; -class WXDLLIMPEXP_BASE wxFileStream: public wxFileInputStream, public wxFileOutputStream { - public: - wxFileStream(const wxString& fileName); +class WXDLLIMPEXP_BASE wxFileStream : public wxFileInputStream, + public wxFileOutputStream +{ +public: + wxFileStream(const wxString& fileName); + +private: + DECLARE_NO_COPY_CLASS(wxFileStream) }; // ---------------------------------------------------------------------------- @@ -101,7 +106,7 @@ class WXDLLIMPEXP_BASE wxFFileInputStream: public wxInputStream { wxFFileInputStream(FILE *file); ~wxFFileInputStream(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -109,8 +114,8 @@ class WXDLLIMPEXP_BASE wxFFileInputStream: public wxInputStream { wxFFileInputStream(); size_t OnSysRead(void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFFile *m_file; @@ -131,7 +136,7 @@ class WXDLLIMPEXP_BASE wxFFileOutputStream: public wxOutputStream { // { return wxOutputStream::Write(buffer, size); } void Sync(); - size_t GetSize() const; + wxFileOffset GetLength() const; bool Ok() const { return m_file->IsOpened(); } @@ -139,8 +144,8 @@ class WXDLLIMPEXP_BASE wxFFileOutputStream: public wxOutputStream { wxFFileOutputStream(); size_t OnSysWrite(const void *buffer, size_t size); - off_t OnSysSeek(off_t pos, wxSeekMode mode); - off_t OnSysTell() const; + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; protected: wxFFile *m_file; @@ -149,10 +154,16 @@ class WXDLLIMPEXP_BASE wxFFileOutputStream: public wxOutputStream { DECLARE_NO_COPY_CLASS(wxFFileOutputStream) }; -class WXDLLIMPEXP_BASE wxFFileStream: public wxFFileInputStream, public wxFFileOutputStream { - public: - wxFFileStream(const wxString& fileName); +class WXDLLIMPEXP_BASE wxFFileStream : public wxFFileInputStream, + public wxFFileOutputStream +{ +public: + wxFFileStream(const wxString& fileName); + +private: + DECLARE_NO_COPY_CLASS(wxFFileStream) }; + #endif // wxUSE_STREAMS && wxUSE_FILE