Represents a quantity. More...
Public Member Functions | |
HRESULT | HasValue ([out, retval] VARIANT_BOOL *pResult) |
Indicates if the quantity has a value. More... | |
HRESULT | AsCount ([out, retval] int *pValue) |
Returns the quantity value as a number. More... | |
HRESULT | AsLength ([in] enum LengthUnit unit, [out, retval] double *pValue) |
Returns the quantity value as a length measure. More... | |
HRESULT | AsArea ([in] enum AreaUnit unit, [out, retval] double *pValue) |
Returns the quantity value as an area measure. More... | |
HRESULT | AsVolume ([in] enum VolumeUnit unit, [out, retval] double *pValue) |
Returns the quantity value as a volume measure. More... | |
HRESULT | AsMass ([in] enum MassUnit unit, [out, retval] double *pValue) |
Returns the quantity value as a mass measure. More... | |
Properties | |
QuantityType | Type [get] |
The type of the quantity. | |
Represents a quantity.
Quantity contains the value of one of the following types: number, length, area, volume or mass. This interface can be obtained through IQuantityContainer.
HRESULT IQuantity::AsArea | ( | [in] enum AreaUnit | unit, |
[out, retval] double * | pValue | ||
) |
Returns the quantity value as an area measure.
[in] | unit | The area measurement unit. |
[out] | pValue | The quantity's value in specified units. |
HRESULT IQuantity::AsCount | ( | [out, retval] int * | pValue | ) |
Returns the quantity value as a number.
[out] | pValue | The quantity's value. |
HRESULT IQuantity::AsLength | ( | [in] enum LengthUnit | unit, |
[out, retval] double * | pValue | ||
) |
Returns the quantity value as a length measure.
[in] | unit | The length measurement unit. |
[out] | pValue | The quantity's value in specified units. |
HRESULT IQuantity::AsMass | ( | [in] enum MassUnit | unit, |
[out, retval] double * | pValue | ||
) |
Returns the quantity value as a mass measure.
[in] | unit | The mass measurement unit. |
[out] | pValue | The quantity's value in specified units. |
HRESULT IQuantity::AsVolume | ( | [in] enum VolumeUnit | unit, |
[out, retval] double * | pValue | ||
) |
Returns the quantity value as a volume measure.
[in] | unit | The volume measurement unit. |
[out] | pValue | The quantity's value in specified units. |
HRESULT IQuantity::HasValue | ( | [out, retval] VARIANT_BOOL * | pResult | ) |
Indicates if the quantity has a value.