|
Packit |
1c1d7e |
/******************************************************************************
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
1c1d7e |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit |
1c1d7e |
* granted. No representations are made about the suitability of this software
|
|
Packit |
1c1d7e |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit |
1c1d7e |
* See the GNU General Public License for more details.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit |
1c1d7e |
* input used in their production; they are not affected by this license.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#ifndef _DEBUG_H
|
|
Packit |
1c1d7e |
#define _DEBUG_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class containing a print function for diagnostics. */
|
|
Packit |
1c1d7e |
class Debug
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
enum DebugMask { Quiet = 0x00000000,
|
|
Packit |
1c1d7e |
FindMembers = 0x00000001,
|
|
Packit |
1c1d7e |
Functions = 0x00000002,
|
|
Packit |
1c1d7e |
Variables = 0x00000004,
|
|
Packit |
1c1d7e |
Preprocessor = 0x00000008,
|
|
Packit |
1c1d7e |
Classes = 0x00000010,
|
|
Packit |
1c1d7e |
CommentCnv = 0x00000020,
|
|
Packit |
1c1d7e |
CommentScan = 0x00000040,
|
|
Packit |
1c1d7e |
Validate = 0x00000080,
|
|
Packit |
1c1d7e |
PrintTree = 0x00000100,
|
|
Packit |
1c1d7e |
Time = 0x00000200,
|
|
Packit |
1c1d7e |
ExtCmd = 0x00000400,
|
|
Packit |
1c1d7e |
Markdown = 0x00000800,
|
|
Packit |
1c1d7e |
FilterOutput = 0x00001000,
|
|
Packit |
1c1d7e |
Lex = 0x00002000
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
static void print(DebugMask mask,int prio,const char *fmt,...);
|
|
Packit |
1c1d7e |
static int setFlag(const char *label);
|
|
Packit |
1c1d7e |
static void clearFlag(const char *label);
|
|
Packit |
1c1d7e |
static bool isFlagSet(DebugMask mask);
|
|
Packit |
1c1d7e |
static void printFlags(void);
|
|
Packit |
1c1d7e |
static void setPriority(int p);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
static DebugMask curMask;
|
|
Packit |
1c1d7e |
static int curPrio;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|