Fix for UBSan build
[platform/upstream/doxygen.git] / src / debug.h
1 /******************************************************************************
2  *
3  * $Id: debug.h,v 1.6 2001/03/19 19:27:40 root Exp $
4  *
5  *
6  * Copyright (C) 1997-2012 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 containing a print function for diagnostics. */
23 class Debug
24 {
25   public:
26     enum DebugMask { 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                    };
41     static void print(DebugMask mask,int prio,const char *fmt,...);
42     static void setFlag(const char *label);
43     static void clearFlag(const char *label);
44     static bool isFlagSet(DebugMask mask);
45     static void setPriority(int p);
46     
47   private:
48     static DebugMask curMask;
49     static int curPrio;
50 };
51
52 #endif