/* debug.cpp * * Debugging class. * * Bruce M. Bolden * August 25, 1998 */ #include #include #include "debug.h" const int TRUE = 1; const int FALSE = 0; //extern ofstream dbFile; Debug::Debug() { //cout << "In Debug object constructed" << endl; //cout << flush; bDebug = TRUE; dbFile.open( "debug.out", ios::out ); if( !dbFile ) { cout << "Unable to open \"debug.out\"" << endl; } //cout << "Debug object constructed" << endl; } void Debug::DebugMsg( char *msg ) { if( bDebug ) { dbFile << msg << endl; } } void Debug::DebugMsg( char *msg, int iVal ) { if( bDebug ) { dbFile << msg << iVal << endl; } } void Debug::DebugOn() { bDebug = TRUE; } void Debug::DebugOff() { bDebug = FALSE; }