2 #ifndef GAUDIKERNEL_MESSAGE_H
3 #define GAUDIKERNEL_MESSAGE_H
24 Message (
const std::string& src,
int type,
const std::string& msg );
30 const std::string& getMessage()
const;
33 void setMessage(
const std::string& msg );
39 void setType(
int msg_type );
42 const std::string& getSource()
const;
45 void setSource(
const std::string& src );
48 const std::string& getFormat()
const;
51 static const std::string getDefaultFormat();
54 void setFormat(
const std::string& msg )
const;
57 const std::string& getTimeFormat()
const;
60 static const std::string getDefaultTimeFormat() ;
63 void setTimeFormat(
const std::string& timeFormat )
const;
76 void invalidFormat()
const;
79 void makeFormattedMsg(
const std::string&
format )
const;
82 void decodeFormat(
const std::string&
format )
const;
85 void sizeField(
const std::string& text )
const;
88 void setWidth(
const std::string& formatArg )
const;
bool m_left
Justification.
char m_fill
The current fill character.
static const char TYPE
The character used to indicate that the message type should be printed.
std::string m_formatted_msg
Formatted message.
std::string m_time_format
Time format string.
static const char JUSTIFY_LEFT
The character used to indicate start of left text justification.
static const char * DEFAULT_TIME_FORMAT
The default time format.
std::string m_message
The message.
static const char UTIME
The character used to indicate that the message timestamp should be printed in UTC time...
static const char FORMAT_PREFIX
The character used to prefix formatting commands.
static const char FILL
The character used to indicate that the previous character is to be used for padding out fields if th...
static const char WIDTH
The character used to indicate that the previous decimal characters should be taken as the field widt...
~Message()
Default destructor.
static const char MESSAGE
The character used to indicate that the message should be printed.
int m_width
The current field width.
std::string m_format
The format string.
GAUDI_API std::ostream & operator<<(std::ostream &stream, const Message &msg)
Insert the message into a stream.
static const char TIME
The character used to indicate that the message timestamp should be printed.
static const char JUSTIFY_RIGHT
The character used to indicate start of right text justification.
static const char * DEFAULT_FORMAT
The default message format.
bool operator<(const Gaudi::Time &t1, const Gaudi::Time &t2)
static const char SOURCE
The character used to indicate that the message source should be printed.
std::string m_source
The source.
GAUDI_API bool operator==(const Message &a, const Message &b)
Insert the message into a stream.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".