$szTitle = "wxstreambase"; include "./_header.inc"; ?>
this class is the base class of most stream related classes in wxwidgets. it must not be used directly.
derived from
none
include files
<wx/stream.h>
see also
members
wxstreambase::wxstreambase
wxstreambase::~wxstreambase
wxstreambase::getlength
wxstreambase::getlasterror
wxstreambase::getsize
wxstreambase::isok
wxstreambase::isseekable
wxstreambase::onsysread
wxstreambase::onsysseek
wxstreambase::onsystell
wxstreambase::onsyswrite
wxstreambase()
creates a dummy stream object. it doesn't do anything.
~wxstreambase()
destructor.
wxfileoffset getlength() const
returns the length of the stream in bytes. if the length cannot be determined (this is always the case for socket streams for example), returns wxinvalidoffset.
this function is new since wxwidgets version 2.5.4
wxstreamerror getlasterror() const
this function returns the last error.
wxstream_no_error | no error occurred. |
wxstream_eof | an end-of-file occurred. |
wxstream_write_error | a generic error occurred on the last write call. |
wxstream_read_error | a generic error occurred on the last read call. |
size_t getsize() 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, getsize returns 0 so you should always test its return value.
virtual bool isok() const
returns true if no error occurred on the stream.
see also
bool isseekable() const
returns true if the streams supports seeking to arbitrary offsets.
size_t onsysread(void* buffer, size_t bufsize)
internal function. it is called when the stream wants to read data of the specified size. it should return the size that was actually read.
off_t onsysseek(off_t pos, wxseekmode mode)
internal function. it is called when the stream needs to change the current position.
off_t onsystell() const
internal function. is is called when the stream needs to know the real position.
size_t onsyswrite(const void *buffer, size_t bufsize)
see onsysread.
include "./_footer.inc"; ?>