8 /** Ideally this should have been a namespace, but since we try to be
9 compilable on older C++ compilators too, we use a struct instead.
10 This is all the different debug levels that we have.
24 TOOLBAR = (1 << 3), // 8
26 PARSER = (1 << 4), // 16
28 LYXRC = (1 << 5), // 32
30 KBMAP = (1 << 6), // 64
32 LATEX = (1 << 7), // 128
34 MATHED = (1 << 8), // 256 // Alejandro, please use this.
36 FONT = (1 << 9), // 512
38 TCLASS = (1 << 10), // 1024
40 LYXVC = (1 << 11), // 2048
42 LYXSERVER = (1 << 12), // 4096
47 static const type ANY = type(INFO | INIT | KEY | TOOLBAR |
48 PARSER | LYXRC | KBMAP | LATEX |
49 MATHED | FONT | TCLASS | LYXVC |
52 /** A function to convert symbolic string names on debug levels
53 to their numerical value.
55 static Debug::type value(string const & val) {
59 string::size_type st = v.find(',');
60 string tmp(v.substr(0, st));
61 if (tmp.empty()) break;
62 if (val == "NONE") l |= Debug::NONE;
63 else if (val == "INFO") l |= Debug::INFO;
64 else if (val == "INIT") l |= Debug::INIT;
65 else if (val == "KEY") l |= Debug::KEY;
66 else if (val == "TOOLBAR") l |= Debug::TOOLBAR;
67 else if (val == "PARSER") l |= Debug::PARSER;
68 else if (val == "LYXRC") l |= Debug::LYXRC;
69 else if (val == "KBMAP") l |= Debug::KBMAP;
70 else if (val == "LATEX") l |= Debug::LATEX;
71 else if (val == "MATHED") l |= Debug::MATHED;
72 else if (val == "FONT") l |= Debug::FONT;
73 else if (val == "TCLASS") l |= Debug::TCLASS;
74 else if (val == "LYXVC") l |= Debug::LYXVC;
75 else if (val == "LYXSERVER") l |= Debug::LYXSERVER;
76 else if (val == "ROFF") l |= Debug::ROFF;
77 else break; // unknown string
78 if (st == string::npos) break;
81 return Debug::type(l);
86 ostream & operator<<(ostream & o, Debug::type t);
88 #include "support/DebugStream.h"
90 extern DebugStream lyxerr;