Changeset 3293 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Dec 26, 2004, 6:35:29 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/debug.h
r3212 r3293 1 1 #ifndef _DEBUG_H 2 2 #define _DEBUG_H 3 4 5 /////////////////////////////////////////////////// 6 /// PRINTF: prints with filename and linenumber /// 7 /////////////////////////////////////////////////// 3 8 4 9 #ifdef DEBUG … … 47 52 printf("%s:%d::", __FILE__, __LINE__) && printf 48 53 54 55 56 57 /////////////////////////////////////////////////// 58 /// PRINT: just prints output as is /// 59 /////////////////////////////////////////////////// 60 61 #ifdef DEBUG 62 #define PRINT(x) \ 63 PRINT ## x 64 65 #if DEBUG >= 1 66 #define PRINT1 \ 67 if (verbose >= 1 ) \ 68 printf 69 #else 70 #define PRINT1 // 71 #endif 72 73 #if DEBUG >= 2 74 #define PRINT2 \ 75 if (verbose >= 2 ) \ 76 printf 77 78 #else 79 #define PRINT2 // 80 #endif 81 82 #if DEBUG >= 3 83 #define PRINT3 \ 84 if (verbose >= 3 ) \ 85 printf 86 #else 87 #define PRINT3 // 88 #endif 89 90 #if DEBUG >= 4 91 #define PRINT4 \ 92 if (verbose >= 4 ) \ 93 printf 94 #else 95 #define PRINT4 // 96 #endif 97 98 99 #else 100 #define PRINT(x) // 101 #endif 102 103 #define PRINT0 \ 104 printf 105 106 107 /////////////////////////////////////////////////// 108 /// COUT: simple cout print with verbose-check /// 109 /////////////////////////////////////////////////// 110 #ifdef DEBUG 111 #define COUT(x) \ 112 COUT ## x 113 114 #if DEBUG >= 1 115 #define COUT1 \ 116 if (verbose >= 1 ) \ 117 cout 118 #else 119 #define COUT1 // 120 #endif 121 122 #if DEBUG >= 2 123 #define COUT2 \ 124 if (verbose >= 2 ) \ 125 cout 126 127 #else 128 #define COUT2 // 129 #endif 130 131 #if DEBUG >= 3 132 #define COUT3 \ 133 if (verbose >= 3 ) \ 134 cout 135 #else 136 #define COUT3 // 137 #endif 138 139 #if DEBUG >= 4 140 #define COUT4 \ 141 if (verbose >= 4 ) \ 142 cout 143 #else 144 #define COUT4 // 145 #endif 146 147 148 #else 149 #define COUT(x) // 150 #endif 151 152 #define COUT0 \ 153 cout 154 49 155 #endif /* _DEBUG_H */
Note: See TracChangeset
for help on using the changeset viewer.