This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/misc/Debug.h
kazu cdf97322f8 added new data-structures
added new test-cases
added flexible dijkstra calculation
added debugging log
modified: plotting, grid-generation, grid-importance,
refactoring
2016-01-22 18:47:06 +01:00

31 lines
531 B
C++

#ifndef DEBUG_H
#define DEBUG_H
#include <string>
#include <iostream>
#include <iomanip>
class Log {
public:
static void add(const char* comp, const std::string what) {
addComp(comp);
std::cout << what << std::endl;
}
static void add(const std::string& component, const std::string what) {
addComp(component.c_str());
std::cout << what << std::endl;
}
private:
static void addComp(const char* component) {
std::cout << "[" << std::setw(12) << std::setfill(' ') << component << "] ";
}
};
#endif // DEBUG_H