00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_DEBUG_H
00012
#define OPENCAL_DEBUG_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
00017
#include <sstream>
00018
using std::ostringstream;
00019
00020
00021
namespace OpenCAL
00022 {
00023
00024
00028 class OPENCAL_API Debug
00029 {
00030
public:
00032
static ostringstream stream;
00034
static unsigned int maxLevel;
00035
00036
private:
00038
static unsigned int m_debugLevel;
00039
00040
public:
00041
00042
static unsigned int getDebugLevel() {
return m_debugLevel; }
00043
00044
00045
static void setDebugLevel(
unsigned int level) { m_debugLevel = level; }
00046
00047
00048
static void print(
const string &message,
unsigned int debugLevel = 1);
00049
static void printStream(
unsigned int debugLevel = 1);
00050
static void initWarning(
const string &className,
unsigned int debugLevel = 1);
00051 };
00052 }
00053
00054
#endif // OPENCAL_DEBUG_H