replaced wxStream::GetSize() with GetLength() (still keep the former but it will be deprecated) (second part of patch 1063498)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,7 +21,7 @@ class WXDLLIMPEXP_BASE wxMemoryInputStream : public wxInputStream
|
||||
public:
|
||||
wxMemoryInputStream(const void *data, size_t length);
|
||||
virtual ~wxMemoryInputStream();
|
||||
virtual size_t GetSize() const { return m_length; }
|
||||
virtual wxFileOffset GetLength() const { return m_length; }
|
||||
virtual bool Eof() const;
|
||||
|
||||
char Peek();
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
// if data is !NULL it must be allocated with malloc()
|
||||
wxMemoryOutputStream(void *data = NULL, size_t length = 0);
|
||||
virtual ~wxMemoryOutputStream();
|
||||
virtual size_t GetSize() const { return m_o_streambuf->GetLastAccess(); }
|
||||
virtual wxFileOffset GetLength() const { return m_o_streambuf->GetLastAccess(); }
|
||||
|
||||
size_t CopyTo(void *buffer, size_t len) const;
|
||||
|
||||
|
@@ -31,7 +31,7 @@ public:
|
||||
m_pos = 0;
|
||||
}
|
||||
|
||||
virtual size_t GetSize() const { return m_str.length(); }
|
||||
virtual wxFileOffset GetLength() const { return m_str.length(); }
|
||||
|
||||
protected:
|
||||
virtual wxFileOffset OnSysSeek(wxFileOffset ofs, wxSeekMode mode);
|
||||
|
@@ -82,7 +82,8 @@ public:
|
||||
void Reset() { m_lasterror = wxSTREAM_NO_ERROR; }
|
||||
|
||||
// this doesn't make sense for all streams, always test its return value
|
||||
virtual size_t GetSize() const { return 0; }
|
||||
virtual size_t GetSize() const;
|
||||
virtual wxFileOffset GetLength() const { return wxInvalidOffset; }
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_2
|
||||
// deprecated, for compatibility only
|
||||
@@ -283,7 +284,7 @@ class WXDLLIMPEXP_BASE wxCountingOutputStream : public wxOutputStream
|
||||
public:
|
||||
wxCountingOutputStream();
|
||||
|
||||
size_t GetSize() const;
|
||||
wxFileOffset GetLength() const;
|
||||
bool Ok() const { return true; }
|
||||
|
||||
protected:
|
||||
@@ -309,7 +310,7 @@ public:
|
||||
|
||||
char Peek() { return m_parent_i_stream->Peek(); }
|
||||
|
||||
size_t GetSize() const { return m_parent_i_stream->GetSize(); }
|
||||
wxFileOffset GetLength() const { return m_parent_i_stream->GetLength(); }
|
||||
|
||||
wxInputStream *GetFilterInputStream() const { return m_parent_i_stream; }
|
||||
|
||||
@@ -326,7 +327,7 @@ public:
|
||||
wxFilterOutputStream(wxOutputStream& stream);
|
||||
virtual ~wxFilterOutputStream();
|
||||
|
||||
size_t GetSize() const { return m_parent_o_stream->GetSize(); }
|
||||
wxFileOffset GetLength() const { return m_parent_o_stream->GetLength(); }
|
||||
|
||||
wxOutputStream *GetFilterOutputStream() const { return m_parent_o_stream; }
|
||||
|
||||
@@ -515,7 +516,7 @@ public:
|
||||
|
||||
void Sync();
|
||||
|
||||
size_t GetSize() const;
|
||||
wxFileOffset GetLength() const;
|
||||
|
||||
// the buffer given to the stream will be deleted by it
|
||||
void SetOutputStreamBuffer(wxStreamBuffer *buffer);
|
||||
|
@@ -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(); }
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -106,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(); }
|
||||
|
||||
@@ -136,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(); }
|
||||
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
// Remember that archive must be local file accesible via fopen, fread functions!
|
||||
~wxZipInputStream();
|
||||
|
||||
virtual size_t GetSize() const {return m_Size;}
|
||||
virtual wxFileOffset GetLength() const {return m_Size;}
|
||||
virtual bool Eof() const;
|
||||
|
||||
protected:
|
||||
@@ -43,7 +43,7 @@ protected:
|
||||
virtual wxFileOffset OnSysTell() const {return m_Pos;}
|
||||
|
||||
private:
|
||||
size_t m_Size;
|
||||
wxFileOffset m_Size;
|
||||
wxFileOffset m_Pos;
|
||||
|
||||
// this void* is handle of archive . I'm sorry it is void and not proper
|
||||
|
@@ -46,7 +46,7 @@ class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream {
|
||||
virtual ~wxZlibInputStream();
|
||||
|
||||
char Peek() { return wxInputStream::Peek(); }
|
||||
size_t GetSize() const { return wxInputStream::GetSize(); }
|
||||
wxFileOffset GetLength() const { return wxInputStream::GetLength(); }
|
||||
|
||||
static bool CanHandleGZip();
|
||||
|
||||
@@ -72,7 +72,7 @@ class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream {
|
||||
virtual ~wxZlibOutputStream();
|
||||
|
||||
void Sync() { DoFlush(false); }
|
||||
size_t GetSize() const { return (size_t)m_pos; }
|
||||
wxFileOffset GetLength() const { return m_pos; }
|
||||
|
||||
static bool CanHandleGZip();
|
||||
|
||||
|
Reference in New Issue
Block a user