X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1265174571765b279434383788a52832b5992b4..9ed8b5a7b2e41ecb07d2dab32bac32eb7b771fd3:/include/wx/wfstream.h diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 79cdb866cf..ae62191d39 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -12,10 +12,6 @@ #ifndef _WX_WXFSTREAM_H__ #define _WX_WXFSTREAM_H__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "wfstream.h" -#endif - #include "wx/defs.h" #if wxUSE_STREAMS @@ -38,11 +34,12 @@ public: wxFileInputStream(const wxString& ifileName); wxFileInputStream(wxFile& file); wxFileInputStream(int fd); - ~wxFileInputStream(); + virtual ~wxFileInputStream(); wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -71,7 +68,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -134,14 +132,15 @@ private: class WXDLLIMPEXP_BASE wxFFileInputStream : public wxInputStream { public: - wxFFileInputStream(const wxString& fileName, const wxChar *mode = _T("rb")); + wxFFileInputStream(const wxString& fileName, const wxString& mode = "rb"); wxFFileInputStream(wxFFile& file); wxFFileInputStream(FILE *file); - ~wxFFileInputStream(); + virtual ~wxFFileInputStream(); wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -161,7 +160,7 @@ protected: class WXDLLIMPEXP_BASE wxFFileOutputStream : public wxOutputStream { public: - wxFFileOutputStream(const wxString& fileName, const wxChar *mode = _T("w+b")); + wxFFileOutputStream(const wxString& fileName, const wxString& mode = "w+b"); wxFFileOutputStream(wxFFile& file); wxFFileOutputStream(FILE *file); virtual ~wxFFileOutputStream(); @@ -170,7 +169,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const ; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: