#include <message.h>
Collaboration diagram for Message:
Public Types | |
enum | Type { MTNone = 0x00000000, MTFatal = 0x00000001, MTError = 0x00000002, MTWarning = 0x00000004, MTAnyDebug = 0xfffffff8, MTAllNonDebug = 0x00000007, MTAll = 0xffffffff } |
Message type bitfield. Limited to 32 bits. More... | |
Public Member Functions | |
Message (Type t) | |
Construct empty message of given type. | |
Message (const Message &m) | |
Copy constructor; copy message. | |
Message (Type t, const TLString &msg) | |
Create message with specified type and message string. | |
Message (Type t, const TLString &msg, const SCLocation &l) | |
Create message with specified type, message string and location. | |
Message (Type t, const TLString &msg, const SCLocationRange &l) | |
Create message with specified type, message string and loc. range. | |
Message (const SError &e, const SCLocation &l=SCLocation()) | |
Create message from error. | |
~Message () | |
Destructor; no-op. | |
Message & | operator= (const Message &m) |
Assignment works by copying the message. | |
Type | type () const |
Get message type:. | |
const SCLocation & | location () const |
Get the (start) location (if any):. | |
const SCLocationRange & | LocationRange () const |
Get the location (range) (if any; end loc is NULL for non-range):. | |
const TLString & | msg () const |
Get message text:. | |
bool | MatchesTypeMask (Type t) const |
Returns 1 if this message matches the passed type mask. | |
Private Attributes | |
TLString | msgstr |
SCLocationRange | loc |
Type | mtype |
Type of this message (only 1 bit set). |
This class is completely "C++-safe".
Definition at line 70 of file message.h.
|
Message type bitfield. Limited to 32 bits. This is limited to 32 types as the manager internally uses an atomic integer for them. The library routines do not have to know about the various debug message types, however the message handlers maybe should. NOTE: The least significant 3 bits are reserved for the built-in types (fatal, error, warning); all other bits may be used by the application level for different verbose messages.
Definition at line 85 of file message.h. Referenced by type(). |
|
Construct empty message of given type.
|
|
Copy constructor; copy message.
|
|
Create message with specified type and message string.
|
|
Create message with specified type, message string and location.
|
|
Create message with specified type, message string and loc. range.
|
|
Create message from error. Message type will be TNError for code>0, TNWarning for code<0 and empty for code=0 (success). Definition at line 139 of file message.cc. |
|
Destructor; no-op.
|
|
Get the (start) location (if any):.
Definition at line 137 of file message.h. References loc, and SCLocationRange::loc0. Referenced by MessageHandler_Console::HandleMessage(). |
|
Get the location (range) (if any; end loc is NULL for non-range):.
Definition at line 141 of file message.h. References loc. Referenced by MessageHandler_Console::HandleMessage(). |
|
Returns 1 if this message matches the passed type mask.
Definition at line 149 of file message.h. References mtype. Referenced by MessageManager::_PostMessage(). |
|
Get message text:.
Definition at line 145 of file message.h. References msgstr. Referenced by MessageHandler_Console::HandleMessage(), and Message(). |
|
Assignment works by copying the message.
|
|
Get message type:.
Definition at line 133 of file message.h. Referenced by MessageManager::_PostMessage(), and MessageHandler_Console::HandleMessage(). |
|
Location (range) of message (e.g. for syntax errors); not a _range_ if the end location is NULL. Definition at line 100 of file message.h. Referenced by location(), LocationRange(), Message(), and operator=(). |
|
Message string. Definition at line 97 of file message.h. Referenced by Message(), msg(), and operator=(). |
|
Type of this message (only 1 bit set).
Definition at line 101 of file message.h. Referenced by MatchesTypeMask(), Message(), operator=(), and type(). |