v2.32
 
IQuantity Interface Reference

Represents a quantity. More...

Inheritance diagram for IQuantity:

Public Member Functions

HRESULT AsArea ([in] enum AreaUnit unit, [out, retval] double *pValue)
 Returns the quantity value as an area measure.
 
HRESULT AsCount ([out, retval] int *pValue)
 Returns the quantity value as a number.
 
HRESULT AsLength ([in] enum LengthUnit unit, [out, retval] double *pValue)
 Returns the quantity value as a length measure.
 
HRESULT AsMass ([in] enum MassUnit unit, [out, retval] double *pValue)
 Returns the quantity value as a mass measure.
 
HRESULT AsVolume ([in] enum VolumeUnit unit, [out, retval] double *pValue)
 Returns the quantity value as a volume measure.
 
HRESULT HasValue ([out, retval] VARIANT_BOOL *pResult)
 Indicates if the quantity has a value.
 

Properties

QuantityType Type [get]
 The type of the quantity.
 

Detailed Description

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.

Member Function Documentation

◆ AsArea()

HRESULT AsArea ( [in] enum AreaUnit unit,
[out, retval] double * pValue )

Returns the quantity value as an area measure.

Parameters
[in]unitThe area measurement unit.
[out]pValueThe quantity's value in specified units.

◆ AsCount()

HRESULT AsCount ( [out, retval] int * pValue)

Returns the quantity value as a number.

Parameters
[out]pValueThe quantity's value.

◆ AsLength()

HRESULT AsLength ( [in] enum LengthUnit unit,
[out, retval] double * pValue )

Returns the quantity value as a length measure.

Parameters
[in]unitThe length measurement unit.
[out]pValueThe quantity's value in specified units.

◆ AsMass()

HRESULT AsMass ( [in] enum MassUnit unit,
[out, retval] double * pValue )

Returns the quantity value as a mass measure.

Parameters
[in]unitThe mass measurement unit.
[out]pValueThe quantity's value in specified units.

◆ AsVolume()

HRESULT AsVolume ( [in] enum VolumeUnit unit,
[out, retval] double * pValue )

Returns the quantity value as a volume measure.

Parameters
[in]unitThe volume measurement unit.
[out]pValueThe quantity's value in specified units.

◆ HasValue()

HRESULT HasValue ( [out, retval] VARIANT_BOOL * pResult)

Indicates if the quantity has a value.

Returns
TRUE if the quantity has a value; otherwise returns FALSE.