code::Error Class Reference

List of all members.

Detailed Description

A single error message is denoted by Error.

You can use a single Error to collate the error messages from many different function calls. A sample usage is given below:

     ofstream fp( "my_error_log" );
      ...
     {
       Error  temp_error( fp );
       lib_func_call(...);
       lib_func_call(...);
       lib_func_call(...);
by going out of scope, Error is destroyed.
This defines a single message.
     }
      ...
     fp.close()
  

While not tremendously useful when used as in the example above, this becomes useful when you need to provide user feedback, via, say a broadcast or a dialog window.

Subclasses of Error provide more convinience.

See also:
ErrorLog
Author:
: Lakshman
Version:
:
Id
code_Error.h,v 1.23 2009/06/02 20:17:39 lakshman Exp


Public Member Functions

 Error (std::ostream *s)
 Starts logging here on out to the stream passed in.
 Error (std::ostream &s)
 Starts logging here on out to the stream passed in.
 ~Error ()
 From the moment of construction to the point of destruction defines a single message.

Protected Attributes

std::ostream * err_stream


Constructor & Destructor Documentation

code::Error::Error ( std::ostream *  s  )  [inline]

Starts logging here on out to the stream passed in.

Usually, you would want to log to a strstream.

Parameters:
s the stream to log into.

code::Error::Error ( std::ostream &  s  )  [inline]

Starts logging here on out to the stream passed in.

Usually, you would want to log to a strstream.

Parameters:
s the stream to log into.

code::Error::~Error (  )  [inline]

From the moment of construction to the point of destruction defines a single message.

All errors by CODE components in the meantime are shoved in the stream passed in.


Member Data Documentation

std::ostream* code::Error::err_stream [protected]


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7