Typedef ecl::OConsoleStream

Typedef Documentation

typedef TextStream<OConsole> ecl::OConsoleStream

Streams to standard output.

This class operates similar to, but posesses several advantages to the usual cout c++ mechanism.

  • Faster.

  • Can be instantiated separately, each with its own internal buffer.

The ecl could provide a global mechanism very much like the cout handle, but instantiating separately stops getting standard output messages confused and is a useful property for multi-threaded control applications. If you wish to use a global mechanism, simply instantiate a global instance in your program.

Usage:

There is no need to open this device, it automatically connects to stdout.

OConsoleStream ostream;
ostream << "Hey dude";
ostream.flush();

See also

TextStream.