ICU 57.1  57.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
icu::CurrencyUnit Class Reference

A unit of currency, such as USD (U.S. More...

#include <currunit.h>

Inheritance diagram for icu::CurrencyUnit:
icu::MeasureUnit icu::UObject icu::UMemory

Public Member Functions

 CurrencyUnit (const UChar *isoCode, UErrorCode &ec)
 Construct an object with the given ISO currency code.
 CurrencyUnit (const CurrencyUnit &other)
 Copy constructor.
CurrencyUnitoperator= (const CurrencyUnit &other)
 Assignment operator.
virtual UObjectclone () const
 Return a polymorphic clone of this object.
virtual ~CurrencyUnit ()
virtual UClassID getDynamicClassID () const
 Returns a unique class ID for this object POLYMORPHICALLY.
const UChargetISOCurrency () const
 Return the ISO currency code of this object.
- Public Member Functions inherited from icu::MeasureUnit
 MeasureUnit ()
 Default constructor.
 MeasureUnit (const MeasureUnit &other)
 Copy constructor.
MeasureUnitoperator= (const MeasureUnit &other)
 Assignment operator.
virtual ~MeasureUnit ()
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.
int32_t getIndex () const
 ICU use only.
- Public Member Functions inherited from icu::UObject
virtual ~UObject ()

Static Public Member Functions

static UClassID getStaticClassID ()
 Returns the class ID for this class.
- Static Public Member Functions inherited from icu::MeasureUnit
static int32_t getAvailable (MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
 getAvailable gets all of the available units.
static int32_t getAvailable (const char *type, MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode)
 getAvailable gets all of the available units for a specific type.
static StringEnumerationgetAvailableTypes (UErrorCode &errorCode)
 getAvailableTypes gets all of the available types.
static int32_t getIndexCount ()
 ICU use only.
static int32_t internalGetIndexForTypeAndSubtype (const char *type, const char *subtype)
 ICU use only.
static MeasureUnitresolveUnitPerUnit (const MeasureUnit &unit, const MeasureUnit &perUnit)
 ICU use only.
static MeasureUnitcreateGForce (UErrorCode &status)
 Returns unit of acceleration: g-force.
static MeasureUnitcreateMeterPerSecondSquared (UErrorCode &status)
 Returns unit of acceleration: meter-per-second-squared.
static MeasureUnitcreateArcMinute (UErrorCode &status)
 Returns unit of angle: arc-minute.
static MeasureUnitcreateArcSecond (UErrorCode &status)
 Returns unit of angle: arc-second.
static MeasureUnitcreateDegree (UErrorCode &status)
 Returns unit of angle: degree.
static MeasureUnitcreateRadian (UErrorCode &status)
 Returns unit of angle: radian.
static MeasureUnitcreateRevolutionAngle (UErrorCode &status)
 Returns unit of angle: revolution.
static MeasureUnitcreateAcre (UErrorCode &status)
 Returns unit of area: acre.
static MeasureUnitcreateHectare (UErrorCode &status)
 Returns unit of area: hectare.
static MeasureUnitcreateSquareCentimeter (UErrorCode &status)
 Returns unit of area: square-centimeter.
static MeasureUnitcreateSquareFoot (UErrorCode &status)
 Returns unit of area: square-foot.
static MeasureUnitcreateSquareInch (UErrorCode &status)
 Returns unit of area: square-inch.
static MeasureUnitcreateSquareKilometer (UErrorCode &status)
 Returns unit of area: square-kilometer.
static MeasureUnitcreateSquareMeter (UErrorCode &status)
 Returns unit of area: square-meter.
static MeasureUnitcreateSquareMile (UErrorCode &status)
 Returns unit of area: square-mile.
static MeasureUnitcreateSquareYard (UErrorCode &status)
 Returns unit of area: square-yard.
static MeasureUnitcreateKarat (UErrorCode &status)
 Returns unit of concentr: karat.
static MeasureUnitcreateMilligramPerDeciliter (UErrorCode &status)
 Returns unit of concentr: milligram-per-deciliter.
static MeasureUnitcreateMillimolePerLiter (UErrorCode &status)
 Returns unit of concentr: millimole-per-liter.
static MeasureUnitcreatePartPerMillion (UErrorCode &status)
 Returns unit of concentr: part-per-million.
static MeasureUnitcreateLiterPer100Kilometers (UErrorCode &status)
 Returns unit of consumption: liter-per-100kilometers.
static MeasureUnitcreateLiterPerKilometer (UErrorCode &status)
 Returns unit of consumption: liter-per-kilometer.
static MeasureUnitcreateMilePerGallon (UErrorCode &status)
 Returns unit of consumption: mile-per-gallon.
static MeasureUnitcreateMilePerGallonImperial (UErrorCode &status)
 Returns unit of consumption: mile-per-gallon-imperial.
static MeasureUnitcreateBit (UErrorCode &status)
 Returns unit of digital: bit.
static MeasureUnitcreateByte (UErrorCode &status)
 Returns unit of digital: byte.
static MeasureUnitcreateGigabit (UErrorCode &status)
 Returns unit of digital: gigabit.
static MeasureUnitcreateGigabyte (UErrorCode &status)
 Returns unit of digital: gigabyte.
static MeasureUnitcreateKilobit (UErrorCode &status)
 Returns unit of digital: kilobit.
static MeasureUnitcreateKilobyte (UErrorCode &status)
 Returns unit of digital: kilobyte.
static MeasureUnitcreateMegabit (UErrorCode &status)
 Returns unit of digital: megabit.
static MeasureUnitcreateMegabyte (UErrorCode &status)
 Returns unit of digital: megabyte.
static MeasureUnitcreateTerabit (UErrorCode &status)
 Returns unit of digital: terabit.
static MeasureUnitcreateTerabyte (UErrorCode &status)
 Returns unit of digital: terabyte.
static MeasureUnitcreateCentury (UErrorCode &status)
 Returns unit of duration: century.
static MeasureUnitcreateDay (UErrorCode &status)
 Returns unit of duration: day.
static MeasureUnitcreateHour (UErrorCode &status)
 Returns unit of duration: hour.
static MeasureUnitcreateMicrosecond (UErrorCode &status)
 Returns unit of duration: microsecond.
static MeasureUnitcreateMillisecond (UErrorCode &status)
 Returns unit of duration: millisecond.
static MeasureUnitcreateMinute (UErrorCode &status)
 Returns unit of duration: minute.
static MeasureUnitcreateMonth (UErrorCode &status)
 Returns unit of duration: month.
static MeasureUnitcreateNanosecond (UErrorCode &status)
 Returns unit of duration: nanosecond.
static MeasureUnitcreateSecond (UErrorCode &status)
 Returns unit of duration: second.
static MeasureUnitcreateWeek (UErrorCode &status)
 Returns unit of duration: week.
static MeasureUnitcreateYear (UErrorCode &status)
 Returns unit of duration: year.
static MeasureUnitcreateAmpere (UErrorCode &status)
 Returns unit of electric: ampere.
static MeasureUnitcreateMilliampere (UErrorCode &status)
 Returns unit of electric: milliampere.
static MeasureUnitcreateOhm (UErrorCode &status)
 Returns unit of electric: ohm.
static MeasureUnitcreateVolt (UErrorCode &status)
 Returns unit of electric: volt.
static MeasureUnitcreateCalorie (UErrorCode &status)
 Returns unit of energy: calorie.
static MeasureUnitcreateFoodcalorie (UErrorCode &status)
 Returns unit of energy: foodcalorie.
static MeasureUnitcreateJoule (UErrorCode &status)
 Returns unit of energy: joule.
static MeasureUnitcreateKilocalorie (UErrorCode &status)
 Returns unit of energy: kilocalorie.
static MeasureUnitcreateKilojoule (UErrorCode &status)
 Returns unit of energy: kilojoule.
static MeasureUnitcreateKilowattHour (UErrorCode &status)
 Returns unit of energy: kilowatt-hour.
static MeasureUnitcreateGigahertz (UErrorCode &status)
 Returns unit of frequency: gigahertz.
static MeasureUnitcreateHertz (UErrorCode &status)
 Returns unit of frequency: hertz.
static MeasureUnitcreateKilohertz (UErrorCode &status)
 Returns unit of frequency: kilohertz.
static MeasureUnitcreateMegahertz (UErrorCode &status)
 Returns unit of frequency: megahertz.
static MeasureUnitcreateAstronomicalUnit (UErrorCode &status)
 Returns unit of length: astronomical-unit.
static MeasureUnitcreateCentimeter (UErrorCode &status)
 Returns unit of length: centimeter.
static MeasureUnitcreateDecimeter (UErrorCode &status)
 Returns unit of length: decimeter.
static MeasureUnitcreateFathom (UErrorCode &status)
 Returns unit of length: fathom.
static MeasureUnitcreateFoot (UErrorCode &status)
 Returns unit of length: foot.
static MeasureUnitcreateFurlong (UErrorCode &status)
 Returns unit of length: furlong.
static MeasureUnitcreateInch (UErrorCode &status)
 Returns unit of length: inch.
static MeasureUnitcreateKilometer (UErrorCode &status)
 Returns unit of length: kilometer.
static MeasureUnitcreateLightYear (UErrorCode &status)
 Returns unit of length: light-year.
static MeasureUnitcreateMeter (UErrorCode &status)
 Returns unit of length: meter.
static MeasureUnitcreateMicrometer (UErrorCode &status)
 Returns unit of length: micrometer.
static MeasureUnitcreateMile (UErrorCode &status)
 Returns unit of length: mile.
static MeasureUnitcreateMileScandinavian (UErrorCode &status)
 Returns unit of length: mile-scandinavian.
static MeasureUnitcreateMillimeter (UErrorCode &status)
 Returns unit of length: millimeter.
static MeasureUnitcreateNanometer (UErrorCode &status)
 Returns unit of length: nanometer.
static MeasureUnitcreateNauticalMile (UErrorCode &status)
 Returns unit of length: nautical-mile.
static MeasureUnitcreateParsec (UErrorCode &status)
 Returns unit of length: parsec.
static MeasureUnitcreatePicometer (UErrorCode &status)
 Returns unit of length: picometer.
static MeasureUnitcreateYard (UErrorCode &status)
 Returns unit of length: yard.
static MeasureUnitcreateLux (UErrorCode &status)
 Returns unit of light: lux.
static MeasureUnitcreateCarat (UErrorCode &status)
 Returns unit of mass: carat.
static MeasureUnitcreateGram (UErrorCode &status)
 Returns unit of mass: gram.
static MeasureUnitcreateKilogram (UErrorCode &status)
 Returns unit of mass: kilogram.
static MeasureUnitcreateMetricTon (UErrorCode &status)
 Returns unit of mass: metric-ton.
static MeasureUnitcreateMicrogram (UErrorCode &status)
 Returns unit of mass: microgram.
static MeasureUnitcreateMilligram (UErrorCode &status)
 Returns unit of mass: milligram.
static MeasureUnitcreateOunce (UErrorCode &status)
 Returns unit of mass: ounce.
static MeasureUnitcreateOunceTroy (UErrorCode &status)
 Returns unit of mass: ounce-troy.
static MeasureUnitcreatePound (UErrorCode &status)
 Returns unit of mass: pound.
static MeasureUnitcreateStone (UErrorCode &status)
 Returns unit of mass: stone.
static MeasureUnitcreateTon (UErrorCode &status)
 Returns unit of mass: ton.
static MeasureUnitcreateGigawatt (UErrorCode &status)
 Returns unit of power: gigawatt.
static MeasureUnitcreateHorsepower (UErrorCode &status)
 Returns unit of power: horsepower.
static MeasureUnitcreateKilowatt (UErrorCode &status)
 Returns unit of power: kilowatt.
static MeasureUnitcreateMegawatt (UErrorCode &status)
 Returns unit of power: megawatt.
static MeasureUnitcreateMilliwatt (UErrorCode &status)
 Returns unit of power: milliwatt.
static MeasureUnitcreateWatt (UErrorCode &status)
 Returns unit of power: watt.
static MeasureUnitcreateHectopascal (UErrorCode &status)
 Returns unit of pressure: hectopascal.
static MeasureUnitcreateInchHg (UErrorCode &status)
 Returns unit of pressure: inch-hg.
static MeasureUnitcreateMillibar (UErrorCode &status)
 Returns unit of pressure: millibar.
static MeasureUnitcreateMillimeterOfMercury (UErrorCode &status)
 Returns unit of pressure: millimeter-of-mercury.
static MeasureUnitcreatePoundPerSquareInch (UErrorCode &status)
 Returns unit of pressure: pound-per-square-inch.
static MeasureUnitcreateKilometerPerHour (UErrorCode &status)
 Returns unit of speed: kilometer-per-hour.
static MeasureUnitcreateKnot (UErrorCode &status)
 Returns unit of speed: knot.
static MeasureUnitcreateMeterPerSecond (UErrorCode &status)
 Returns unit of speed: meter-per-second.
static MeasureUnitcreateMilePerHour (UErrorCode &status)
 Returns unit of speed: mile-per-hour.
static MeasureUnitcreateCelsius (UErrorCode &status)
 Returns unit of temperature: celsius.
static MeasureUnitcreateFahrenheit (UErrorCode &status)
 Returns unit of temperature: fahrenheit.
static MeasureUnitcreateGenericTemperature (UErrorCode &status)
 Returns unit of temperature: generic.
static MeasureUnitcreateKelvin (UErrorCode &status)
 Returns unit of temperature: kelvin.
static MeasureUnitcreateAcreFoot (UErrorCode &status)
 Returns unit of volume: acre-foot.
static MeasureUnitcreateBushel (UErrorCode &status)
 Returns unit of volume: bushel.
static MeasureUnitcreateCentiliter (UErrorCode &status)
 Returns unit of volume: centiliter.
static MeasureUnitcreateCubicCentimeter (UErrorCode &status)
 Returns unit of volume: cubic-centimeter.
static MeasureUnitcreateCubicFoot (UErrorCode &status)
 Returns unit of volume: cubic-foot.
static MeasureUnitcreateCubicInch (UErrorCode &status)
 Returns unit of volume: cubic-inch.
static MeasureUnitcreateCubicKilometer (UErrorCode &status)
 Returns unit of volume: cubic-kilometer.
static MeasureUnitcreateCubicMeter (UErrorCode &status)
 Returns unit of volume: cubic-meter.
static MeasureUnitcreateCubicMile (UErrorCode &status)
 Returns unit of volume: cubic-mile.
static MeasureUnitcreateCubicYard (UErrorCode &status)
 Returns unit of volume: cubic-yard.
static MeasureUnitcreateCup (UErrorCode &status)
 Returns unit of volume: cup.
static MeasureUnitcreateCupMetric (UErrorCode &status)
 Returns unit of volume: cup-metric.
static MeasureUnitcreateDeciliter (UErrorCode &status)
 Returns unit of volume: deciliter.
static MeasureUnitcreateFluidOunce (UErrorCode &status)
 Returns unit of volume: fluid-ounce.
static MeasureUnitcreateGallon (UErrorCode &status)
 Returns unit of volume: gallon.
static MeasureUnitcreateGallonImperial (UErrorCode &status)
 Returns unit of volume: gallon-imperial.
static MeasureUnitcreateHectoliter (UErrorCode &status)
 Returns unit of volume: hectoliter.
static MeasureUnitcreateLiter (UErrorCode &status)
 Returns unit of volume: liter.
static MeasureUnitcreateMegaliter (UErrorCode &status)
 Returns unit of volume: megaliter.
static MeasureUnitcreateMilliliter (UErrorCode &status)
 Returns unit of volume: milliliter.
static MeasureUnitcreatePint (UErrorCode &status)
 Returns unit of volume: pint.
static MeasureUnitcreatePintMetric (UErrorCode &status)
 Returns unit of volume: pint-metric.
static MeasureUnitcreateQuart (UErrorCode &status)
 Returns unit of volume: quart.
static MeasureUnitcreateTablespoon (UErrorCode &status)
 Returns unit of volume: tablespoon.
static MeasureUnitcreateTeaspoon (UErrorCode &status)
 Returns unit of volume: teaspoon.

Additional Inherited Members

- Protected Member Functions inherited from icu::MeasureUnit
void initTime (const char *timeId)
 For ICU use only.
void initCurrency (const char *isoCurrency)
 For ICU use only.

Detailed Description

A unit of currency, such as USD (U.S.

dollars) or JPY (Japanese yen). This class is a thin wrapper over a UChar string that subclasses MeasureUnit, for use with Measure and MeasureFormat.

Alan Liu
ICU 3.0

Definition at line 35 of file currunit.h.

Constructor & Destructor Documentation

icu::CurrencyUnit::CurrencyUnit ( const UChar isoCode,
UErrorCode ec 

Construct an object with the given ISO currency code.

isoCodethe 3-letter ISO 4217 currency code; must not be NULL and must have length 3
ecinput-output error code. If the isoCode is invalid, then this will be set to a failing value.
ICU 3.0
icu::CurrencyUnit::CurrencyUnit ( const CurrencyUnit other)

Copy constructor.

ICU 3.0
virtual icu::CurrencyUnit::~CurrencyUnit ( )


ICU 3.0

Member Function Documentation

virtual UObject* icu::CurrencyUnit::clone ( ) const

Return a polymorphic clone of this object.

The result will have the same class as returned by getDynamicClassID().

ICU 3.0

Reimplemented from icu::MeasureUnit.

virtual UClassID icu::CurrencyUnit::getDynamicClassID ( ) const

Returns a unique class ID for this object POLYMORPHICALLY.

This method implements a simple form of RTTI used by ICU.

The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.
ICU 3.0

Reimplemented from icu::MeasureUnit.

const UChar * icu::CurrencyUnit::getISOCurrency ( ) const

Return the ISO currency code of this object.

ICU 3.0

Definition at line 103 of file currunit.h.

static UClassID icu::CurrencyUnit::getStaticClassID ( )

Returns the class ID for this class.

This is used to compare to the return value of getDynamicClassID().

The class ID for all objects of this class.
ICU 3.0

Reimplemented from icu::MeasureUnit.

CurrencyUnit& icu::CurrencyUnit::operator= ( const CurrencyUnit other)

Assignment operator.

ICU 3.0

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