#include <mcllib/MCSrcMsg.h>
Inheritance diagram for MCSrcMsg:
Public Types | |
typedef const char * | filename_t |
Typedef for the file name of the module in the source program. | |
typedef unsigned long | linenum_t |
Typedef for a line number in the source program. | |
Public Member Functions | |
const MCString & | getFileName () const |
Get the file name. | |
const linenum_t | getLineNum () const |
Get the line number. | |
virtual MCString | getText () const |
Get the text of the source message as a string. | |
bool | hasSrc () const |
Determine if the source is defined. | |
MCSrcMsg (const MCMsg &msg, filename_t fileName=0, linenum_t lineNum=0) | |
Construct from an MCMsg. | |
MCSrcMsg (const char *msg, filename_t fileName=0, linenum_t lineNum=0, msglevel_t msgLevel=MSGLVL_ALL, msgcode_t msgCode=MSGCODE_NONE) | |
Construct a source message. | |
virtual | ~MCSrcMsg () |
Virtual destructor. | |
Protected Member Functions | |
MCSrcMsg (const MCSrcMsg &msg, msglevel_t msgLevel) | |
Construct from a SrcMsg and a message level. | |
void | setFile (const char *fileName) |
Set the file name. | |
void | setLine (linenum_t lineNum) |
Set the line number. | |
void | setString (const MCString &mcs) |
Set the message from a string. | |
Protected Attributes | |
MCString | m_fileName |
source code file name | |
linenum_t | m_line |
source code line number | |
Friends | |
class | MCExcept |
class | MCExceptFatal |
Source messages are primarily used in a source file/line that a message relates to (for instance when exceptions are generated). It is unlikely that developers will construct objects of this class or further derive from it as it is primarily used to help with storing exception information when exceptions are generated.
|
Construct a source message.
|
|
Construct from an MCMsg. fileName is the name of the source code file which the message relates to. lineNum is the line number in the source code file.
|
|
Construct from a SrcMsg and a message level. The specified message level overrides the one in the msg
|
|
Get the file name.
|
|
Get the line number.
|
|
Get the text of the source message as a string.
Reimplemented from MCMsg. |
|
Determine if the source is defined.
|
|
Set the file name.
|
|
Set the line number.
|
|
Set the message from a string.
|