Debug Class Reference#include <Debug.h>
Detailed DescriptionDefinition at line 14 of file Debug.h. Constructor & Destructor Documentation
Definition at line 26 of file Debug.h. References Utility::ThreadID(). 00026 : m_id(0), m_text(x) { 00027 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00028 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00029 fprintf(stderr, " "); 00030 fprintf(stderr, "%s%s\n", x.c_str(), colors[0]); 00031 m_level[Utility::ThreadID()]++; 00032 }
Definition at line 33 of file Debug.h. References Utility::ThreadID(). 00033 : m_id(id), m_text(x) { 00034 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00035 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00036 fprintf(stderr, " "); 00037 fprintf(stderr, "%d> %s%s\n", m_id, x.c_str(), colors[0]); 00038 m_level[Utility::ThreadID()]++; 00039 }
Definition at line 40 of file Debug.h. References Utility::ThreadID(). 00040 { 00041 if (!m_text.empty()) 00042 { 00043 if (m_level[Utility::ThreadID()]) 00044 m_level[Utility::ThreadID()]--; 00045 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00046 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00047 fprintf(stderr, " "); 00048 if (m_id) 00049 fprintf(stderr, "%d> /%s%s\n", m_id, m_text.c_str(), colors[0]); 00050 else 00051 fprintf(stderr, "/%s%s\n", m_text.c_str(), colors[0]); 00052 fflush(stderr); 00053 } 00054 }
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 vsnprintf(slask, sizeof(slask), format, ap); 00037 va_end(ap); 00038 00039 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00040 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00041 fprintf(stderr, " "); 00042 if (slask[strlen(slask) - 1] == '\n') 00043 slask[strlen(slask) - 1] = 0; 00044 fprintf(stderr, "%s%s\n", slask, colors[0]); 00045 }
Definition at line 62 of file Debug.cpp. References Utility::l2string(), and m_line. 00063 { 00064 m_line += Utility::l2string(l); 00065 return *this; 00066 }
Definition at line 69 of file Debug.cpp. References Utility::l2string(), and m_line. 00070 { 00071 m_line += Utility::l2string(l); 00072 return *this; 00073 }
Definition at line 76 of file Debug.cpp. References Utility::l2string(), and m_line. 00077 { 00078 m_line += Utility::l2string(l); 00079 return *this; 00080 }
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 16 of file Debug.h. Referenced by Print().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4.4