4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
10 * Full author contact details are available in file CREDITS.
16 #include "support/debugstream.h"
21 /** Ideally this should have been a namespace, but since we try to be
22 compilable on older C++ compilators too, we use a class instead.
23 This is all the different debug levels that we have.
25 class lyx_debug_trait {
39 static bool match(type a, type b) {
43 /** A function to convert symbolic string names on debug levels
44 to their numerical value.
46 static type value(std::string const & val);
48 /** Display the tags and descriptions of the current debug level
51 static void showLevel(std::ostream & o, type level);
53 /** show all the possible tags that can be used for debugging */
54 static void showTags(std::ostream & o);
61 void operator|=(lyx_debug_trait::type & d1, lyx_debug_trait::type d2)
63 d1 = static_cast<lyx_debug_trait::type>(d1 | d2);
67 // std::ostream & operator<<(std::ostream & o, Debug::type t);
69 typedef basic_debugstream<lyx_debug_trait> LyXErr;
70 typedef LyXErr::debug Debug;