Debug Class Reference#include <Debug.h>
Detailed DescriptionDefinition at line 15 of file Debug.h. Constructor & Destructor Documentation
Definition at line 27 of file Debug.h. References Utility::ThreadID(). 00027 : m_id(0), m_text(x) { 00028 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00029 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00030 fprintf(stderr, " "); 00031 fprintf(stderr, "%s%s\n", x.c_str(), colors[0]); 00032 m_level[Utility::ThreadID()]++; 00033 }
Definition at line 34 of file Debug.h. References Utility::ThreadID(). 00034 : m_id(id), m_text(x) { 00035 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00036 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00037 fprintf(stderr, " "); 00038 fprintf(stderr, "%d> %s%s\n", m_id, x.c_str(), colors[0]); 00039 m_level[Utility::ThreadID()]++; 00040 }
Definition at line 41 of file Debug.h. References Utility::ThreadID(). 00041 { 00042 if (!m_text.empty()) 00043 { 00044 if (m_level[Utility::ThreadID()]) 00045 m_level[Utility::ThreadID()]--; 00046 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00047 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00048 fprintf(stderr, " "); 00049 if (m_id) 00050 fprintf(stderr, "%d> /%s%s\n", m_id, m_text.c_str(), colors[0]); 00051 else 00052 fprintf(stderr, "/%s%s\n", m_text.c_str(), colors[0]); 00053 fflush(stderr); 00054 } 00055 }
Member Function Documentation
Definition at line 30 of file Debug.cpp. References colors, m_level, and Utility::ThreadID(). Referenced by operator<<(). 00031 { 00032 char slask[5000]; // temporary for vsprintf / vsnprintf 00033 va_list ap; 00034 00035 va_start(ap, format); 00036 #ifdef _WIN32 00037 vsprintf(slask, format, ap); 00038 #else 00039 vsnprintf(slask, 5000, format, ap); 00040 #endif 00041 va_end(ap); 00042 00043 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00044 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00045 fprintf(stderr, " "); 00046 if (slask[strlen(slask) - 1] == '\n') 00047 slask[strlen(slask) - 1] = 0; 00048 fprintf(stderr, "%s%s\n", slask, colors[0]); 00049 }
Definition at line 59 of file Debug.cpp. References Utility::l2string(), and m_line. 00060 { 00061 m_line += Utility::l2string(l); 00062 return *this; 00063 }
Member Data Documentation
Initial value: {
"\x1B[0;0m",
"\x1B[0;0m\x1B[31m",
"\x1B[0;0m\x1B[32m",
"\x1B[0;0m\x1B[33m",
"\x1B[0;0m\x1B[34m",
"\x1B[0;0m\x1B[35m",
"\x1B[0;0m\x1B[36m",
"\x1B[0;0m\x1B[37m",
"\x1B[1;31m",
"\x1B[1;32m",
"\x1B[1;33m",
"\x1B[1;34m",
"\x1B[1;35m",
"\x1B[1;36m",
"\x1B[1;37m" }
Definition at line 17 of file Debug.h. Referenced by Print().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4.4