Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::io::TeeOutStream Class Reference

#include <elm/io/TeeOutStream.h>

+ Inheritance diagram for elm::io::TeeOutStream:

Public Member Functions

 TeeOutStream (OutStream &out1, OutStream &out2)
 
virtual int write (const char *buffer, int size)
 
virtual int flush (void)
 
virtual cstring lastErrorMessage (void)
 
- Public Member Functions inherited from elm::io::OutStream
virtual ~OutStream (void)
 
virtual int write (char byte)
 

Additional Inherited Members

- Static Public Attributes inherited from elm::io::OutStream
static OutStreamnull = _null
 

Detailed Description

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.

Constructor & Destructor Documentation

elm::io::TeeOutStream::TeeOutStream ( OutStream out1,
OutStream out2 
)

Member Function Documentation

int elm::io::TeeOutStream::flush ( void  )
virtual

Cause the current stream to dump its buffer to the medium.

Returns
0 for success, less than 0 for error.

Implements elm::io::OutStream.

References elm::io::OutStream::flush().

cstring elm::io::TeeOutStream::lastErrorMessage ( void  )
virtual

Return a message for the last error.

Returns
Message of the last error.

Reimplemented from elm::io::OutStream.

References elm::io::OutStream::lastErrorMessage().

int elm::io::TeeOutStream::write ( const char *  buffer,
int  size 
)
virtual

This is the main method of an output stream: the given buffer is put on the stream.

Parameters
bufferByte buffer to write.
sizeSize of the byte buffer.
Returns
Number of transferred bytes or less than 0 for an error.

Implements elm::io::OutStream.

References elm::io::OutStream::write().


The documentation for this class was generated from the following files: