Public Types | Static Public Member Functions | Static Private Attributes | List of all members
Debug Class Reference

#include <debug.h>

Public Types

enum  DebugMask {
  Quiet = 0x00000000, FindMembers = 0x00000001, Functions = 0x00000002, Variables = 0x00000004,
  Preprocessor = 0x00000008, Classes = 0x00000010, CommentCnv = 0x00000020, CommentScan = 0x00000040,
  Validate = 0x00000080, PrintTree = 0x00000100, Time = 0x00000200, ExtCmd = 0x00000400,
  Markdown = 0x00000800, FilterOutput = 0x00001000, Lex = 0x00002000
}
 

Static Public Member Functions

static void print (DebugMask mask, int prio, const char *fmt,...)
 
static int setFlag (const char *label)
 
static void clearFlag (const char *label)
 
static bool isFlagSet (DebugMask mask)
 
static void printFlags (void)
 
static void setPriority (int p)
 

Static Private Attributes

static DebugMask curMask = Debug::Quiet
 
static int curPrio = 0
 

Detailed Description

Class containing a print function for diagnostics.

Definition at line 23 of file debug.h.

Member Enumeration Documentation

Enumerator
Quiet 
FindMembers 
Functions 
Variables 
Preprocessor 
Classes 
CommentCnv 
CommentScan 
Validate 
PrintTree 
Time 
ExtCmd 
Markdown 
FilterOutput 
Lex 

Definition at line 26 of file debug.h.

26  { Quiet = 0x00000000,
27  FindMembers = 0x00000001,
28  Functions = 0x00000002,
29  Variables = 0x00000004,
30  Preprocessor = 0x00000008,
31  Classes = 0x00000010,
32  CommentCnv = 0x00000020,
33  CommentScan = 0x00000040,
34  Validate = 0x00000080,
35  PrintTree = 0x00000100,
36  Time = 0x00000200,
37  ExtCmd = 0x00000400,
38  Markdown = 0x00000800,
39  FilterOutput = 0x00001000,
40  Lex = 0x00002000
41  };

Member Function Documentation

void Debug::clearFlag ( const char *  label)
static

Definition at line 109 of file debug.cpp.

110 {
112 }
DebugMask
Definition: debug.h:26
static DebugMask curMask
Definition: debug.h:50
static int labelToEnumValue(const char *l)
Definition: debug.cpp:95
bool Debug::isFlagSet ( DebugMask  mask)
static

Definition at line 119 of file debug.cpp.

120 {
121  return (curMask & mask)!=0;
122 }
static DebugMask curMask
Definition: debug.h:50
void Debug::print ( DebugMask  mask,
int  prio,
const char *  fmt,
  ... 
)
static

Definition at line 84 of file debug.cpp.

85 {
86  if ((curMask&mask) && prio<=curPrio)
87  {
88  va_list args;
89  va_start(args,fmt);
90  vfprintf(stdout, fmt, args);
91  va_end(args);
92  }
93 }
static QCString args
Definition: declinfo.cpp:674
static DebugMask curMask
Definition: debug.h:50
static int curPrio
Definition: debug.h:51
void Debug::printFlags ( void  )
static

Definition at line 124 of file debug.cpp.

125 {
126  int i;
127  for (i = 0; i < (int)(sizeof(s_labels)/sizeof(*s_labels)); i++)
128  {
129  if (s_labels[i].name)
130  {
131  msg("\t%s\n",s_labels[i].name);
132  }
133  }
134 }
static QCString name
Definition: declinfo.cpp:673
void msg(const char *fmt,...)
Definition: message.cpp:107
static LabelMap s_labels[]
Definition: debug.cpp:35
int Debug::setFlag ( const char *  label)
static

Definition at line 102 of file debug.cpp.

103 {
104  int retVal = labelToEnumValue(lab);
106  return retVal;
107 }
DebugMask
Definition: debug.h:26
static DebugMask curMask
Definition: debug.h:50
static int labelToEnumValue(const char *l)
Definition: debug.cpp:95
void Debug::setPriority ( int  p)
static

Definition at line 114 of file debug.cpp.

115 {
116  curPrio = p;
117 }
p
Definition: test.py:223
static int curPrio
Definition: debug.h:51

Member Data Documentation

Debug::DebugMask Debug::curMask = Debug::Quiet
staticprivate

Definition at line 50 of file debug.h.

int Debug::curPrio = 0
staticprivate

Definition at line 51 of file debug.h.


The documentation for this class was generated from the following files: