Class EConsole
Defined in File console.hpp
Class Documentation
-
class EConsole
Device for writing o standard error.
Device for writing to standard error. Do not use this directly, it serves only as the device handle for the console stream classes.
Public Functions
-
inline EConsole()
Default constructor.
-
inline virtual ~EConsole()
-
inline bool open()
Dummy handle to satisfy the output device concept.
For console devices this does nothing - the standard output is always open. It is just a dummy handle built to ensure the output device concept is satisfied.
- Returns
bool : always returns true (it is always open).
-
long write(const char &c)
Write a character to the buffer.
Write a character to the buffer. It will automatically flush if the buffer exceeds its capacity.
- Parameters
c – : the character to write.
- Throws
StandardException – : throws if writing returned an error [debug mode only].
- Returns
long : the number of bytes written.
-
long write(const char *s, unsigned long n)
Write a character string to the buffer.
Write a character string to the buffer. It will automatically flush if the buffer exceeds its capacity.
- Parameters
s – : points to the beginning of the character string
n – : the number of characters to write.
- Throws
StandardException – : throws if flushing returned an error [debug mode only].
- Returns
long: the number of bytes written.
-
void flush()
Flush the internal buffer.
Flushes the userspace buffers to standard output.
- Throws
StandardException – : throws if flushing returned an error [debug mode only].
-
inline const Error &error() const
Returns the most recent error status.
Use this to check on the status of the object after a method has been called. Mostly this is here to serve as a graceful fallback for when exceptions are disabled.
- Returns
-
inline EConsole()