ICU 53.1
53.1
|
A unit of currency, such as USD (U.S. More...
#include <currunit.h>
Public Member Functions | |
CurrencyUnit (const UChar *isoCode, UErrorCode &ec) | |
Construct an object with the given ISO currency code. More... | |
CurrencyUnit (const CurrencyUnit &other) | |
Copy constructor. More... | |
CurrencyUnit & | operator= (const CurrencyUnit &other) |
Assignment operator. More... | |
virtual UObject * | clone () const |
Return a polymorphic clone of this object. More... | |
virtual | ~CurrencyUnit () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
Returns a unique class ID for this object POLYMORPHICALLY. More... | |
const UChar * | getISOCurrency () const |
Return the ISO currency code of this object. More... | |
![]() | |
MeasureUnit () | |
Default constructor. More... | |
MeasureUnit (const MeasureUnit &other) | |
Copy constructor. More... | |
MeasureUnit & | operator= (const MeasureUnit &other) |
Assignment operator. More... | |
virtual | ~MeasureUnit () |
Destructor. More... | |
virtual UBool | operator== (const UObject &other) const |
Equality operator. More... | |
UBool | operator!= (const UObject &other) const |
Inequality operator. More... | |
const char * | getType () const |
Get the type. More... | |
const char * | getSubtype () const |
Get the sub type. More... | |
int32_t | getIndex () const |
ICU use only. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
Static Public Member Functions | |
static UClassID | getStaticClassID () |
Returns the class ID for this class. More... | |
![]() | |
static int32_t | getAvailable (MeasureUnit *destArray, int32_t destCapacity, UErrorCode &errorCode) |
getAvailable gets all of the available units. More... | |
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. More... | |
static StringEnumeration * | getAvailableTypes (UErrorCode &errorCode) |
getAvailableTypes gets all of the available types. More... | |
static UClassID | getStaticClassID (void) |
Return the class ID for this class. More... | |
static int32_t | getIndexCount () |
ICU use only. More... | |
static MeasureUnit * | createGForce (UErrorCode &status) |
Creates a unit of acceleration: g-force. More... | |
static MeasureUnit * | createArcMinute (UErrorCode &status) |
Creates a unit of angle: arc-minute. More... | |
static MeasureUnit * | createArcSecond (UErrorCode &status) |
Creates a unit of angle: arc-second. More... | |
static MeasureUnit * | createDegree (UErrorCode &status) |
Creates a unit of angle: degree. More... | |
static MeasureUnit * | createAcre (UErrorCode &status) |
Creates a unit of area: acre. More... | |
static MeasureUnit * | createHectare (UErrorCode &status) |
Creates a unit of area: hectare. More... | |
static MeasureUnit * | createSquareFoot (UErrorCode &status) |
Creates a unit of area: square-foot. More... | |
static MeasureUnit * | createSquareKilometer (UErrorCode &status) |
Creates a unit of area: square-kilometer. More... | |
static MeasureUnit * | createSquareMeter (UErrorCode &status) |
Creates a unit of area: square-meter. More... | |
static MeasureUnit * | createSquareMile (UErrorCode &status) |
Creates a unit of area: square-mile. More... | |
static MeasureUnit * | createDay (UErrorCode &status) |
Creates a unit of duration: day. More... | |
static MeasureUnit * | createHour (UErrorCode &status) |
Creates a unit of duration: hour. More... | |
static MeasureUnit * | createMillisecond (UErrorCode &status) |
Creates a unit of duration: millisecond. More... | |
static MeasureUnit * | createMinute (UErrorCode &status) |
Creates a unit of duration: minute. More... | |
static MeasureUnit * | createMonth (UErrorCode &status) |
Creates a unit of duration: month. More... | |
static MeasureUnit * | createSecond (UErrorCode &status) |
Creates a unit of duration: second. More... | |
static MeasureUnit * | createWeek (UErrorCode &status) |
Creates a unit of duration: week. More... | |
static MeasureUnit * | createYear (UErrorCode &status) |
Creates a unit of duration: year. More... | |
static MeasureUnit * | createCentimeter (UErrorCode &status) |
Creates a unit of length: centimeter. More... | |
static MeasureUnit * | createFoot (UErrorCode &status) |
Creates a unit of length: foot. More... | |
static MeasureUnit * | createInch (UErrorCode &status) |
Creates a unit of length: inch. More... | |
static MeasureUnit * | createKilometer (UErrorCode &status) |
Creates a unit of length: kilometer. More... | |
static MeasureUnit * | createLightYear (UErrorCode &status) |
Creates a unit of length: light-year. More... | |
static MeasureUnit * | createMeter (UErrorCode &status) |
Creates a unit of length: meter. More... | |
static MeasureUnit * | createMile (UErrorCode &status) |
Creates a unit of length: mile. More... | |
static MeasureUnit * | createMillimeter (UErrorCode &status) |
Creates a unit of length: millimeter. More... | |
static MeasureUnit * | createPicometer (UErrorCode &status) |
Creates a unit of length: picometer. More... | |
static MeasureUnit * | createYard (UErrorCode &status) |
Creates a unit of length: yard. More... | |
static MeasureUnit * | createGram (UErrorCode &status) |
Creates a unit of mass: gram. More... | |
static MeasureUnit * | createKilogram (UErrorCode &status) |
Creates a unit of mass: kilogram. More... | |
static MeasureUnit * | createOunce (UErrorCode &status) |
Creates a unit of mass: ounce. More... | |
static MeasureUnit * | createPound (UErrorCode &status) |
Creates a unit of mass: pound. More... | |
static MeasureUnit * | createHorsepower (UErrorCode &status) |
Creates a unit of power: horsepower. More... | |
static MeasureUnit * | createKilowatt (UErrorCode &status) |
Creates a unit of power: kilowatt. More... | |
static MeasureUnit * | createWatt (UErrorCode &status) |
Creates a unit of power: watt. More... | |
static MeasureUnit * | createHectopascal (UErrorCode &status) |
Creates a unit of pressure: hectopascal. More... | |
static MeasureUnit * | createInchHg (UErrorCode &status) |
Creates a unit of pressure: inch-hg. More... | |
static MeasureUnit * | createMillibar (UErrorCode &status) |
Creates a unit of pressure: millibar. More... | |
static MeasureUnit * | createKilometerPerHour (UErrorCode &status) |
Creates a unit of speed: kilometer-per-hour. More... | |
static MeasureUnit * | createMeterPerSecond (UErrorCode &status) |
Creates a unit of speed: meter-per-second. More... | |
static MeasureUnit * | createMilePerHour (UErrorCode &status) |
Creates a unit of speed: mile-per-hour. More... | |
static MeasureUnit * | createCelsius (UErrorCode &status) |
Creates a unit of temperature: celsius. More... | |
static MeasureUnit * | createFahrenheit (UErrorCode &status) |
Creates a unit of temperature: fahrenheit. More... | |
static MeasureUnit * | createCubicKilometer (UErrorCode &status) |
Creates a unit of volume: cubic-kilometer. More... | |
static MeasureUnit * | createCubicMile (UErrorCode &status) |
Creates a unit of volume: cubic-mile. More... | |
static MeasureUnit * | createLiter (UErrorCode &status) |
Creates a unit of volume: liter. More... | |
Additional Inherited Members | |
![]() | |
void | initTime (const char *timeId) |
For ICU use only. More... | |
void | initCurrency (const char *isoCurrency) |
For ICU use only. More... | |
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.
Definition at line 35 of file currunit.h.
icu::CurrencyUnit::CurrencyUnit | ( | const UChar * | isoCode, |
UErrorCode & | ec | ||
) |
Construct an object with the given ISO currency code.
isoCode | the 3-letter ISO 4217 currency code; must not be NULL and must have length 3 |
ec | input-output error code. If the isoCode is invalid, then this will be set to a failing value. |
icu::CurrencyUnit::CurrencyUnit | ( | const CurrencyUnit & | other | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Return a polymorphic clone of this object.
The result will have the same class as returned by getDynamicClassID().
Reimplemented from icu::MeasureUnit.
|
virtual |
Returns a unique class ID for this object POLYMORPHICALLY.
This method implements a simple form of RTTI used by ICU.
Reimplemented from icu::MeasureUnit.
|
inline |
Return the ISO currency code of this object.
Definition at line 103 of file currunit.h.
|
static |
Returns the class ID for this class.
This is used to compare to the return value of getDynamicClassID().
CurrencyUnit& icu::CurrencyUnit::operator= | ( | const CurrencyUnit & | other | ) |
Assignment operator.