Each TParameterFormatter has a text template, defining the content of the text string. You set the text template through either the TParameterFormatter constructor or the SetTemplate member function. You then index the parameters, beginning at zero, and identify the type of each one by specifying a class name token. The parameter types are all formattable data types. For example, parameter 0 might be of type TFormattableNumber. You can also specify a text-ordering object when you construct the TParameterFormatter to provide language-sensitive, case-insensitive scanning.
At run time, you pass the TParameterFormatter instance a TFormattableParameterList instance that lists the values for each parameter. The TParameterFormatter raises an exception if it receives a parameter of the wrong formattable type.
TParameterFormatter can also scan text strings and return data parameters. You pass the Scan member function a list of the correct formattable data types, and it scans the text, returning the list of parameters.
In later releases, the Formatting framework will provide an editor for creating and modifying TParameterFormatter instances. When programming, you can create messages simply by typing in the text template, marking each variable range as a parameter and associating each parameter with a particular type of formattable data. Localizers can then use the same editor to create a translated version of the text template and attach formatters appropriate for a particular locale, without needing access to your code.
NOTE
Currently, messages can be localized if your TParameterFormatter instance is accessible. See "Localizing TParameterFormatter instances" on page 226 for more information.
TParameterFormatter returns information about the results of an operation in either a TParameterFormatResult or a TParameterScanResult instance. These classes maintain a list of TFormatResult of TScanResult instances, each one describing the accuracy of the conversion for a single parameter.