| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- File List
- File Members

# IMessageSvc.h

Go to the documentation of this file.

    00001 // $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/IMessageSvc.h,v 1.7 2007/01/18 14:53:59 hmd Exp $
    00002 #ifndef GAUDIKERNEL_IMESSAGESVC_H
    00003 #define GAUDIKERNEL_IMESSAGESVC_H
    00004
    00005 // Include files
    00006 #include "GaudiKernel/IInterface.h"
    00007 #include <iostream>
    00008 #include <string>
    00009
    00010 // Forward declarations
    00011 class StatusCode;
    00012 class Message;
    00013
    00014 // Declaration of the interface ID ( interface id, major version, minor version)
    00015 static const InterfaceID IID_IMessageSvc(30, 1 , 0);
    00016
    00018 namespace MSG   {
    00019   enum Level   {
    00020         NIL = 0,
    00021         VERBOSE,
    00022         DEBUG,
    00023         INFO,
    00024         WARNING,
    00025         ERROR,
    00026         FATAL,
    00027         ALWAYS,
    00028         NUM_LEVELS
    00029   };
    00030   enum Color   {
    00031         BLACK = 0,
    00032         RED,
    00033         GREEN,
    00034         YELLOW,
    00035         BLUE,
    00036         PURPLE,
    00037         CYAN,
    00038         WHITE,
    00039         NUM_COLORS
    00040   };
    00041 }
    00042
    00051 class IMessageSvc : virtual public IInterface {
    00052 public:
    00053
    00055   static const InterfaceID& interfaceID() { return IID_IMessageSvc; }
    00056
    00060   virtual void reportMessage( const Message& message ) = 0;
    00061
    00067   virtual void reportMessage( const StatusCode& code,
    00068                               const std::string& source = "" ) = 0;
    00069
    00075   virtual void reportMessage( const std::string& source,
    00076                               int type,
    00077                               const std::string& message ) = 0;
    00078
    00085   virtual void reportMessage( const char* source,
    00086                               int type,
    00087                               const char* message = "" ) = 0;
    00088
    00093   virtual void insertMessage( const StatusCode& code,
    00094                               const Message& message ) = 0;
    00095
    00097   virtual void eraseMessage() = 0;
    00098
    00100   virtual void eraseMessage( const StatusCode& code ) = 0;
    00101
    00106   virtual void eraseMessage( const StatusCode& code,
    00107                              const Message& message  ) = 0;
    00108
    00114   virtual void insertStream( int type,
    00115                              const std::string& name,
    00116                              std::ostream* stream ) = 0;
    00117
    00119   virtual void eraseStream() = 0;
    00120
    00122   virtual void eraseStream( int message_type ) = 0;
    00123
    00128   virtual void eraseStream( int type,
    00129                             std::ostream* stream ) = 0;
    00130
    00134   virtual void eraseStream( std::ostream* stream ) = 0;
    00135
    00137   virtual std::ostream* defaultStream() const = 0;
    00138
    00142   virtual void setDefaultStream( std::ostream* stream ) = 0;
    00143
    00145   virtual int outputLevel()   const = 0;
    00146
    00150   virtual int outputLevel( const std::string& source ) const = 0;
    00151
    00153   virtual void setOutputLevel( int new_level )  = 0;
    00154
    00159   virtual void setOutputLevel( const std::string& source,
    00160                                int new_level)  = 0;
    00161
    00162
    00165   virtual bool useColor() const = 0;
    00166
    00170   virtual std::string getLogColor(int logLevel) const = 0;
    00171
    00174   virtual int messageCount( MSG::Level level ) const = 0;
    00175
    00176
    00177 };
    00178
    00179 #endif // GAUDIKERNEL_IMESSAGESVC_H