Class IStream

Class Documentation

class IStream

Public Functions

virtual ~IStream()
virtual std::ostream &stream() = 0
inline virtual bool isConsole() const

Best guess on whether the instance is writing to a console (e.g. via stdout/stderr)

This is useful for e.g. Win32 colour support, because the Win32 API manipulates console directly, unlike POSIX escape codes, that can be written anywhere.

Due to variety of ways to change where the stdout/stderr is actually being written, users should always assume that the answer might be wrong.