MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::MsqPrintError Class Reference

Utility class for printing error data - used in Mesquite tests. More...

#include <MsqError.hpp>

+ Inheritance diagram for MBMesquite::MsqPrintError:
+ Collaboration diagram for MBMesquite::MsqPrintError:

Public Member Functions

MESQUITE_EXPORT MsqPrintError (std::ostream &stream)
 Initialize with ostream to print error data to.
virtual MESQUITE_EXPORT ~MsqPrintError ()
 On destruction, conditionally prints error data.

Private Attributes

std::ostream & outputStream

Detailed Description

Utility class for printing error data - used in Mesquite tests.

Author:
Jason Kraftcheck
Date:
2004-10-11

A subclass of MsqError. Behaves the same as MsqError, except that it will automatically print itself to the specified ostream upon destruction if an error occured. For objections of this type declared on the stack (not new'd), this means that the error will be printed when the function returns (if an error occured.)

Definition at line 255 of file MsqError.hpp.


Constructor & Destructor Documentation

MESQUITE_EXPORT MBMesquite::MsqPrintError::MsqPrintError ( std::ostream &  stream) [inline]

Initialize with ostream to print error data to.

Definition at line 259 of file MsqError.hpp.

: outputStream( stream ) {}

On destruction, conditionally prints error data.

Definition at line 175 of file MsqError.cpp.

References MBMesquite::MsqError::error().

{
    if( error() ) outputStream << *this << std::endl;
}

Member Data Documentation

std::ostream& MBMesquite::MsqPrintError::outputStream [private]

Definition at line 265 of file MsqError.hpp.

List of all members.


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