|
ICU 57.1 57.1
|
A unit such as length, mass, volume, currency, etc. More...
#include <measunit.h>
Public Member Functions | |
| MeasureUnit () | |
| Default constructor. | |
| MeasureUnit (const MeasureUnit &other) | |
| Copy constructor. | |
| MeasureUnit & | operator= (const MeasureUnit &other) |
| Assignment operator. | |
| virtual UObject * | clone () const |
| Returns a polymorphic clone of this object. | |
| virtual | ~MeasureUnit () |
| Destructor. | |
| virtual UBool | operator== (const UObject &other) const |
| Equality operator. | |
| UBool | operator!= (const UObject &other) const |
| Inequality operator. | |
| const char * | getType () const |
| Get the type. | |
| const char * | getSubtype () const |
| Get the sub type. | |
| virtual UClassID | getDynamicClassID (void) const |
| Returns a unique class ID POLYMORPHICALLY. | |
| int32_t | getIndex () const |
| ICU use only. | |
Public Member Functions inherited from UObject | |
| virtual | ~UObject () |
| Destructor. | |
Protected Member Functions | |
| void | initTime (const char *timeId) |
| For ICU use only. | |
| void | initCurrency (const char *isoCurrency) |
| For ICU use only. | |
A unit such as length, mass, volume, currency, etc.
A unit is coupled with a numeric amount to produce a Measure.
Definition at line 36 of file measunit.h.
|
inline |
| MeasureUnit::MeasureUnit | ( | const MeasureUnit & | other | ) |
Returns a polymorphic clone of this object.
The result will have the same class as returned by getDynamicClassID().
Reimplemented in CurrencyUnit, and TimeUnit.
|
static |
Returns unit of area: acre.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: acre-foot.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of electric: ampere.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of angle: arc-minute.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of angle: arc-second.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: astronomical-unit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: bit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: bushel.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: byte.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: calorie.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: carat.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of temperature: celsius.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: centiliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: centimeter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: century.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-centimeter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-foot.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-inch.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-kilometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-meter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-mile.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cubic-yard.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cup.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: cup-metric.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: day.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: deciliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: decimeter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of angle: degree.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of temperature: fahrenheit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: fathom.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: fluid-ounce.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: foodcalorie.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: foot.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: furlong.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: gallon.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: gallon-imperial.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of temperature: generic.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of acceleration: g-force.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: gigabit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: gigabyte.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of frequency: gigahertz.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: gigawatt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: gram.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: hectare.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: hectoliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of pressure: hectopascal.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of frequency: hertz.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: horsepower.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: hour.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: inch.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of pressure: inch-hg.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: joule.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of concentr: karat.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of temperature: kelvin.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: kilobit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: kilobyte.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: kilocalorie.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: kilogram.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of frequency: kilohertz.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: kilojoule.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: kilometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of speed: kilometer-per-hour.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: kilowatt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of energy: kilowatt-hour.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of speed: knot.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: light-year.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: liter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of consumption: liter-per-100kilometers.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of consumption: liter-per-kilometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of light: lux.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: megabit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: megabyte.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of frequency: megahertz.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: megaliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: megawatt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: meter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of speed: meter-per-second.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of acceleration: meter-per-second-squared.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: metric-ton.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: microgram.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: micrometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: microsecond.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: mile.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of consumption: mile-per-gallon.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of consumption: mile-per-gallon-imperial.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of speed: mile-per-hour.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: mile-scandinavian.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of electric: milliampere.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of pressure: millibar.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: milligram.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of concentr: milligram-per-deciliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: milliliter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: millimeter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of pressure: millimeter-of-mercury.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of concentr: millimole-per-liter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: millisecond.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: milliwatt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: minute.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: month.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: nanometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: nanosecond.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: nautical-mile.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of electric: ohm.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: ounce.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: ounce-troy.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: parsec.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of concentr: part-per-million.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: picometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: pint.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: pint-metric.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: pound.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of pressure: pound-per-square-inch.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: quart.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of angle: radian.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of angle: revolution.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: second.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-centimeter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-foot.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-inch.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-kilometer.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-meter.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-mile.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of area: square-yard.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: stone.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: tablespoon.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of volume: teaspoon.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: terabit.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of digital: terabyte.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of mass: ton.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of electric: volt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of power: watt.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: week.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of length: yard.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
Returns unit of duration: year.
Caller owns returned value and must free it.
| status | ICU error code. |
|
static |
getAvailable gets all of the available units for a specific type.
If there are too many units to fit into destCapacity then the error code is set to U_BUFFER_OVERFLOW_ERROR.
| type | the type |
| destArray | destination buffer. |
| destCapacity | number of MeasureUnit instances available at dest. |
| errorCode | ICU error code. |
|
static |
getAvailable gets all of the available units.
If there are too many units to fit into destCapacity then the error code is set to U_BUFFER_OVERFLOW_ERROR.
| destArray | destination buffer. |
| destCapacity | number of MeasureUnit instances available at dest. |
| errorCode | ICU error code. |
|
static |
getAvailableTypes gets all of the available types.
Caller owns the returned StringEnumeration and must delete it when finished using it.
| errorCode | ICU error code. |
Returns a unique class ID POLYMORPHICALLY.
Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.
Reimplemented from UObject.
Reimplemented in CurrencyUnit, and TimeUnit.
| int32_t MeasureUnit::getIndex | ( | ) | const |
ICU use only.
Returns associated array index for this measure unit. Only valid for non-currency measure units.
ICU use only.
Returns maximum value from getIndex plus 1.
Return the class ID for this class.
This is useful only for comparing to a return value from getDynamicClassID(). For example:
. Base* polymorphic_pointer = createPolymorphicObject(); . if (polymorphic_pointer->getDynamicClassID() == . erived::getStaticClassID()) ...
For ICU use only.
For ICU use only.
|
static |
ICU use only.
Inequality operator.
Return true if this object is not equal to the given object.
Definition at line 84 of file measunit.h.
| MeasureUnit & MeasureUnit::operator= | ( | const MeasureUnit & | other | ) |
|
static |
ICU use only.