Skip to content

gmSCMessageHandlerClass

The service class MessageHandler has as an objective to have all messages produced by the tool stored in the language file where they may be easily changed and/or translated into other languages. This module processes the Xml Messages command that loads the messages into the language file and then it has a series of simple message issuing methods that all provide simplified interfaces to the Store_IssueMessage method in Store service class.


Prototype

void MessageHandler_LoadMessages(char* command,int nCommand);

The MessageHandler_LoadMessages method loads a set of messages introduced typically by a Messages xml statement. Each individual message statement has two attributes:

AttributeDescription
idwhich supplies a numeric identifier for the message. The message identifiers
must be unique.
textwhich supplies the text to be associated with the message.

The parameters of the method are:

ParameterDescription
commandContains the statement that triggered the call to this method and is used by this
method to receive the individual message specifications.
nCommandSpecifies the size of the command buffer.


The method MessageHandler_MessageWithTwoStrings

Section titled “The method MessageHandler_MessageWithTwoStrings”

Prototype

void MessageHandler_MessageWithTwoStrings(int number,char* string1,char* string2);

The MessageHandler_MessageWithTwoStrings method issues a message specified via its number that has two additional strings associated with it. Its parameters are:

ParameterDescription
numberSpecifies the number of the message to be issued.
string1Contains the first string to be associated with the message.
string2Contains the second message to be associated with the message.


The method MessageHandler_MessageWithString

Section titled “The method MessageHandler_MessageWithString”

Prototype

void MessageHandler_MessageWithString(int number,char* string1);

The MessageHandler_MessageWithString method issues a message specified via its number that has an additional string associated with it. Its parameters are:

ParameterDescription
numberSpecifies the number of the message to be issued.
string1Contains the string to be associated with the message.


Prototype

void MessageHandler_SimpleMessage(int number);

The MessageHandler_SimpleMessage method issues a message specified via its number that has no additional information associated with it. Its parameter is:

ParameterDescription
numberSpecifies the number of the message to be issued.


The method MessageHandler_MessageWithValue

Section titled “The method MessageHandler_MessageWithValue”

Prototype

void MessageHandler_MessageWithValue(int number,int value1);

The MessageHandler_MessageWithValue method issues a message specified via its number that has an additional value associated with it. Its parameters are:

ParameterDescription
numberSpecifies the number of the message to be issued.
value1Specifies the value to be associated with the message.