X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..533bedbf307fd324ebc864ad1b5292977c4fa7bc:/include/wx/wfstream.h?ds=sidebyside diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 42b75669cd..63c90a0961 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -34,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: @@ -67,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: @@ -133,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: @@ -166,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: