![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/InStream.h>
Inheritance diagram for InStream: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 WinInStream, and UnixInStream.
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 BufferedInStream, BlockInStream, NullInStream, WinInStream, and UnixInStream.
Referenced by StreamPipe::proceed().
|
virtual |
Read one byte from the stream.
Reimplemented in BufferedInStream, WinInStream, UnixInStream, and BlockInStream.
References InStream::ENDED, and InStream::FAILED.
Referenced by UnixInStream::read(), and WinInStream::read().
|
static |
Referenced by Formatter::format(), StreamPipe::proceed(), BlockInStream::read(), InStream::read(), and BufferedInStream::read().
|
static |
Referenced by Formatter::format(), StreamPipe::proceed(), InStream::read(), BufferedInStream::read(), Input::scanBool(), and Input::scanLine().