RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ConvUtils.RegisterConversionFamily Function

Registers a new conversion family and returns its identifier.

Pascal
function RegisterConversionFamily(const ADescription: string): TConvFamily;
C++
TConvFamily RegisterConversionFamily(const AnsiString ADescription);

Call RegisterConversionFamily to create a new conversion family. A conversion family represents a type of thing that can be measured using different measurement units. For example, the StdConvs unit defines conversion families for distance, volume, area, temperature, and so on. 

Once you have registered a new conversion family, you can register units of measurement that belong to the family using the RegisterConversionType function. RegisterConversionType takes the conversion family identifier returned by RegisterConversionFamily as an argument. The global Convert function can then convert between any two conversion types (units of measurement) that have been registered with the same conversion family.  

ADescription is a string that names the conversion family. Typically, this names the thing measured, such as 'Distance', 'Volume', 'Area', 'Temperature', and so on. 

RegisterConversionFamily returns an identifier for the new conversion family. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!