2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
22 #include "support/lstrings.h"
24 /** Ideally this should have been a namespace, but since we try to be
25 compilable on older C++ compilators too, we use a struct instead.
26 This is all the different debug levels that we have.
42 PARSER = (1 << 4), // 16
44 LYXRC = (1 << 5), // 32
46 KBMAP = (1 << 6), // 64
48 LATEX = (1 << 7), // 128
50 MATHED = (1 << 8), // 256 // Alejandro, please use this.
52 FONT = (1 << 9), // 512
54 TCLASS = (1 << 10), // 1024
56 LYXVC = (1 << 11), // 2048
58 LYXSERVER = (1 << 12), // 4096
60 ROFF = (1 << 13), // 8192
62 ACTION = (1 << 14), // 16384
73 // static const type ANY = type(INFO | INIT | KEY | GUI |
74 // PARSER | LYXRC | KBMAP | LATEX |
75 // MATHED | FONT | TCLASS | LYXVC |
76 // LYXSERVER | ROFF | ACTION | LYXLEX |
79 static type const ANY;
81 /** A function to convert symbolic string names on debug levels
82 to their numerical value.
84 static Debug::type value(string const & val);
86 /** Display the tags and descriptions of the current debug level
89 static void showLevel(std::ostream & o, type level);
91 /** show all the possible tags that can be used for debugging */
92 static void showTags(std::ostream & o);
99 void operator|=(Debug::type & d1, Debug::type d2)
101 d1 = static_cast<Debug::type>(d1 | d2);
105 #include "support/DebugStream.h"
109 std::ostream & operator<<(std::ostream & o, Debug::type t);
111 extern DebugStream lyxerr;