X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1265174571765b279434383788a52832b5992b4..ad667945478cda0c0a33e154f1d4403402cffb9e:/include/wx/wfstream.h diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 79cdb866cf..63c90a0961 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 { return (wxStreamBase::IsOk() && m_file->IsOpened()); } 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 { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -137,11 +135,12 @@ public: wxFFileInputStream(const wxString& fileName, const wxChar *mode = _T("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 { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -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 { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: