/**
@class wxStreamBuffer
- @todo WRITE A DESCRIPTION
+ wxStreamBuffer is a cache manager for wxStreamBase: it manages a stream buffer
+ linked to a stream.
+
+ Each stream always has one autoinitialized stream buffer, but you may
+ attach more of them to the same stream.
@library{wxbase}
@category{streams}
- @see wxStreamBase
+ @see wxStreamBase, @ref overview_stream
*/
class wxStreamBuffer
{
@code
streambuffer.Read(...);
- streambuffer2.Read(...); // This call erases previous error messages set by 'streambuffer'
+ streambuffer2.Read(...);
+ // This call erases previous error messages set by 'streambuffer'
+ // assuming that both instances are stream buffers for the same stream
@endcode
@see SetBufferIO()
@see Write()
*/
- Return value size_t Read(wxStreamBuffer* buffer);
+ size_t Read(wxStreamBuffer* buffer);
/**
Resets to the initial state variables concerning the buffer.
@see wxStreamBuffer(), Fixed(), Flushable()
*/
- void SetBufferIO(char* buffer_start, char* buffer_end);
+ void SetBufferIO(void* start, void* end, bool takeOwnership = false);
/**
Destroys or invalidates the previous IO buffer and allocates a new one of the
This function returns a reference on the current object, so the user can
test any states of the stream right away.
*/
- wxOutputStream& Write(const void* buffer, size_t size);
+ virtual wxOutputStream& Write(const void* buffer, size_t size);
/**
Reads data from the specified input stream and stores them
/**
Returns the first character in the input queue and removes it,
blocking until it appears if necessary.
+
+ On success returns a value between 0 - 255; on end of file returns @c wxEOF.
*/
int GetC();