Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

CDebug Class Reference

#include <cdebug.h>

Collaboration diagram for CDebug:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void log_error (const char *err_msg, int fatal=0)

Static Public Member Functions

void log (const char *err_msg, int fatal=0)
CDebugget_instance ()

Static Private Attributes

CDebugunique_instance = 0

Detailed Description

CDebug is a singleton class that provides functionality for logging debug messages and so forth.

Definition at line 11 of file cdebug.h.


Member Function Documentation

CDebug* CDebug::get_instance  )  [inline, static]
 

Return the singleton instance. If it doesn't already exist, create it.

Definition at line 38 of file cdebug.h.

References unique_instance.

void CDebug::log const char *  err_msg,
int  fatal = 0
[inline, static]
 

Static macro for the instance's log_error() method. This is just more convenient than having to call CDebug::get_instance()->log_error().

Definition at line 32 of file cdebug.h.

References get_instance(), and log_error().

Here is the call graph for this function:

void CDebug::log_error const char *  err_msg,
int  fatal = 0
 

Log the given error message to stderr. If fatal is true, the program exits immediately with an error code of fatal.

Todo:
Make this method throw an exception someday.

Definition at line 11 of file cdebug.cpp.


Member Data Documentation

CDebug * CDebug::unique_instance = 0 [static, private]
 

Singleton instance.

Definition at line 9 of file cdebug.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Aug 27 11:58:48 2003 for GFW by doxygen 1.3.3