$search

ecl::EConsole Class Reference

Device for writing o standard error. More...

#include <console.hpp>

List of all members.

Public Member Functions

 EConsole ()
 Default constructor.
const Errorerror () const
 Returns the most recent error status.
void flush () ecl_assert_throw_decl(StandardException)
 Flush the internal buffer.
bool open ()
 Dummy handle to satisfy the output device concept.
long write (const char *s, unsigned long n) ecl_assert_throw_decl(StandardException)
 Write a character string to the buffer.
long write (const char &c) ecl_assert_throw_decl(StandardException)
 Write a character to the buffer.
virtual ~EConsole ()

Private Attributes

devices::CharStringBuffer buffer
Error error_handler

Detailed Description

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.

Definition at line 112 of file console.hpp.


Constructor & Destructor Documentation

ecl::EConsole::EConsole (  )  [inline]

Default constructor.

Definition at line 117 of file console.hpp.

virtual ecl::EConsole::~EConsole (  )  [inline, virtual]

Definition at line 118 of file console.hpp.


Member Function Documentation

const Error& ecl::EConsole::error (  )  const [inline]

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:

Definition at line 172 of file console.hpp.

void ecl::EConsole::flush (  ) 

Flush the internal buffer.

Flushes the userspace buffers to standard output.

Exceptions:
StandardException : throws if flushing returned an error [debug mode only].

Definition at line 76 of file console.cpp.

bool ecl::EConsole::open (  )  [inline]

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).

Definition at line 131 of file console.hpp.

long ecl::EConsole::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.
Returns:
long: the number of bytes written.
Exceptions:
StandardException : throws if flushing returned an error [debug mode only].

Definition at line 64 of file console.cpp.

long ecl::EConsole::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.
Returns:
long : the number of bytes written.
Exceptions:
StandardException : throws if writing returned an error [debug mode only].

Definition at line 55 of file console.cpp.


Member Data Documentation

Definition at line 175 of file console.hpp.

Definition at line 176 of file console.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


ecl_devices
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Fri Mar 1 15:21:23 2013