merged everythin into one project

This commit is contained in:
Janik Schlemminger
2014-03-21 13:46:38 +01:00
parent 27e209f549
commit cd556eb572
53 changed files with 9026 additions and 219 deletions

View File

@@ -0,0 +1,50 @@
/*
* DebugManager.cpp
*
* Created on: Mar 20, 2014
* Author: jonny
*/
#include "DebugManager.h"
#include <string>
using namespace std;
DebugManager& DebugManager::getInstance()
{
static DebugManager manager;
return manager;
}
void DebugManager::printDebug(Importance importancy, Sender sender, sc_time time, std::string message)
{
cout << "[" << importancyToString(importancy) << "]";
if(printTime) std::cout << " at " << time;
if(printLocation) std::cout << " in " << senderToString(sender);
cout << ": " << message << endl;
}
string DebugManager::importancyToString(Importance importancy)
{
//if((unsigned int)importancy == Importancy::Warning)
// return "Warning";
switch(importancy)
{
case Importance::Info: return "[Info]";
case Importance::Warning: return "[Warning]";
case Importance::Error: return "[Error]";
}
return "unknown importance";
}
string DebugManager::senderToString(Sender sender)
{
/*switch(sender)
{
case Sender::Core: return "Core";
case Sender::Scheduler: return "Scheduler";
}*/
return "Core";
}