sbIPropertyUnitConverter Interface Reference

Property unit converter interface This is an interface songbird property converter, used to convert a property value between its various units representations. More...

import"sbIPropertyUnitConverter.idl";

Inheritance diagram for sbIPropertyUnitConverter:
[legend]
Collaboration diagram for sbIPropertyUnitConverter:
[legend]

Public Member Functions

AString convert (in AString aValue, in AString aFromUnitID, in AString aToUnitID, in long aMinDecimals, in long aMaxDecimals)
 Convert a value to a different unit. Use -1 for aMinDecimals and aMaxDecimals if you do not wish to set any limits on the number of decimals in the returned value. More...
 
AString autoFormat (in AString aValue, in long aMinDecimals, in long aMaxDecimals)
 Formats a value using the most suitable unit. Use -1 for aMinDecimals and aMaxDecimals if you do not wish to set any limits on the number of decimals in the returned value. More...
 

Public Attributes

readonly attribute
nsISimpleEnumerator 
units
 The list of available units for this property. More...
 
readonly attribute AString nativeUnitId
 The native unit for this property. This is the unit used for storage in the database, and that is implied when getting and setting the property. More...
 
readonly attribute AString stringBundle
 The url to the string bundle used to localize partial entities. More...
 
attribute sbIPropertyInfo propertyInfo
 The sbIPropertyInfo this converter is associated with. This attribute will be set automatically by the propertyinfo object when its converter is assigned. More...
 

Detailed Description

Property unit converter interface This is an interface songbird property converter, used to convert a property value between its various units representations.

Definition at line 70 of file sbIPropertyUnitConverter.idl.

Member Function Documentation

AString sbIPropertyUnitConverter::autoFormat ( in AString  aValue,
in long  aMinDecimals,
in long  aMaxDecimals 
)

Formats a value using the most suitable unit. Use -1 for aMinDecimals and aMaxDecimals if you do not wish to set any limits on the number of decimals in the returned value.

AString sbIPropertyUnitConverter::convert ( in AString  aValue,
in AString  aFromUnitID,
in AString  aToUnitID,
in long  aMinDecimals,
in long  aMaxDecimals 
)

Convert a value to a different unit. Use -1 for aMinDecimals and aMaxDecimals if you do not wish to set any limits on the number of decimals in the returned value.

Member Data Documentation

readonly attribute AString sbIPropertyUnitConverter::nativeUnitId

The native unit for this property. This is the unit used for storage in the database, and that is implied when getting and setting the property.

Definition at line 93 of file sbIPropertyUnitConverter.idl.

attribute sbIPropertyInfo sbIPropertyUnitConverter::propertyInfo

The sbIPropertyInfo this converter is associated with. This attribute will be set automatically by the propertyinfo object when its converter is assigned.

Definition at line 114 of file sbIPropertyUnitConverter.idl.

readonly attribute AString sbIPropertyUnitConverter::stringBundle

The url to the string bundle used to localize partial entities.

Definition at line 98 of file sbIPropertyUnitConverter.idl.

readonly attribute nsISimpleEnumerator sbIPropertyUnitConverter::units

The list of available units for this property.

Definition at line 86 of file sbIPropertyUnitConverter.idl.


The documentation for this interface was generated from the following file: