Doxygen
debug.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2020 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef DEBUG_H
17 #define DEBUG_H
18 
19 class QCString;
20 
21 /** Class containing a print function for diagnostics. */
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  Markdown = 0x00000800,
38  FilterOutput = 0x00001000,
39  Lex = 0x00002000,
40  Plantuml = 0x00004000,
41  FortranFixed2Free = 0x00008000,
42  Cite = 0x00010000,
43  NoLineNo = 0x00020000,
44  Rtf = 0x00040000
45  };
46  static void print(DebugMask mask,int prio,const char *fmt,...);
47 
48  static int setFlag(const QCString &label);
49  static void clearFlag(const QCString &label);
50  static bool isFlagSet(DebugMask mask);
51  static void printFlags();
52  static void setPriority(int p);
53 
54  static void startTimer();
55  static double elapsedTime();
56 
57  private:
59  static int curPrio;
60 };
61 
62 #endif
Debug::ExtCmd
@ ExtCmd
Definition: debug.h:36
Debug::curPrio
static int curPrio
Definition: debug.h:59
Debug::NoLineNo
@ NoLineNo
Definition: debug.h:43
Debug::Validate
@ Validate
Definition: debug.h:33
Preprocessor
Definition: pre.h:26
Debug::printFlags
static void printFlags()
Definition: debug.cpp:104
Debug::Cite
@ Cite
Definition: debug.h:42
Debug::setPriority
static void setPriority(int p)
Definition: debug.cpp:94
Debug::Lex
@ Lex
Definition: debug.h:39
Debug::FortranFixed2Free
@ FortranFixed2Free
Definition: debug.h:41
Debug::CommentScan
@ CommentScan
Definition: debug.h:32
Debug::DebugMask
DebugMask
Definition: debug.h:25
Debug::isFlagSet
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:99
Debug::FindMembers
@ FindMembers
Definition: debug.h:26
Debug::CommentCnv
@ CommentCnv
Definition: debug.h:31
Debug::Functions
@ Functions
Definition: debug.h:27
Debug::startTimer
static void startTimer()
Definition: debug.cpp:133
Debug::print
static void print(DebugMask mask, int prio, const char *fmt,...)
Definition: debug.cpp:57
Debug::FilterOutput
@ FilterOutput
Definition: debug.h:38
Debug::setFlag
static int setFlag(const QCString &label)
Definition: debug.cpp:82
Debug::curMask
static DebugMask curMask
Definition: debug.h:58
Debug::elapsedTime
static double elapsedTime()
Definition: debug.cpp:138
Debug::Variables
@ Variables
Definition: debug.h:28
Debug::Quiet
@ Quiet
Definition: debug.h:25
Markdown
Helper class to process markdown formatted text
Definition: markdown.h:32
Debug
Class containing a print function for diagnostics.
Definition: debug.h:22
Debug::Time
@ Time
Definition: debug.h:35
Debug::clearFlag
static void clearFlag(const QCString &label)
Definition: debug.cpp:89
Debug::Classes
@ Classes
Definition: debug.h:30
Debug::Rtf
@ Rtf
Definition: debug.h:44
Debug::Plantuml
@ Plantuml
Definition: debug.h:40
Debug::PrintTree
@ PrintTree
Definition: debug.h:34
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108