Show: Object Pascal C++
Display Preferences


From Appmethod Libraries
Jump to: navigation, search


Object Pascal

TConvTypeFactor = class(TConvTypeInfo)


class PASCALIMPLEMENTATION TConvTypeFactor : public TConvTypeInfo


Type Visibility Source Unit Parent
class public
System.ConvUtils System.ConvUtils


TConvTypeFactor describes a single registered conversion type (measurement unit) that differs from its family's base units by a simple conversion factor.

The global RegisterConversionType function creates a TConvTypeFactor instance automatically when you register a conversion type by supplying a conversion factor. TConvTypeFactor implements the FromCommon and ToCommon methods to perform their conversions by using a conversion factor that is the value of the Factor property.

There is no need to use TConvTypeFactor directly. To register a conversion type that uses a simple conversion factor, call RegisterConversionType using the syntax that supplies a conversion factor.

You can, however, use TConvTypeFactor as a base class when implementing your own conversion type that performs addition actions beyond a conversion factor. For example, you could write a class that multiplies by a conversion factor and then shifts the zero point by adding a constant.

See Also

Personal tools