RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ConvUtils.TryConvTypeToFamily Function

Retrieves the identifier for the conversion family with which a conversion type or pair of types is registered.

Pascal
function TryConvTypeToFamily(const AType: TConvType; out AFamily: TConvFamily): Boolean; overload;
function TryConvTypeToFamily(const AFrom: TConvType; const ATo: TConvType; out AFamily: TConvFamily): Boolean; overload;
C++
Boolean TryConvTypeToFamily(const TConvType AType, TConvFamily AFamily);
Boolean TryConvTypeToFamily(const TConvType AFrom, const TConvType ATo, TConvFamily AFamily);

TryConvTypeToFamily looks up the conversion family identifier for the family of the specified conversion type or types. Conversion types are associated with a conversion family by the RegisterConversionType function when the conversion type is registered. 

AType is the identifier for a registered conversion type (unit of measurement).  

AFrom and ATo are two registered conversion types that are assumed to be in the same family. 

AFamily returns the identifier of the conversion family. 

TryConvTypeToFamily returns true if the family can be obtained (if AType is a registered conversion type or if AFrom and ATo are both registered in the same family), false otherwise. 

 

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