Contents Up Previous Next

wxStreamBase

Derived from

None

Include files

<wx/stream.h>

See also

wxStreamBuffer

Members

wxStreamBase::wxStreamBase
wxStreamBase::~wxStreamBase
wxStreamBase::LastError
wxStreamBase::OnSysRead
wxStreamBase::OnSysSeek
wxStreamBase::OnSysTell
wxStreamBase::OnSysWrite
wxStreamBase::StreamSize


wxStreamBase::wxStreamBase

wxStreamBase()

Creates a dummy stream object. It doesn't do anything.


wxStreamBase::~wxStreamBase

~wxStreamBase()

Destructor.


wxStreamBase::LastError

wxStreamError LastError() const

This function returns the last error.
wxStream_NOERROR No error occured.
wxStream_EOF An End-Of-File occured.
wxStream_WRITE_ERR A generic error occured on the last write call.
wxStream_READ_ERR A generic error occured on the last read call.


wxStreamBase::OnSysRead

size_t OnSysRead(void* buffer, size_t bufsize)

Internal function. It is called when the stream buffer needs a buffer of the specified size. It should return the size that was actually read.


wxStreamBase::OnSysSeek

off_t OnSysSeek(off_t pos, wxSeekMode mode)

Internal function. It is called when the stream buffer needs to change the current position in the stream. See wxStreamBuffer::Seek


wxStreamBase::OnSysTell

off_t OnSysTell() const

Internal function. Is is called when the stream buffer needs to know the real position in the stream.


wxStreamBase::OnSysWrite

size_t OnSysWrite(void *buffer, size_t bufsize)

See OnSysRead.


wxStreamBase::StreamSize

size_t StreamSize() const

This function returns the size of the stream. For example, for a file it is the size of the file).

Warning

There are streams which do not have size by definition, such as socket streams. In that cases, StreamSize returns an invalid size represented by

~(size_t)0