Gaudi Framework, version v20r2

Generated: 18 Jul 2008

MsgStream.cpp File Reference

#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Message.h"
#include "GaudiKernel/GaudiException.h"
#include "GaudiKernel/IMessageSvc.h"
#include <iostream>
#include <stdarg.h>
#include <stdio.h>

Include dependency graph for MsgStream.cpp:

Go to the source code of this file.

Defines

#define KERNEL_MSGSTREAM_CPP

Functions

std::string format (const char *fmt,...)
 MsgStream format utility "a la sprintf(...)".


Define Documentation

#define KERNEL_MSGSTREAM_CPP

Definition at line 19 of file MsgStream.cpp.


Function Documentation

std::string format ( const char *  fmt,
  ... 
)

MsgStream format utility "a la sprintf(...)".

Definition at line 99 of file MsgStream.cpp.

00100 {
00101   const int buffsize = 2048;
00102   static char buffer[buffsize];
00103   va_list arguments;
00104   va_start( arguments, fmt );
00105   if( vsprintf(buffer, fmt, arguments) >= buffsize )
00106     throw GaudiException("Insufficient buffer size (2048) when formatting message",
00107                          "MsgStream", 0);
00108   return std::string(buffer);
00109 }


Generated at Fri Jul 18 12:04:10 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004