Open Babel  3.0
Public Member Functions | Protected Member Functions | List of all members
obLogBuf Class Reference

#include <openbabel/oberror.h>

Inheritance diagram for obLogBuf:

Public Member Functions

virtual ~obLogBuf ()
 

Protected Member Functions

int sync ()
 

Detailed Description

A minimal streambuf derivative to wrap calls to cerr into calls to OBMessageHandler as needed.

This class is used for internal use, via OBMessageHandler::StartErrorWrap() To use this class, use the global OBMessageHandler object obErrorLog:

obErrorLog.StartErrorWrap(); // All output to cerr will become OBErrors
cerr << " This is error 1" << endl; // flush output, create a new error
cerr << " Error 2" << endl;
cerr << " Error 3: Done with output wrapping." << endl;
obErrorLog.StopErrorWrap(); // return to default behavior

Constructor & Destructor Documentation

◆ ~obLogBuf()

virtual ~obLogBuf ( )
inlinevirtual

Close the output buffer, flush, and call OBMessageHandler::ThrowError()

Member Function Documentation

◆ sync()

int sync ( )
inlineprotected

Call OBMessageHandler::ThrowError() and flush the buffer.


The documentation for this class was generated from the following file: