37 lines
743 B
C++
37 lines
743 B
C++
/*
|
|
* DebugManager.h
|
|
*
|
|
* Created on: Mar 20, 2014
|
|
* Author: jonny
|
|
*/
|
|
|
|
#ifndef DEBUGMANAGER_H_
|
|
#define DEBUGMANAGER_H_
|
|
|
|
#include <systemc.h>
|
|
|
|
enum class Importance {Warning, Error, Info};
|
|
enum class Sender {Core, Scheduler, TracePlayer};
|
|
|
|
class DebugManager
|
|
{
|
|
public:
|
|
static DebugManager& getInstance();
|
|
|
|
std::vector<std::pair<Sender, Importance>> whiteList;
|
|
|
|
bool printTime;
|
|
bool printLocation;
|
|
|
|
void printDebug(std::string message, Sender sender, Importance importance=Importance::Info);
|
|
|
|
private:
|
|
DebugManager() : printTime(true), printLocation(true) {};
|
|
DebugManager(const DebugManager&);
|
|
std::string senderToString(Sender sender);
|
|
std::string importanceToString(Importance importancy);
|
|
|
|
};
|
|
|
|
#endif /* DEBUGMANAGER_H_ */
|