Doxygen
Loading...
Searching...
No Matches
debug.cpp File Reference
#include <stdarg.h>
#include <algorithm>
#include <stdio.h>
#include <map>
#include <string>
#include <chrono>
#include "debug.h"
#include "message.h"
#include "qcstring.h"
+ Include dependency graph for debug.cpp:

Go to the source code of this file.

Classes

class  Timer
 

Functions

static char asciiToLower (char in)
 
static uint64_t labelToEnumValue (const QCString &l)
 

Variables

static std::map< std::string, Debug::DebugMasks_labels
 
static FILE * g_debugFile = stdout
 
static Timer g_runningTime
 

Function Documentation

◆ asciiToLower()

static char asciiToLower ( char in)
static

Definition at line 92 of file debug.cpp.

92 {
93 if (in <= 'Z' && in >= 'A')
94 return in - ('Z' - 'z');
95 return in;
96}

Referenced by convertUTF8ToLower(), and labelToEnumValue().

◆ labelToEnumValue()

static uint64_t labelToEnumValue ( const QCString & l)
static

Definition at line 98 of file debug.cpp.

99{
100 std::string s = l.str();
101 std::transform(s.begin(),s.end(),s.begin(),asciiToLower);
102 auto it = s_labels.find(s);
103 return (it!=s_labels.end()) ? it->second : Debug::DebugMask::Quiet;
104}
@ Quiet
Definition debug.h:28
const std::string & str() const
Definition qcstring.h:537
static std::map< std::string, Debug::DebugMask > s_labels
Definition debug.cpp:29
static char asciiToLower(char in)
Definition debug.cpp:92

References asciiToLower(), Debug::Quiet, s_labels, and QCString::str().

Referenced by Debug::setFlagStr().

Variable Documentation

◆ g_debugFile

FILE* g_debugFile = stdout
static

Definition at line 76 of file debug.cpp.

Referenced by Debug::print(), and Debug::setFlagStr().

◆ g_runningTime

Timer g_runningTime
static

Definition at line 197 of file debug.cpp.

Referenced by Debug::elapsedTime(), and Debug::startTimer().

◆ s_labels

std::map< std::string, Debug::DebugMask > s_labels
static

Definition at line 29 of file debug.cpp.

30{
31 { "preprocessor", Debug::Preprocessor },
32 { "nolineno", Debug::NoLineNo },
33 { "commentcnv", Debug::CommentCnv },
34 { "commentscan", Debug::CommentScan },
35 { "formula", Debug::Formula },
36 { "printtree", Debug::PrintTree },
37 { "time", Debug::Time },
38 { "extcmd", Debug::ExtCmd },
39 { "markdown", Debug::Markdown },
40 { "filteroutput", Debug::FilterOutput },
41 { "plantuml", Debug::Plantuml },
42 { "fortranfixed2free", Debug::FortranFixed2Free },
43 { "cite", Debug::Cite },
44 { "rtf", Debug::Rtf },
45 { "qhp", Debug::Qhp },
46 { "tag", Debug::Tag },
47 { "alias", Debug::Alias },
48 { "entries", Debug::Entries },
49 { "sections", Debug::Sections },
50 { "stderr", Debug::Stderr },
51 { "layout", Debug::Layout },
52 { "lex", Debug::Lex },
53 { "lex:code", Debug::Lex_code },
54 { "lex:commentcnv", Debug::Lex_commentcnv },
55 { "lex:commentscan", Debug::Lex_commentscan },
56 { "lex:configimpl", Debug::Lex_configimpl },
57 { "lex:constexp", Debug::Lex_constexp },
58 { "lex:declinfo", Debug::Lex_declinfo },
59 { "lex:defargs", Debug::Lex_defargs },
60 { "lex:doctokenizer", Debug::Lex_doctokenizer },
61 { "lex:fortrancode", Debug::Lex_fortrancode },
62 { "lex:fortranscanner", Debug::Lex_fortranscanner },
63 { "lex:lexcode", Debug::Lex_lexcode },
64 { "lex:lexscanner", Debug::Lex_lexscanner },
65 { "lex:pre", Debug::Lex_pre },
66 { "lex:pycode", Debug::Lex_pycode },
67 { "lex:pyscanner", Debug::Lex_pyscanner },
68 { "lex:scanner", Debug::Lex_scanner },
69 { "lex:sqlcode", Debug::Lex_sqlcode },
70 { "lex:vhdlcode", Debug::Lex_vhdlcode },
71 { "lex:xml", Debug::Lex_xml },
72 { "lex:xmlcode", Debug::Lex_xmlcode },
73};
@ Lex_fortranscanner
Definition debug.h:60
@ Lex_doctokenizer
Definition debug.h:58
@ Lex
Definition debug.h:50
@ Rtf
Definition debug.h:42
@ NoLineNo
Definition debug.h:41
@ Lex_pre
Definition debug.h:63
@ Lex_defargs
Definition debug.h:57
@ Alias
Definition debug.h:45
@ Lex_pycode
Definition debug.h:64
@ Layout
Definition debug.h:49
@ Markdown
Definition debug.h:36
@ Lex_declinfo
Definition debug.h:56
@ Tag
Definition debug.h:44
@ Lex_lexscanner
Definition debug.h:62
@ FilterOutput
Definition debug.h:37
@ Lex_sqlcode
Definition debug.h:67
@ Lex_code
Definition debug.h:51
@ Lex_pyscanner
Definition debug.h:65
@ Cite
Definition debug.h:40
@ ExtCmd
Definition debug.h:35
@ Sections
Definition debug.h:47
@ PrintTree
Definition debug.h:33
@ Time
Definition debug.h:34
@ Lex_xml
Definition debug.h:69
@ Stderr
Definition debug.h:48
@ Plantuml
Definition debug.h:38
@ Formula
Definition debug.h:32
@ Lex_commentcnv
Definition debug.h:52
@ Lex_vhdlcode
Definition debug.h:68
@ Lex_constexp
Definition debug.h:55
@ Lex_xmlcode
Definition debug.h:70
@ Lex_fortrancode
Definition debug.h:59
@ Lex_commentscan
Definition debug.h:53
@ Lex_lexcode
Definition debug.h:61
@ Qhp
Definition debug.h:43
@ Entries
Definition debug.h:46
@ Lex_configimpl
Definition debug.h:54
@ Preprocessor
Definition debug.h:29
@ Lex_scanner
Definition debug.h:66
@ CommentCnv
Definition debug.h:30
@ FortranFixed2Free
Definition debug.h:39
@ CommentScan
Definition debug.h:31

Referenced by labelToEnumValue(), and Debug::printFlags().