Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/WinInStream.h>
Public Member Functions | |
WinInStream (void *fd) | |
void * | fd (void) const |
virtual int | read (void *buffer, int size) |
virtual int | read (void) |
virtual CString | lastErrorMessage (void) |
Public Member Functions inherited from elm::io::InStream | |
virtual | ~InStream (void) |
Protected Attributes | |
void * | _fd |
Additional Inherited Members | |
Static Public Attributes inherited from elm::io::InStream | |
static const int | FAILED = -1 |
static const int | ENDED = -2 |
static InStream & | null = _null |
Input stream implementation using the Win low-level IO system.
elm::io::WinInStream::WinInStream | ( | void * | fd | ) |
Build a new Win input stream with the given file descriptor.
fd | File descriptor to use. |
int elm::io::WinInStream::fd | ( | void | ) | const |
|
virtual |
Return a message for the last error.
Reimplemented from elm::io::InStream.
References elm::win::getErrorMessage(), and elm::String::toCString().
|
virtual |
Read some bytes from the stream and store them in the given buffer. This method does not ever read as many bytes as available in the buffer even if the stream is not ended. Insteadn a read returning 0 bytes means the end of stream is reached.
buffer | Buffer to write bytes in. |
size | Size of the buffer. |
Implements elm::io::InStream.
References _fd, and elm::win::setError().
|
virtual |
Read one byte from the stream.
Reimplemented from elm::io::InStream.
References elm::io::InStream::read().