NAME

CQCC::MsgCat - Abstract base class to manage all user interaction communications message text used by IOBase methods Message() and Prompt().


CLASS DESCRIPTION

This class provides an abstract base class providing management methods for all message catalog subclasses making it easier for future translations and reviewing user messages for consistency. Each subclass implementing this class must provide an Initialize() method that loads the catalog.

The primary message catalog is the MsgCat_English subclass which provides the messages required for the supported integration. Subclasses providing translations of MsgCat_English may be used instead as long as they provide all the message tags needed by the application. Extension subclasses of MsgCat_English may be used to provide additional messages beyond those needed by the basic integration. NOTE: This class does NOT support unicode string handling so only languages using the standard English/Latin character set are supported.

In order to be used, the configuration file must ask for a subclass of this class as shown below:

    &SetConfigParm("MsgCatInterface", "CQCC::MsgCat_English");

SUPPORT POLICY: See TriggerCQCC.pm for the Rational Support Policy.


METHODS

ClassInit()
This class function is automatically invoked to define class parameters using CQCC::Parm objects. Current parameters include:
MsgCatInterface
Name of MsgCat subclass to use for this session, used by the IOClassFactory(). Set to 'CQCC::MsgCat_English' by default.

new CQCC::MsgCat()
This method initializes the objects attributes needed to store the subclasses messages (CATALOG), and arguments (ARGLISTS).

MsgCat_Prompts($type,$yes,$no)
This function is used by IOBase classes to influence the prompt strings that tell the user how to select yes (hit YES or hit Enter) and no. It must be called before the Message Catalog object is created so that these values can be burned into the message catalog.

Class should be the class such as ``text'' or ``GUI''.

$yes and $no should be the name of the keyboard key or button name.

Message($msgtag, @msgargs)
This method will look up the given $msgtag in the message catalog, format its arguments into it, and return the given string.

If the message is not found, an error message will be returned in its place. If the number of arguments provided is insufficient, an error message will also be generated.

SelfTest(@args)
This method runs a self test on the message catalog class or subclass. It will display all messages with their argument names formatted as if they were argument values to show how the final message will lock. The final appearance will vary depending on the length of the final arguments.