Also added wxFFileStream::IsOk() and corrected IsOk() implementations of
wxFileInput/OutputStream to call the immediate base class version of this method and not wxStreamBase one. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a8098f8653
commit
92bf6cc15a
@ -171,7 +171,7 @@ public:
|
|||||||
wxFileOffset GetLength() const;
|
wxFileOffset GetLength() const;
|
||||||
|
|
||||||
bool Ok() const { return IsOk(); }
|
bool Ok() const { return IsOk(); }
|
||||||
virtual bool IsOk() const ;
|
virtual bool IsOk() const;
|
||||||
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -193,6 +193,7 @@ class WXDLLIMPEXP_BASE wxFFileStream : public wxFFileInputStream,
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxFFileStream(const wxString& fileName);
|
wxFFileStream(const wxString& fileName);
|
||||||
|
virtual bool IsOk() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_NO_COPY_CLASS(wxFFileStream)
|
DECLARE_NO_COPY_CLASS(wxFFileStream)
|
||||||
|
@ -109,7 +109,7 @@ wxFileOffset wxFileInputStream::OnSysTell() const
|
|||||||
|
|
||||||
bool wxFileInputStream::IsOk() const
|
bool wxFileInputStream::IsOk() const
|
||||||
{
|
{
|
||||||
return wxStreamBase::IsOk() && m_file->IsOpened();
|
return wxInputStream::IsOk() && m_file->IsOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -185,7 +185,7 @@ wxFileOffset wxFileOutputStream::GetLength() const
|
|||||||
|
|
||||||
bool wxFileOutputStream::IsOk() const
|
bool wxFileOutputStream::IsOk() const
|
||||||
{
|
{
|
||||||
return wxStreamBase::IsOk() && m_file->IsOpened();
|
return wxOutputStream::IsOk() && m_file->IsOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -227,10 +227,10 @@ wxFileStream::wxFileStream(const wxString& fileName)
|
|||||||
|
|
||||||
bool wxFileStream::IsOk() const
|
bool wxFileStream::IsOk() const
|
||||||
{
|
{
|
||||||
return wxFileOutputStream::IsOk() && wxFileInputStream::m_file->IsOpened();
|
return wxFileOutputStream::IsOk() && wxFileInputStream::IsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //wxUSE_FILE
|
#endif // wxUSE_FILE
|
||||||
|
|
||||||
#if wxUSE_FFILE
|
#if wxUSE_FFILE
|
||||||
|
|
||||||
@ -406,6 +406,11 @@ wxFFileStream::wxFFileStream(const wxString& fileName)
|
|||||||
wxFFileOutputStream::m_file = wxFFileInputStream::m_file;
|
wxFFileOutputStream::m_file = wxFFileInputStream::m_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxFFileStream::IsOk() const
|
||||||
|
{
|
||||||
|
return wxFFileOutputStream::IsOk() && wxFFileInputStream::IsOk();
|
||||||
|
}
|
||||||
|
|
||||||
#endif //wxUSE_FFILE
|
#endif //wxUSE_FFILE
|
||||||
|
|
||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
Loading…
Reference in New Issue
Block a user