| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

# IMessageSvc.h

Go to the documentation of this file.

    00001 #ifndef GAUDIKERNEL_IMESSAGESVC_H
    00002 #define GAUDIKERNEL_IMESSAGESVC_H
    00003
    00004 // Include files
    00005 #include "GaudiKernel/IInterface.h"
    00006 #include <iostream>
    00007 #include <string>
    00008
    00009 // Forward declarations
    00010 class StatusCode;
    00011 class Message;
    00012
    00014 namespace MSG {
    00015   enum Level {
    00016     NIL = 0,
    00017     VERBOSE,
    00018     DEBUG,
    00019     INFO,
    00020     WARNING,
    00021     ERROR,
    00022     FATAL,
    00023     ALWAYS,
    00024     NUM_LEVELS
    00025   };
    00026   enum Color {
    00027     BLACK = 0,
    00028     RED,
    00029     GREEN,
    00030     YELLOW,
    00031     BLUE,
    00032     PURPLE,
    00033     CYAN,
    00034     WHITE,
    00035     NUM_COLORS
    00036   };
    00037 }
    00038
    00039 #ifdef _WIN32
    00040 // Avoid (hopefully) conflicts between Windows' headers and MSG.
    00041 #  ifndef NOMSG
    00042 #    define NOMSG
    00043 #    ifndef NOGDI
    00044 #      define NOGDI
    00045 #    endif
    00046 #  endif
    00047 #endif
    00048
    00057 class GAUDI_API IMessageSvc: virtual public IInterface {
    00058 public:
    00060   DeclareInterfaceID(IMessageSvc,2,0);
    00061
    00066   virtual void reportMessage( const Message& msg, int outputLevel ) = 0;
    00067
    00071   virtual void reportMessage( const Message& message ) = 0;
    00072
    00078   virtual void reportMessage( const StatusCode& code,
    00079                               const std::string& source = "" ) = 0;
    00080
    00086   virtual void reportMessage( const std::string& source,
    00087                               int type,
    00088                               const std::string& message ) = 0;
    00089
    00096   virtual void reportMessage( const char* source,
    00097                               int type,
    00098                               const char* message = "" ) = 0;
    00099
    00104   virtual void insertMessage( const StatusCode& code,
    00105                               const Message& message ) = 0;
    00106
    00108   virtual void eraseMessage() = 0;
    00109
    00111   virtual void eraseMessage( const StatusCode& code ) = 0;
    00112
    00117   virtual void eraseMessage( const StatusCode& code,
    00118                              const Message& message  ) = 0;
    00119
    00125   virtual void insertStream( int type,
    00126                              const std::string& name,
    00127                              std::ostream* stream ) = 0;
    00128
    00130   virtual void eraseStream() = 0;
    00131
    00133   virtual void eraseStream( int message_type ) = 0;
    00134
    00139   virtual void eraseStream( int type,
    00140                             std::ostream* stream ) = 0;
    00141
    00145   virtual void eraseStream( std::ostream* stream ) = 0;
    00146
    00148   virtual std::ostream* defaultStream() const = 0;
    00149
    00153   virtual void setDefaultStream( std::ostream* stream ) = 0;
    00154
    00156   virtual int outputLevel()   const = 0;
    00157
    00161   virtual int outputLevel( const std::string& source ) const = 0;
    00162
    00164   virtual void setOutputLevel( int new_level )  = 0;
    00165
    00170   virtual void setOutputLevel( const std::string& source,
    00171                                int new_level)  = 0;
    00172
    00173
    00176   virtual bool useColor() const = 0;
    00177
    00181   virtual std::string getLogColor(int logLevel) const = 0;
    00182
    00185   virtual int messageCount( MSG::Level level ) const = 0;
    00186
    00187 };
    00188
    00189 class GAUDI_API IInactiveMessageCounter: virtual public IInterface {
    00190 public:
    00192   DeclareInterfaceID(IInactiveMessageCounter,1,0);
    00193
    00198   virtual void incrInactiveCount( MSG::Level level,
    00199                                   const std::string& src ) = 0;
    00200 };
    00201
    00202 #endif // GAUDIKERNEL_IMESSAGESVC_H

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines