Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/io/TeeOutStream.h>
Public Member Functions | |
TeeOutStream (OutStream &out1, OutStream &out2) | |
int | write (const char *buffer, int size) override |
int | flush (void) override |
cstring | lastErrorMessage (void) override |
bool | supportsANSI () const override |
Public Member Functions inherited from OutStream | |
virtual | ~OutStream (void) |
virtual int | write (char byte) |
Additional Inherited Members | |
Static Public Attributes inherited from OutStream | |
static OutStream & | null = _null |
This class allows to divert the byte stream to two different outputs. This may be useful to perform an output while performing a parallel processing of the streamed data: size computation, checksumming, etc.
TeeOutStream | ( | OutStream & | out1, |
OutStream & | out2 | ||
) |
|
overridevirtual |
Cause the current stream to dump its buffer to the medium.
Implements OutStream.
References OutStream::flush().
Return a message for the last error.
Reimplemented from OutStream.
References OutStream::lastErrorMessage().
|
overridevirtual |
Test if the current stream knows how to decode ANSI special codes. The default implementation returns false.
Reimplemented from OutStream.
References OutStream::supportsANSI().
|
overridevirtual |
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. |
Implements OutStream.
References OutStream::write().