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 friend inline void operator|=(Debug::type & d1, Debug::type d2);
54 /** A function to convert symbolic string names on debug levels
55 to their numerical value.
57 static Debug::type value(string const & val) {
61 string::size_type st = v.find(',');
62 string tmp(v.substr(0, st));
63 if (tmp.empty()) break;
64 if (val == "NONE") l |= Debug::NONE;
65 else if (val == "INFO") l |= Debug::INFO;
66 else if (val == "INIT") l |= Debug::INIT;
67 else if (val == "KEY") l |= Debug::KEY;
68 else if (val == "TOOLBAR") l |= Debug::TOOLBAR;
69 else if (val == "PARSER") l |= Debug::PARSER;
70 else if (val == "LYXRC") l |= Debug::LYXRC;
71 else if (val == "KBMAP") l |= Debug::KBMAP;
72 else if (val == "LATEX") l |= Debug::LATEX;
73 else if (val == "MATHED") l |= Debug::MATHED;
74 else if (val == "FONT") l |= Debug::FONT;
75 else if (val == "TCLASS") l |= Debug::TCLASS;
76 else if (val == "LYXVC") l |= Debug::LYXVC;
77 else if (val == "LYXSERVER") l |= Debug::LYXSERVER;
78 else if (val == "ROFF") l |= Debug::ROFF;
79 else break; // unknown string
80 if (st == string::npos) break;
87 inline void operator|=(Debug::type & d1, Debug::type d2)
89 d1 = static_cast<Debug::type>(d1 | d2);
93 #include "support/DebugStream.h"
96 ostream & operator<<(ostream & o, Debug::type t);
98 extern DebugStream lyxerr;