Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/UnixInStream.h>
Public Member Functions | |
UnixInStream (int fd) | |
int | fd (void) const |
virtual int | read (void *buffer, int size) |
virtual int | read (void) |
virtual CString | lastErrorMessage (void) |
Public Member Functions inherited from InStream | |
virtual | ~InStream (void) |
Protected Attributes | |
int | _fd |
Additional Inherited Members | |
Static Public Attributes inherited from InStream | |
static const int | FAILED = -1 |
static const int | ENDED = -2 |
static InStream & | null = _null |
Input stream implementation using the Unix low-level IO system.
|
inline |
Build a new Unix input stream with the given file descriptor.
fd | File descriptor to use. |
|
inline |
Get the file descriptor of this Unix file stream.
References UnixInStream::_fd.
|
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 InStream.
References UnixInStream::_fd, and elm::io::read().
|
inlinevirtual |
Read one byte from the stream.
Reimplemented from InStream.
References InStream::read().
|
protected |
Referenced by UnixInStream::fd(), and UnixInStream::read().