#include <stdio.h>
#include <QtCore>
-#define RS_DEBUG RS_Debug::instance()
+#define DEBUG Debug::instance()
/**
* Debugging facilities.
* @author James Hammons
* @author Andrew Mustun
*/
-class RS_Debug
+class Debug
{
public:
/**
* <li>D_DEBUGGING: very verbose
* </ul>
*/
- enum RS_DebugLevel { D_NOTHING,
- D_CRITICAL,
- D_ERROR,
- D_WARNING,
- D_NOTICE,
- D_INFORMATIONAL,
- D_DEBUGGING };
+ enum DebugLevel { D_NOTHING,
+ D_CRITICAL,
+ D_ERROR,
+ D_WARNING,
+ D_NOTICE,
+ D_INFORMATIONAL,
+ D_DEBUGGING };
private:
- RS_Debug();
+ Debug();
public:
- static RS_Debug * instance();
+ static Debug * instance();
static void deleteInstance();
- void setLevel(RS_DebugLevel level);
- RS_DebugLevel getLevel();
- void print(RS_DebugLevel level, const char * format ...);
+ void setLevel(DebugLevel level);
+ DebugLevel getLevel();
+ void print(DebugLevel level, const char * format ...);
void print(const char * format ...);
void printUnicode(const QString & text);
void timestamp();
void setStream(FILE * s);
private:
- static RS_Debug * uniqueInstance;
+ static Debug * uniqueInstance;
- RS_DebugLevel debugLevel;
+ DebugLevel debugLevel;
FILE * stream;
};