Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/OutStream.h>
Public Member Functions | |
virtual | ~OutStream (void) |
virtual int | write (const char *buffer, int size)=0 |
virtual int | write (char byte) |
virtual int | flush (void)=0 |
virtual CString | lastErrorMessage (void) |
Static Public Attributes | |
static OutStream & | null = _null |
An output stream streams transfer a flow of bytes to another entity. It is an abstract interface that must be implemented by standard IO, files, pipes, compressors and so on.
|
virtual |
|
pure virtual |
Cause the current stream to dump its buffer to the medium.
Implemented in elm::checksum::MD5, elm::io::BufferedOutStream, elm::io::TeeOutStream, elm::io::BlockOutStream, elm::io::UnixOutStream, and elm::io::WinOutStream.
Referenced by elm::io::TeeOutStream::flush(), and elm::io::Output::flush().
|
virtual |
Return a message for the last error.
Reimplemented in elm::checksum::MD5, elm::io::BufferedOutStream, elm::io::TeeOutStream, elm::io::UnixOutStream, and elm::io::WinOutStream.
Referenced by elm::io::Output::flush(), elm::io::TeeOutStream::lastErrorMessage(), elm::io::StreamPipe::lastErrorMessage(), elm::io::BufferedOutStream::lastErrorMessage(), and elm::io::Output::print().
|
pure virtual |
This is the main method of an output stream: the given buffer is put on the stream.
buffer | Byte buffer to write. |
size | Size of the byte buffer. |
Implemented in elm::checksum::MD5, elm::io::BufferedOutStream, elm::io::TeeOutStream, elm::io::BlockOutStream, elm::io::UnixOutStream, and elm::io::WinOutStream.
Referenced by elm::io::BufferedOutStream::flush(), elm::util::Formatter::format(), elm::io::Output::format(), elm::io::Output::print(), elm::io::StreamPipe::proceed(), elm::io::TeeOutStream::write(), write(), elm::io::BufferedOutStream::write(), and elm::xom::Serializer::writeRaw().
|
virtual |
Write a byte to the stream.
byte | Byte to write. |
Reimplemented in elm::io::BlockOutStream.
References elm::io::byte(), and write().