| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IMessageSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IMESSAGESVC_H
2 #define GAUDIKERNEL_IMESSAGESVC_H
3
4 // Include files
5 #include "GaudiKernel/IInterface.h"
6 #include <iostream>
7 #include <string>
8
9 // Forward declarations
10 class StatusCode;
11 class Message;
12
14 namespace MSG {
15 enum Level {
16 NIL = 0,
17 VERBOSE,
18 DEBUG,
19 INFO,
20 WARNING,
21 ERROR,
22 FATAL,
23 ALWAYS,
24 NUM_LEVELS
25 };
26 enum Color {
27 BLACK = 0,
28 RED,
29 GREEN,
30 YELLOW,
31 BLUE,
32 PURPLE,
33 CYAN,
34 WHITE,
35 NUM_COLORS
36 };
37 }
38
39 #ifdef _WIN32
40 // Avoid (hopefully) conflicts between Windows' headers and MSG.
41 # ifndef NOMSG
42 # define NOMSG
43 # ifndef NOGDI
44 # define NOGDI
45 # endif
46 # endif
47 #endif
48
57 class GAUDI_API IMessageSvc: virtual public IInterface {
58 public:
60 DeclareInterfaceID(IMessageSvc,2,0);
61
66 virtual void reportMessage( const Message& msg, int outputLevel ) = 0;
67
71 virtual void reportMessage( const Message& message ) = 0;
72
78 virtual void reportMessage( const StatusCode& code,
79 const std::string& source = "" ) = 0;
80
86 virtual void reportMessage( const std::string& source,
87 int type,
88 const std::string& message ) = 0;
89
96 virtual void reportMessage( const char* source,
97 int type,
98 const char* message = "" ) = 0;
99
104 virtual void insertMessage( const StatusCode& code,
105 const Message& message ) = 0;
106
108 virtual void eraseMessage() = 0;
109
111 virtual void eraseMessage( const StatusCode& code ) = 0;
112
117 virtual void eraseMessage( const StatusCode& code,
118 const Message& message ) = 0;
119
125 virtual void insertStream( int type,
126 const std::string& name,
127 std::ostream* stream ) = 0;
128
130 virtual void eraseStream() = 0;
131
133 virtual void eraseStream( int message_type ) = 0;
134
139 virtual void eraseStream( int type,
140 std::ostream* stream ) = 0;
141
145 virtual void eraseStream( std::ostream* stream ) = 0;
146
148 virtual std::ostream* defaultStream() const = 0;
149
153 virtual void setDefaultStream( std::ostream* stream ) = 0;
154
156 virtual int outputLevel() const = 0;
157
161 virtual int outputLevel( const std::string& source ) const = 0;
162
164 virtual void setOutputLevel( int new_level ) = 0;
165
170 virtual void setOutputLevel( const std::string& source,
171 int new_level) = 0;
172
173
176 virtual bool useColor() const = 0;
177
181 virtual std::string getLogColor(int logLevel) const = 0;
182
185 virtual int messageCount( MSG::Level level ) const = 0;
186
187 };
188
189 class GAUDI_API IInactiveMessageCounter: virtual public IInterface {
190 public:
192 DeclareInterfaceID(IInactiveMessageCounter,1,0);
193
198 virtual void incrInactiveCount( MSG::Level level,
199 const std::string& src ) = 0;
200 };
201
202 #endif // GAUDIKERNEL_IMESSAGESVC_H