new metrics
This commit is contained in:
@@ -32,6 +32,24 @@ void DebugManager::printDebugMessage(string message, Sender sender, Importance i
|
||||
}
|
||||
}
|
||||
|
||||
void DebugManager::printDebugMessage(std::string message, Sender sender, unsigned int senderNumber,
|
||||
Importance importance)
|
||||
{
|
||||
bool show = count(whiteList.begin(), whiteList.end(),
|
||||
pair<Sender, Importance>(sender, importance));
|
||||
|
||||
if (show)
|
||||
{
|
||||
cout << importanceToString(importance);
|
||||
if (printTime)
|
||||
std::cout << " at " << sc_time_stamp();
|
||||
if (printLocation)
|
||||
std::cout << " in " << senderToString(sender) << "number " << senderNumber;
|
||||
cout << ": " << message << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DebugManager::addToWhiteList(Sender sender, Importance importance)
|
||||
{
|
||||
whiteList.push_back(pair<Sender, Importance>(sender, importance));
|
||||
@@ -43,6 +61,7 @@ void DebugManager::addToWhiteList(Sender sender)
|
||||
addToWhiteList(sender, Importance::Warning);
|
||||
}
|
||||
|
||||
|
||||
string DebugManager::importanceToString(Importance importancy)
|
||||
{
|
||||
switch (importancy)
|
||||
|
||||
Reference in New Issue
Block a user