]> git.lyx.org Git - lyx.git/blob - src/error.h
Fixed the tth HTML export feature.
[lyx.git] / src / error.h
1 // -*- C++ -*-
2
3 #ifndef _ERROR_H_
4 #define _ERROR_H_
5
6 #ifdef __GNUG__
7 #pragma interface
8 #endif
9
10 #include "LString.h"
11
12 ///
13 class Error
14 {
15 public:
16         ///
17         enum DEBUG_LEVELS {
18                 ///
19                 INFO       = (1),        // 1
20                 ///
21                 INIT       = (1 << 1),   // 2
22                 ///
23                 KEY        = (1 << 2),   // 4
24                 ///
25                 TOOLBAR    = (1 << 3),   // 8
26                 ///
27                 LEX_PARSER = (1 << 4),   // 16
28                 ///
29                 LYXRC      = (1 << 5),   // 32
30                 ///
31                 KBMAP      = (1 << 6),   // 64
32                 ///
33                 LATEX      = (1 << 7),   // 128
34                 ///
35                 MATHED     = (1 << 8),   // 256 // Alejandro, please use this.
36                 ///
37                 FONT       = (1 << 9),   // 512
38                 ///
39                 TCLASS     = (1 << 10),  // 1024
40                 ///
41                 LYXVC      = (1 << 11),  // 2048
42                 ///
43                 ROFF       = (1 << 12),  // 4096
44                 ///
45                 LYXSERVER  = (1 << 13),  // 8192
46                 ///
47                 ALL        = (65535),    // 2^16-1
48                 ///
49                 ANY        = ALL
50         };
51         ///
52         Error(int level = 0);
53         ///
54         void setDebugLevel(int level);
55         /// Not implemented yet.
56         void setLogLevel(int level);
57         /// Not implemented yet.
58         void setLogFile(string const & filename);
59         ///
60         void debug(string const & msg, int level = INFO); // or ANY?
61         ///
62         bool debugging(int level = INFO) // or ANY?
63         {
64                 return (bool)(debuglevel & level);
65         }
66         ///
67         void print(string const & msg);
68 protected:
69 private:
70         ///
71         int debuglevel;
72         ///
73         int loglevel;
74 };
75
76 /// The global instance of the Error class.
77 extern Error lyxerr;
78
79 #endif