Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/InStream.h>
Public Member Functions | |
virtual | ~InStream (void) |
virtual int | read (void *buffer, int size)=0 |
virtual int | read (void) |
virtual CString | lastErrorMessage (void) |
Static Public Attributes | |
static const int | FAILED = -1 |
static const int | ENDED = -2 |
static InStream & | null = _null |
This class must be shared by all classes implementing input streams. It provides common facilities provided by input streams.
Return a message for the last error.
Reimplemented in UnixInStream, and WinInStream.
Referenced by StreamPipe::lastErrorMessage().
|
pure 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. |
Implemented in BlockInStream, BufferedInStream, NullInStream, UnixInStream, and WinInStream.
Referenced by StreamPipe::proceed().
|
virtual |
Read one byte from the stream.
Reimplemented in BufferedInStream, UnixInStream, WinInStream, and BlockInStream.
References InStream::ENDED, and InStream::FAILED.
Referenced by WinInStream::read(), and UnixInStream::read().
|
static |
Referenced by Formatter::format(), StreamPipe::proceed(), InStream::read(), BufferedInStream::read(), and BlockInStream::read().
|
static |
Referenced by Formatter::format(), StreamPipe::proceed(), InStream::read(), BufferedInStream::read(), Input::scanBool(), and Input::scanLine().