![]() |
Debug Class Reference#include <Debug.h>
Detailed DescriptionDefinition at line 44 of file Debug.h. Constructor & Destructor Documentation
Definition at line 56 of file Debug.h. References Utility::ThreadID(). 00056 : m_id(0), m_text(x) { 00057 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00058 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00059 fprintf(stderr, " "); 00060 fprintf(stderr, "%s%s\n", x.c_str(), colors[0]); 00061 m_level[Utility::ThreadID()]++; 00062 }
Definition at line 63 of file Debug.h. References Utility::ThreadID(). 00063 : m_id(id), m_text(x) { 00064 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00065 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00066 fprintf(stderr, " "); 00067 fprintf(stderr, "%d> %s%s\n", m_id, x.c_str(), colors[0]); 00068 m_level[Utility::ThreadID()]++; 00069 }
Definition at line 70 of file Debug.h. References Utility::ThreadID(). 00070 { 00071 if (!m_text.empty()) 00072 { 00073 if (m_level[Utility::ThreadID()]) 00074 m_level[Utility::ThreadID()]--; 00075 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00076 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00077 fprintf(stderr, " "); 00078 if (m_id) 00079 fprintf(stderr, "%d> /%s%s\n", m_id, m_text.c_str(), colors[0]); 00080 else 00081 fprintf(stderr, "/%s%s\n", m_text.c_str(), colors[0]); 00082 fflush(stderr); 00083 } 00084 }
Member Function Documentation
Definition at line 60 of file Debug.cpp. References colors, m_level, and Utility::ThreadID(). Referenced by operator<<(). 00061 { 00062 char slask[5000]; // temporary for vsprintf / vsnprintf 00063 va_list ap; 00064 00065 va_start(ap, format); 00066 vsnprintf(slask, sizeof(slask), format, ap); 00067 va_end(ap); 00068 00069 fprintf(stderr, "%s", colors[Utility::ThreadID() % 14 + 1]); 00070 for (int i = 0; i < m_level[Utility::ThreadID()]; i++) 00071 fprintf(stderr, " "); 00072 if (slask[strlen(slask) - 1] == '\n') 00073 slask[strlen(slask) - 1] = 0; 00074 fprintf(stderr, "%s%s\n", slask, colors[0]); 00075 }
Definition at line 92 of file Debug.cpp. References Utility::l2string(), and m_line. 00093 { 00094 m_line += Utility::l2string(l); 00095 return *this; 00096 }
Definition at line 99 of file Debug.cpp. References Utility::l2string(), and m_line. 00100 { 00101 m_line += Utility::l2string(l); 00102 return *this; 00103 }
Definition at line 106 of file Debug.cpp. References Utility::l2string(), and m_line. 00107 { 00108 m_line += Utility::l2string(l); 00109 return *this; 00110 }
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 46 of file Debug.h. Referenced by Print().
The documentation for this class was generated from the following files: |