gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
Debug Class Reference

#include <Debug.H>

Inheritance diagram for Debug:
[legend]
Collaboration diagram for Debug:
[legend]

Public Member Functions

 Debug ()
 
virtual ~Debug ()
 
virtual int evaluateError (int errorNum)
 
virtual int evaluateError (int errorNum, std::string append)
 
std::string getErrorString (int errorNum)
 

Protected Attributes

std::map< int, std::string > errors
 This will contain a map between error numbers and descriptive std::strings for the errors. More...
 

Detailed Description

Debug information for handling errors. This class has two modes, testing on the NDEBUG flag is NOT present, it outputs to std::cerr and has filled member variables. This class outputs to std::cerr upon error. This class does nothing and is completely minimal (including compile time presence) when NDEBUG is present NOTE: Values < -39 900 are reserved for GTK IOStream. NOTE: You should use values between -39900 <= val <= -1

Definition at line 112 of file Debug.H.

Constructor & Destructor Documentation

◆ Debug()

Debug::Debug ( )
inline

Definition at line 117 of file Debug.H.

◆ ~Debug()

virtual Debug::~Debug ( )
inlinevirtual

Definition at line 123 of file Debug.H.

Member Function Documentation

◆ evaluateError() [1/2]

virtual int Debug::evaluateError ( int  errorNum)
inlinevirtual

Displays the error header, which includes the error number and the mapped error std::string

Parameters
errorNumThe error number to use to index the errors map for textual information
Returns
The errorNum for further processing.

Reimplemented in ALSA::ALSADebug.

Examples:
ALSACaptureTest.C, ALSAPlaybackTest.C, IIOMMapTest.C, JackClientTest.C, and OverlapAddTest.C.

Definition at line 132 of file Debug.H.

◆ evaluateError() [2/2]

virtual int Debug::evaluateError ( int  errorNum,
std::string  append 
)
inlinevirtual

Appends a std::string to the error header.

Parameters
errorNumThe error number to use to index the errors map for textual information
appendA std::string message to append to the standard error.
Returns
The errorNum for further processing.

Reimplemented in ALSA::ALSADebug.

Definition at line 151 of file Debug.H.

Here is the call graph for this function:

◆ getErrorString()

std::string Debug::getErrorString ( int  errorNum)
inline

Get the std::string matching an error.

Parameters
errorNumThe error number to use to index the errors map for textual information
Returns
The std::string matching the error number.

Definition at line 163 of file Debug.H.

Member Data Documentation

◆ errors

std::map<int, std::string> Debug::errors
protected

This will contain a map between error numbers and descriptive std::strings for the errors.

Definition at line 115 of file Debug.H.


The documentation for this class was generated from the following file:
gtkIOStream: Debug Class Reference
GTK+ IOStream  Beta