Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
WinOutStream Class Reference

#include <>>

+ Inheritance diagram for WinOutStream:

Public Member Functions

 WinOutStream (void *fd)
 
voidfd (void) const
 
virtual int write (const char *buffer, int size)
 
virtual int flush (void)
 
virtual CString lastErrorMessage (void)
 
- Public Member Functions inherited from OutStream
virtual ~OutStream (void)
 
virtual int write (char byte)
 
virtual bool supportsANSI () const
 

Protected Attributes

void_fd
 

Additional Inherited Members

- Static Public Attributes inherited from OutStream
static OutStreamnull = _null
 

Detailed Description

Output stream implementation using the Win low-level IO system (only on OSes supporting POSIX).

Constructor & Destructor Documentation

◆ WinOutStream()

WinOutStream ( void fd)

Build an Win output stream.

Parameters
fdFile descriptor.

Build a Win output stream using a file descriptor identifier.

Parameters
_fdFile descriptor identifier.

Member Function Documentation

◆ fd()

void* fd ( void  ) const
inline

References WinOutStream::_fd.

◆ flush()

int flush ( void  )
virtual

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

Returns
0 for success, less than 0 for error.

Implements OutStream.

◆ lastErrorMessage()

CString lastErrorMessage ( void  )
virtual

Return the last occurred error message.

Returns
Last error message.

Reimplemented from OutStream.

◆ write()

int 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 OutStream.

References WinOutStream::_fd, elm::io::err, and elm::io::out.

Member Data Documentation

◆ _fd

void* _fd
protected

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