X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c977fa847c49b28aef4f8881660bad0775401763..b54129836cbc680fbeb338bb6087c1a4f80bdf18:/interface/wx/stream.h diff --git a/interface/wx/stream.h b/interface/wx/stream.h index d452e2fe54..f263607e4e 100644 --- a/interface/wx/stream.h +++ b/interface/wx/stream.h @@ -32,7 +32,7 @@ public: /** Destructor. */ - ~wxCountingOutputStream(); + virtual ~wxCountingOutputStream(); /** Returns the current size of the stream. @@ -199,7 +199,7 @@ public: @see Read() */ - char GetChar(); + virtual char GetChar(); /** Returns the amount of available data in the buffer. @@ -209,7 +209,7 @@ public: /** Returns the current position (counted in bytes) in the stream buffer. */ - off_t GetIntPosition() const; + wxFileOffset GetIntPosition() const; /** Returns the amount of bytes read during the last IO call to the parent stream. @@ -224,7 +224,7 @@ public: @see Read() */ - void PutChar(char c); + virtual void PutChar(char c); /** Reads a block of the specified size and stores the data in buffer. @@ -236,7 +236,7 @@ public: different of the specified size, an error has occurred and should be tested using GetLastError(). */ - size_t Read(void* buffer, size_t size); + virtual size_t Read(void* buffer, size_t size); /** Copies data to @a buffer. @@ -264,7 +264,7 @@ public: measured in bytes from the beginning of the stream. Otherwise, it returns wxInvalidOffset. */ - off_t Seek(off_t pos, wxSeekMode mode); + virtual wxFileOffset Seek(wxFileOffset pos, wxSeekMode mode); /** Specifies which pointers to use for stream buffering. @@ -320,7 +320,7 @@ public: @return Returns the current position in the stream if possible, wxInvalidOffset in the other case. */ - off_t Tell() const; + virtual wxFileOffset Tell() const; /** Truncates the buffer to the current position. @@ -334,7 +334,7 @@ public: Writes a block of the specified size using data of buffer. The data are cached in a buffer before being sent in one block to the stream. */ - size_t Write(const void* buffer, size_t size); + virtual size_t Write(const void* buffer, size_t size); /** See Read(). @@ -363,7 +363,7 @@ public: /** Destructor. */ - ~wxOutputStream(); + virtual ~wxOutputStream(); /** Closes the stream, returning @false if an error occurs. @@ -374,14 +374,14 @@ public: as a file, then the underlying resource is closed too if it is owned by this stream, or left open otherwise. */ - bool Close(); + virtual bool Close(); /** Returns the number of bytes written during the last Write(). It may return 0 even if there is no error on the stream if it is only temporarily impossible to write to it. */ - size_t LastWrite() const; + virtual size_t LastWrite() const; /** Puts the specified character in the output queue and increments the @@ -399,12 +399,12 @@ public: @return The new stream position or wxInvalidOffset on error. */ - off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart); + virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); /** Returns the current stream position. */ - off_t TellO() const; + virtual wxFileOffset TellO() const; /** Writes up to the specified amount of bytes using the data of buffer. @@ -667,25 +667,24 @@ class wxBufferedOutputStream : public wxFilterOutputStream { public: /** - Creates a buffered stream using a buffer of a default size of 1024 bytes for - cashing the stream @a parent. + @todo WRITE DESCRIPTION */ - wxBufferedOutputStream(const wxOutputStream& parent); - + wxBufferedOutputStream(wxOutputStream& stream, + wxStreamBuffer *buffer = NULL); /** Destructor. Calls Sync() and destroys the internal buffer. */ - ~wxBufferedOutputStream(); + virtual ~wxBufferedOutputStream(); /** Calls Sync() and changes the stream position. */ - off_t SeekO(off_t pos, wxSeekMode mode); + virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart) /** Flushes the buffer and calls Sync() on the parent stream. */ - void Sync(); + virtual void Sync(); }; @@ -709,19 +708,19 @@ public: /** Destructor. */ - ~wxInputStream(); + virtual ~wxInputStream(); /** Returns @true if some data is available in the stream right now, so that calling Read() wouldn't block. */ - bool CanRead() const; + virtual bool CanRead() const; /** Returns @true after an attempt has been made to read past the end of the stream. */ - bool Eof() const; + virtual bool Eof() const; /** Returns the first character in the input queue and removes it, @@ -732,12 +731,12 @@ public: /** Returns the last number of bytes read. */ - size_t LastRead() const; + virtual size_t LastRead() const; /** Returns the first character in the input queue without removing it. */ - char Peek(); + virtual char Peek(); /** Reads the specified amount of bytes and stores the data in buffer. @@ -769,12 +768,12 @@ public: @return The new stream position or wxInvalidOffset on error. */ - off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart); + virtual wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); /** Returns the current stream position. */ - off_t TellI() const; + virtual wxFileOffset TellI() const; /** This function is only useful in read mode. @@ -836,7 +835,7 @@ public: /** Destructor. */ - ~wxStreamBase(); + virtual ~wxStreamBase(); /** This function returns the last error. @@ -850,7 +849,7 @@ public: @since 2.5.4 */ - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; /** This function returns the size of the stream. @@ -861,7 +860,7 @@ public: streams. In that cases, GetSize returns 0 so you should always test its return value. */ - size_t GetSize() const; + virtual size_t GetSize() const; /** Returns @true if no error occurred on the stream. @@ -873,7 +872,7 @@ public: /** Returns @true if the streams supports seeking to arbitrary offsets. */ - bool IsSeekable() const; + virtual bool IsSeekable() const; /** Internal function. It is called when the stream wants to read data of the @@ -885,13 +884,13 @@ public: Internal function. It is called when the stream needs to change the current position. */ - off_t OnSysSeek(off_t pos, wxSeekMode mode); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); /** Internal function. It is called when the stream needs to know the real position. */ - off_t OnSysTell() const; + wxFileOffset OnSysTell() const; /** See OnSysRead().