|
|
This base class is responsible for storing, handling, and printing status messages which consists of a header and message body. This primarily helps in simplifying the task of displaying system messages to the user and/or developer.
To make the output formating of all status messages work together, global variables were created to handle the message header and body sizes. Therefore when one of these change, it effects all status messages which use the StatusMsg base class.
|
Sets default message of SM_DBODY[]
|
Copy constructor
|
Sets default message of SM_DBODY[] along with specified string header and with border style, header size, and body size if needed.
Parameters:
header | Header of status message |
border | Default header border: SM_BORDER[] |
hsize | Default header size for all objects: SM_HDRSZ |
bsize | Default body size for all objects: SM_BODYSZ |
void |
Set header of message along with boarder style if needed
Parameters:
hd | Header |
bdr | Header border |
void |
Set boarder style
Parameters:
bdr | Header border |
void |
Set body of message along with one string argument if needed
Parameters:
bdy | Status message |
ag | Argument associated with message. Only able to handle one but might handle more in the future if needed. By default the argument is none. |
void |
Same as above but handles an unsigned character for the argument
void |
Same as above but handles an unsigned integer for the argument
void |
[static]
Set header size for all StatusMsg objects. This method can be called either by an object or directly within the class by "StatusMsg::setHeaderSize(size)". If the actual string size of the header is less then this size, then spaces are appended to the header when displayed. And if the string size is greater than this size then the header is truncated when displayed.
Parameters:
hsz | Header Size. If 0, then a header is not displayed. |
void |
[static]
Set message body size for all StatusMsg object. This method can be called either by an object or directly within the class by "StatusMsg::setBodySize(size)". If the actual string size is less than this size and an arguement exists, then spaces are added in between when displayed. And if the string size is greater than this size then the message is truncated when displayed.
Parameters:
msg | Message Body Size |
string |
[const]
Returns: body of message
string |
[const]
Returns: argument of message
void |
[const]
Display status message with the appropriate formatting of the header and message body along with its argument if it exists. A default message would look something like:
|header| Default Message [Argument] |
Parameters:
out | ostream to output onto (default: cout) |
Generated on Fri Mar 9 02:04:42 2001, using kdoc 2.0a43. |