My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

{ 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
};

Member Function Documentation

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

Definition at line 109 of file debug.cpp.

References curMask, and labelToEnumValue().

Referenced by Statistics::print().

bool Debug::isFlagSet ( DebugMask  mask)
static

Definition at line 119 of file debug.cpp.

References curMask.

Referenced by generateOutput(), msg(), Statistics::print(), validatingParseDoc(), and validatingParseText().

{
return (curMask & mask)!=0;
}
void Debug::print ( DebugMask  mask,
int  prio,
const char *  fmt,
  ... 
)
static
void Debug::printFlags ( void  )
static

Definition at line 124 of file debug.cpp.

References msg().

Referenced by devUsage().

{
int i;
for (i = 0; i < (int)(sizeof(s_labels)/sizeof(*s_labels)); i++)
{
if (s_labels[i].name)
{
msg("\t%s\n",s_labels[i].name);
}
}
}
int Debug::setFlag ( const char *  label)
static

Definition at line 102 of file debug.cpp.

References curMask, and labelToEnumValue().

Referenced by Statistics::print(), and readConfiguration().

{
int retVal = labelToEnumValue(lab);
return retVal;
}
void Debug::setPriority ( int  p)
static

Definition at line 114 of file debug.cpp.

References curPrio.

{
curPrio = p;
}

Member Data Documentation

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

Definition at line 50 of file debug.h.

Referenced by clearFlag(), isFlagSet(), print(), and setFlag().

int Debug::curPrio = 0
staticprivate

Definition at line 51 of file debug.h.

Referenced by print(), and setPriority().


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