System.ConvUtils.RegisterConversionFamily

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RegisterConversionFamily(const ADescription: string): TConvFamily;

C++

extern DELPHI_PACKAGE TConvFamily __fastcall RegisterConversionFamily(const System::UnicodeString ADescription);

Properties

Type Visibility Source Unit Parent
function public
System.ConvUtils.pas
System.ConvUtils.hpp
System.ConvUtils System.ConvUtils

Description

Registers a new conversion family and returns its identifier.

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.

See Also