|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * |
|
6 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
|
7 * |
|
8 * Permission to use, copy, modify, and distribute this software and its |
|
9 * documentation under the terms of the GNU General Public License is hereby |
|
10 * granted. No representations are made about the suitability of this software |
|
11 * for any purpose. It is provided "as is" without express or implied warranty. |
|
12 * See the GNU General Public License for more details. |
|
13 * |
|
14 * Documents produced by Doxygen are derivative works derived from the |
|
15 * input used in their production; they are not affected by this license. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef _DEBUG_H |
|
20 #define _DEBUG_H |
|
21 |
|
22 class Debug |
|
23 { |
|
24 public: |
|
25 enum DebugMask { Quiet = 0x00000000, |
|
26 FindMembers = 0x00000001, |
|
27 Functions = 0x00000002, |
|
28 Variables = 0x00000004, |
|
29 Preprocessor = 0x00000008, |
|
30 Classes = 0x00000010, |
|
31 CommentCnv = 0x00000020, |
|
32 CommentScan = 0x00000040, |
|
33 Validate = 0x00000080, |
|
34 PrintTree = 0x00000100, |
|
35 Time = 0x00000200, |
|
36 ExtCmd = 0x00000400 |
|
37 }; |
|
38 static void print(DebugMask mask,int prio,const char *fmt,...); |
|
39 static void setFlag(const char *label); |
|
40 static void clearFlag(const char *label); |
|
41 static bool isFlagSet(DebugMask mask); |
|
42 static void setPriority(int p); |
|
43 |
|
44 private: |
|
45 static DebugMask curMask; |
|
46 static int curPrio; |
|
47 }; |
|
48 |
|
49 #endif |