![]() |
The Gaudi Framework
v25r3
|
#include <GaudiKernel/Message.h>

Public Member Functions | |
| Message () | |
| Default constructor. More... | |
| Message (const char *src, int type, const char *msg) | |
| Constructor. More... | |
| Message (const std::string &src, int type, const std::string &msg) | |
| Constructor. More... | |
| ~Message () | |
| Default destructor. More... | |
| const std::string & | getMessage () const |
| Get the message string. More... | |
| void | setMessage (const std::string &msg) |
| Set the message string. More... | |
| int | getType () const |
| Get the message type. More... | |
| void | setType (int msg_type) |
| Set the message type. More... | |
| const std::string & | getSource () const |
| Get the message source. More... | |
| void | setSource (const std::string &src) |
| Set the message source. More... | |
| const std::string & | getFormat () const |
| Get the format string. More... | |
| void | setFormat (const std::string &msg) const |
| Set the format string. More... | |
| const std::string & | getTimeFormat () const |
| Get the time format string. More... | |
| void | setTimeFormat (const std::string &timeFormat) const |
| Set the time format string. More... | |
| bool | operator< (const Message &test) |
| Needed to build maps. More... | |
Static Public Member Functions | |
| static const std::string | getDefaultFormat () |
| Get the default format string. More... | |
| static const std::string | getDefaultTimeFormat () |
| Get the default time format string. More... | |
Protected Member Functions | |
| void | invalidFormat () const |
| Called when an invalid format string is encountered. More... | |
| void | makeFormattedMsg (const std::string &format) const |
| Format the message. More... | |
| void | decodeFormat (const std::string &format) const |
| Decode format. More... | |
| void | sizeField (const std::string &text) const |
| Truncate or pad the output string to the field width as necessary. More... | |
| void | setWidth (const std::string &formatArg) const |
| Set the width of a stream. More... | |
Protected Attributes | |
| std::string | m_message |
| The message. More... | |
| std::string | m_source |
| The source. More... | |
| std::string | m_format |
| The format string. More... | |
| std::string | m_time_format |
| Time format string. More... | |
| int | m_type |
| The type. More... | |
| std::string | m_formatted_msg |
| Formatted message. More... | |
| char | m_fill |
| The current fill character. More... | |
| int | m_width |
| The current field width. More... | |
| bool | m_left |
| Justification. More... | |
Static Protected Attributes | |
| static const char | FORMAT_PREFIX = '%' |
| The character used to prefix formatting commands. More... | |
| static const char | JUSTIFY_LEFT = 'L' |
| The character used to indicate start of left text justification. More... | |
| static const char | JUSTIFY_RIGHT = 'R' |
| The character used to indicate start of right text justification. More... | |
| static const char | MESSAGE = 'M' |
| The character used to indicate that the message should be printed. More... | |
| static const char | TYPE = 'T' |
| The character used to indicate that the message type should be printed. More... | |
| static const char | TIME = 't' |
| The character used to indicate that the message timestamp should be printed. More... | |
| static const char | UTIME = 'u' |
| The character used to indicate that the message timestamp should be printed in UTC time. More... | |
| static const char | SOURCE = 'S' |
| The character used to indicate that the message source should be printed. More... | |
| static const char | FILL = 'F' |
| The character used to indicate that the previous character is to be used for padding out fields if the text is not long enough. More... | |
| static const char | WIDTH = 'W' |
| The character used to indicate that the previous decimal characters should be taken as the field width. More... | |
| static const char * | DEFAULT_FORMAT = "% F%18W%S%7W%R%T %0W%M" |
| The default message format. More... | |
| static const char * | DEFAULT_TIME_FORMAT = "%Y-%m-%d %H:%M:%S,%f" |
| The default time format. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const Message &msg) |
| Insert the message into a stream. More... | |
| bool | operator== (const Message &a, const Message &b) |
| Insert the message into a stream. More... | |
The Message class.
This class is used to contain messages which can then be formatted and sent to a message service
| Message::Message | ( | ) |
Default constructor.
Definition at line 45 of file Message.cpp.
| Message::Message | ( | const char * | src, |
| int | type, | ||
| const char * | msg | ||
| ) |
Constructor.
Definition at line 58 of file Message.cpp.
| Message::Message | ( | const std::string & | src, |
| int | type, | ||
| const std::string & | msg | ||
| ) |
Constructor.
Definition at line 71 of file Message.cpp.
|
protected |
Decode format.
Definition at line 305 of file Message.cpp.
|
static |
Get the default format string.
Definition at line 200 of file Message.cpp.
|
static |
Get the default time format string.
Definition at line 238 of file Message.cpp.
| const std::string & Message::getFormat | ( | ) | const |
| const std::string & Message::getMessage | ( | ) | const |
| const std::string & Message::getSource | ( | ) | const |
| const std::string & Message::getTimeFormat | ( | ) | const |
| int Message::getType | ( | ) | const |
Get the message type.
Definition at line 106 of file Message.cpp.
|
protected |
Called when an invalid format string is encountered.
Definition at line 381 of file Message.cpp.
|
protected |
Format the message.
Definition at line 265 of file Message.cpp.
| bool Message::operator< | ( | const Message & | test | ) |
| void Message::setFormat | ( | const std::string & | msg | ) | const |
Set the format string.
Definition at line 213 of file Message.cpp.
| void Message::setMessage | ( | const std::string & | msg | ) |
| void Message::setSource | ( | const std::string & | src | ) |
| void Message::setTimeFormat | ( | const std::string & | timeFormat | ) | const |
Set the time format string.
Definition at line 251 of file Message.cpp.
| void Message::setType | ( | int | msg_type | ) |
Set the message type.
Definition at line 117 of file Message.cpp.
|
protected |
Set the width of a stream.
Definition at line 393 of file Message.cpp.
|
protected |
Truncate or pad the output string to the field width as necessary.
Definition at line 424 of file Message.cpp.
|
friend |
Insert the message into a stream.
Definition at line 150 of file Message.cpp.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |