Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IMessageSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IMESSAGESVC_H
2 #define GAUDIKERNEL_IMESSAGESVC_H
3 
4 // Include files
6 #include <iostream>
7 #include <string>
8 
9 // Forward declarations
10 class StatusCode;
11 class Message;
12 
14 namespace MSG {
17 } // namespace MSG
18 
19 #ifdef _WIN32
20 // Avoid (hopefully) conflicts between Windows' headers and MSG.
21 # ifndef NOMSG
22 # define NOMSG
23 # ifndef NOGDI
24 # define NOGDI
25 # endif
26 # endif
27 #endif
28 
37 class GAUDI_API IMessageSvc : virtual public IInterface {
38 public:
41 
46  virtual void reportMessage( const Message& msg, int outputLevel ) = 0;
47 
51  virtual void reportMessage( const Message& message ) = 0;
52 
58  virtual void reportMessage( const StatusCode& code, const std::string& source = "" ) = 0;
59 
65  virtual void reportMessage( const std::string& source, int type, const std::string& message ) = 0;
66 
73  virtual void reportMessage( const char* source, int type, const char* message = "" ) = 0;
74 
79  virtual void insertMessage( const StatusCode& code, const Message& message ) = 0;
80 
82  virtual void eraseMessage() = 0;
83 
85  virtual void eraseMessage( const StatusCode& code ) = 0;
86 
91  virtual void eraseMessage( const StatusCode& code, const Message& message ) = 0;
92 
98  virtual void insertStream( int type, const std::string& name, std::ostream* stream ) = 0;
99 
101  virtual void eraseStream() = 0;
102 
104  virtual void eraseStream( int message_type ) = 0;
105 
110  virtual void eraseStream( int type, std::ostream* stream ) = 0;
111 
115  virtual void eraseStream( std::ostream* stream ) = 0;
116 
118  virtual std::ostream* defaultStream() const = 0;
119 
123  virtual void setDefaultStream( std::ostream* stream ) = 0;
124 
126  virtual int outputLevel() const = 0;
127 
131  virtual int outputLevel( const std::string& source ) const = 0;
132 
134  virtual void setOutputLevel( int new_level ) = 0;
135 
140  virtual void setOutputLevel( const std::string& source, int new_level ) = 0;
141 
144  virtual bool useColor() const = 0;
145 
149  virtual std::string getLogColor( int logLevel ) const = 0;
150 
153  virtual int messageCount( MSG::Level level ) const = 0;
154 };
155 
157 public:
160 
165  virtual void incrInactiveCount( MSG::Level level, const std::string& src ) = 0;
166 };
167 
168 #endif // GAUDIKERNEL_IMESSAGESVC_H
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:13
Definition of the basic interface.
Definition: IInterface.h:244
The IMessage is the interface implemented by the message service.
Definition: IMessageSvc.h:37
The Message class.
Definition: Message.h:17
Print levels enumeration.
Definition: IMessageSvc.h:14
#define GAUDI_API
Definition: Kernel.h:71
STL class.