6 #include "FASTExport.hpp"
11 #undef ERROR // undefine some windows garbage
32 void process(
const T& content);
34 void setReportMethod(Method method);
35 void setReportMethod(Type type, Method method);
36 static void setGlobalReportMethod(Method method);
37 static void setGlobalReportMethod(Type type, Method method);
39 Method getMethod(Type)
const;
41 static std::map<Type, Method> mGlobalReporterMethods;
43 std::map<Type, Method> mLocalReporterMethods;
48 static WORD m_defaultAttributes;
54 Method reportMethod = getMethod(mType);
58 if(reportMethod ==
COUT) {
60 std::cout <<
"INFO [" << std::this_thread::get_id() <<
"] ";
63 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), (m_defaultAttributes & 0x00F0) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
65 std::cout <<
"\033[1m";
67 std::cout <<
"WARNING [" << std::this_thread::get_id() <<
"] ";
68 }
else if(mType ==
ERROR) {
70 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), (m_defaultAttributes & 0x00F0) | FOREGROUND_RED | FOREGROUND_INTENSITY);
72 std::cout <<
"\033[31;1m";
74 std::cerr <<
"ERROR [" << std::this_thread::get_id() <<
"] ";
80 if(reportMethod ==
COUT) {
82 }
else if(reportMethod ==
LOG) {
94 FAST_EXPORT Reporter
operator<<(Reporter report,
const ReporterEnd& end);