Next: , Up: The output stream hierarchy   [Contents][Index]

3.5.1 The abstract ostream class

The base output stream type is ‘ostream_t’.

It has the following methods:

Function: void ostream_write_mem (ostream_t stream, const void *data, size_t len)

Writes a sequence of bytes to a stream.

Function: void ostream_write_str (ostream_t stream, const char *string)

Writes a string’s contents to a stream.

Function: ptrdiff_t ostream_printf (ostream_t stream, const char *format, ...)
Function: ptrdiff_t ostream_vprintf (ostream_t stream, const char *format, va_list args)

Writes formatted output to a stream.

These functions return the size of formatted output, or a negative value in case of an error.

Function: void ostream_flush (ostream_t stream, ostream_flush_scope_t scope)

Brings buffered data to its destination.

Function: void ostream_free (ostream_t stream)

Closes and frees a stream.