Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

MsgStream Class Reference

Definition of the MsgStream class used to transmit messages. More...

#include <GaudiKernel/MsgStream.h>

List of all members.

Public Types

enum  Error { MSGSTREAM_ERROR = -1 }
 Error return code in case ios modification is requested for inactive streams. More...


Public Methods

 MsgStream (IMessageSvc* svc, int buffer_length=128)
 Standard constructor: Connect to message service for output. More...

 MsgStream (IMessageSvc* svc, const std::string& source, int buffer_length=128)
 Standard constructor: Connect to message service for output. More...

 MsgStream (const MsgStream& msg)
 Copy constructor. More...

virtual ~MsgStream ()
 Standard destructor. More...

MsgStream& report (int lvl)
 Initialize report of new message: activate if print level is sufficient. More...

virtual MsgStream& doOutput ()
 Output method. More...

const std::string& buffer () const
 Access string buffer. More...

std::ostrstream& stream ()
 Access string MsgStream. More...

void setLevel (int level)
 Update outputlevel. More...

MSG::Level level ()
 Retrieve output level. More...

void activate ()
 Activate MsgStream. More...

void deactivate ()
 Deactivate MsgStream. More...

bool isActive () const
 Accessor: is MsgStream active. More...

MsgStream& flush ()
MsgStream& write (const char* buff,int len)
MsgStream& operator<< (MsgStream& (*_f)(MsgStream&))
 Accept MsgStream modifiers. More...

MsgStream& operator<< (std::ostream& (*_f)(std::ostream&))
 Accept oMsgStream modifiers. More...

MsgStream& operator<< (std::ios& (*_f)(std::ios&))
 Accept ios modifiers. More...

MsgStream& operator<< (MSG::Level level)
 Accept MsgStream activation using MsgStreamer operator. More...

MsgStream& operator<< (const char* arg)
MsgStream& operator<< (const unsigned char arg)
MsgStream& operator<< (const signed char arg)
MsgStream& operator<< (char arg)
MsgStream& operator<< (short arg)
MsgStream& operator<< (unsigned short arg)
MsgStream& operator<< (int arg)
MsgStream& operator<< (unsigned int arg)
MsgStream& operator<< (long arg)
MsgStream& operator<< (unsigned long arg)
MsgStream& operator<< (longlong arg)
MsgStream& operator<< (float arg)
MsgStream& operator<< (double arg)
MsgStream& operator<< (long double arg)
MsgStream& operator<< (bool arg)
MsgStream& operator<< (const void* arg)
MsgStream& operator<< (const std::string& arg)
long flags () const
long flags (long v)
long setf (long v)
int width () const
int width (int v)
char fill () const
char fill (char v)
int precision () const
int precision (int v)
int rdstate () const
int good () const
int eof () const
int bad () const
long setf (long _f,long _m)
void unsetf (long _l)
void clear (int _i = 0)

Protected Attributes

IMessageSvcm_service
 Pointer to message service if buffer has send. More...

std::string m_buffer
 Use standard string for information buffering. More...

std::string m_source
 Use standard string for source information to be passed to the message service. More...

std::ostrstream m_stream
 String MsgStream associated to buffer. More...

bool m_active
 Flag set to true if formatting engine is active. More...

MSG::Level m_level
 Debug level of the message service. More...

MSG::Level m_currLevel
 Current debug level. More...


Detailed Description

Definition of the MsgStream class used to transmit messages.

This class is intended to ease the use of error logging to the message service

@author: M.Frank

Version:
1.0

Definition at line 19 of file MsgStream.h.


Member Enumeration Documentation

enum MsgStream::Error
 

Error return code in case ios modification is requested for inactive streams.

Enumeration values:
MSGSTREAM_ERROR  

Definition at line 22 of file MsgStream.h.


Constructor & Destructor Documentation

MsgStream::MsgStream ( IMessageSvc * svc,
int buffer_length = 128 )
 

Standard constructor: Connect to message service for output.

Definition at line 27 of file MsgStream.cpp.

MsgStream::MsgStream ( IMessageSvc * svc,
const std::string & source,
int buffer_length = 128 )
 

Standard constructor: Connect to message service for output.

Definition at line 35 of file MsgStream.cpp.

MsgStream::MsgStream ( const MsgStream & msg ) [inline]
 

Copy constructor.

Definition at line 46 of file MsgStream.h.

MsgStream::~MsgStream ( ) [virtual]
 

Standard destructor.

Definition at line 43 of file MsgStream.cpp.


Member Function Documentation

void MsgStream::activate ( ) [inline]
 

Activate MsgStream.

Definition at line 81 of file MsgStream.h.

Referenced by report().

int MsgStream::bad ( ) const [inline]
 

Definition at line 153 of file MsgStream.h.

const std::string & MsgStream::buffer ( ) const [inline]
 

Access string buffer.

Definition at line 64 of file MsgStream.h.

void MsgStream::clear ( int _i = 0 ) [inline]
 

Definition at line 160 of file MsgStream.h.

void MsgStream::deactivate ( ) [inline]
 

Deactivate MsgStream.

Definition at line 85 of file MsgStream.h.

Referenced by report().

MsgStream & MsgStream::doOutput ( ) [virtual]
 

Output method.

Definition at line 46 of file MsgStream.cpp.

Referenced by endreq().

int MsgStream::eof ( ) const [inline]
 

Definition at line 152 of file MsgStream.h.

char MsgStream::fill ( char v ) [inline]
 

Definition at line 147 of file MsgStream.h.

char MsgStream::fill ( ) const [inline]
 

Definition at line 146 of file MsgStream.h.

long MsgStream::flags ( long v ) [inline]
 

Definition at line 142 of file MsgStream.h.

long MsgStream::flags ( ) const [inline]
 

Definition at line 141 of file MsgStream.h.

MsgStream & MsgStream::flush ( ) [inline]
 

Definition at line 93 of file MsgStream.h.

int MsgStream::good ( ) const [inline]
 

Definition at line 151 of file MsgStream.h.

bool MsgStream::isActive ( ) const [inline]
 

Accessor: is MsgStream active.

Definition at line 89 of file MsgStream.h.

Referenced by bad(), clear(), doOutput(), eof(), fill(), flags(), flush(), good(), operator<<(), precision(), rdstate(), setf(), unsetf(), width(), and write().

MSG::Level MsgStream::level ( ) [inline]
 

Retrieve output level.

Definition at line 77 of file MsgStream.h.

Referenced by report().

MsgStream & MsgStream::operator<< ( const std::string & arg ) [inline]
 

Definition at line 139 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( const void * arg ) [inline]
 

Definition at line 138 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( bool arg ) [inline]
 

Definition at line 137 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( long double ) [inline]
 

Definition at line 136 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( double arg ) [inline]
 

Definition at line 135 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( float arg ) [inline]
 

Definition at line 134 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( longlong double ) [inline]
 

Definition at line 131 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( unsigned long arg ) [inline]
 

Definition at line 130 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( long double ) [inline]
 

Definition at line 129 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( unsigned int arg ) [inline]
 

Definition at line 128 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( int arg ) [inline]
 

Definition at line 127 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( unsigned short arg ) [inline]
 

Definition at line 126 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( short arg ) [inline]
 

Definition at line 125 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( char arg ) [inline]
 

Definition at line 124 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( const signed char arg ) [inline]
 

Definition at line 123 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( const unsigned char arg ) [inline]
 

Definition at line 122 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( const char * arg ) [inline]
 

Definition at line 121 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( MSG::Level level ) [inline]
 

Accept MsgStream activation using MsgStreamer operator.

Definition at line 118 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( std::ios &(* _f)(std::ios &) ) [inline]
 

Accept ios modifiers.

Definition at line 113 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( std::ostream &(* _f)(std::ostream &) ) [inline]
 

Accept oMsgStream modifiers.

Definition at line 108 of file MsgStream.h.

MsgStream & MsgStream::operator<< ( MsgStream &(* _f)(MsgStream &) ) [inline]
 

Accept MsgStream modifiers.

Definition at line 103 of file MsgStream.h.

int MsgStream::precision ( int v ) [inline]
 

Definition at line 149 of file MsgStream.h.

int MsgStream::precision ( ) const [inline]
 

Definition at line 148 of file MsgStream.h.

int MsgStream::rdstate ( ) const [inline]
 

Definition at line 150 of file MsgStream.h.

MsgStream & MsgStream::report ( int lvl ) [inline]
 

Initialize report of new message: activate if print level is sufficient.

Definition at line 56 of file MsgStream.h.

Referenced by operator<<().

void MsgStream::setLevel ( int level ) [inline]
 

Update outputlevel.

Definition at line 72 of file MsgStream.h.

Referenced by MsgStream().

long MsgStream::setf ( long _f,
long _m ) [inline]
 

Definition at line 154 of file MsgStream.h.

long MsgStream::setf ( long v ) [inline]
 

Definition at line 143 of file MsgStream.h.

std::ostrstream & MsgStream::stream ( ) [inline]
 

Access string MsgStream.

Definition at line 68 of file MsgStream.h.

void MsgStream::unsetf ( long _l ) [inline]
 

Definition at line 157 of file MsgStream.h.

int MsgStream::width ( int v ) [inline]
 

Definition at line 145 of file MsgStream.h.

int MsgStream::width ( ) const [inline]
 

Definition at line 144 of file MsgStream.h.

MsgStream & MsgStream::write ( const char * buff,
int len ) [inline]
 

Definition at line 98 of file MsgStream.h.


Member Data Documentation

bool MsgStream::m_active [protected]
 

Flag set to true if formatting engine is active.

Definition at line 35 of file MsgStream.h.

std::string MsgStream::m_buffer [protected]
 

Use standard string for information buffering.

Definition at line 29 of file MsgStream.h.

MSG::Level MsgStream::m_currLevel [protected]
 

Current debug level.

Definition at line 39 of file MsgStream.h.

MSG::Level MsgStream::m_level [protected]
 

Debug level of the message service.

Definition at line 37 of file MsgStream.h.

IMessageSvc * MsgStream::m_service [protected]
 

Pointer to message service if buffer has send.

Definition at line 27 of file MsgStream.h.

std::string MsgStream::m_source [protected]
 

Use standard string for source information to be passed to the message service.

Definition at line 31 of file MsgStream.h.

std::ostrstream MsgStream::m_stream [protected]
 

String MsgStream associated to buffer.

Definition at line 33 of file MsgStream.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:14 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000