ICU 53.1  53.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. More...
 
 CurrencyUnit (const CurrencyUnit &other)
 Copy constructor. More...
 
CurrencyUnitoperator= (const CurrencyUnit &other)
 Assignment operator. More...
 
virtual UObjectclone () 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 UChargetISOCurrency () const
 Return the ISO currency code of this object. More...
 
- Public Member Functions inherited from icu::MeasureUnit
 MeasureUnit ()
 Default constructor. More...
 
 MeasureUnit (const MeasureUnit &other)
 Copy constructor. More...
 
MeasureUnitoperator= (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...
 
- Public Member Functions inherited from icu::UObject
virtual ~UObject ()
 Destructor. More...
 

Static Public Member Functions

static UClassID getStaticClassID ()
 Returns the class ID for this class. More...
 
- 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. 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 StringEnumerationgetAvailableTypes (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 MeasureUnitcreateGForce (UErrorCode &status)
 Creates a unit of acceleration: g-force. More...
 
static MeasureUnitcreateArcMinute (UErrorCode &status)
 Creates a unit of angle: arc-minute. More...
 
static MeasureUnitcreateArcSecond (UErrorCode &status)
 Creates a unit of angle: arc-second. More...
 
static MeasureUnitcreateDegree (UErrorCode &status)
 Creates a unit of angle: degree. More...
 
static MeasureUnitcreateAcre (UErrorCode &status)
 Creates a unit of area: acre. More...
 
static MeasureUnitcreateHectare (UErrorCode &status)
 Creates a unit of area: hectare. More...
 
static MeasureUnitcreateSquareFoot (UErrorCode &status)
 Creates a unit of area: square-foot. More...
 
static MeasureUnitcreateSquareKilometer (UErrorCode &status)
 Creates a unit of area: square-kilometer. More...
 
static MeasureUnitcreateSquareMeter (UErrorCode &status)
 Creates a unit of area: square-meter. More...
 
static MeasureUnitcreateSquareMile (UErrorCode &status)
 Creates a unit of area: square-mile. More...
 
static MeasureUnitcreateDay (UErrorCode &status)
 Creates a unit of duration: day. More...
 
static MeasureUnitcreateHour (UErrorCode &status)
 Creates a unit of duration: hour. More...
 
static MeasureUnitcreateMillisecond (UErrorCode &status)
 Creates a unit of duration: millisecond. More...
 
static MeasureUnitcreateMinute (UErrorCode &status)
 Creates a unit of duration: minute. More...
 
static MeasureUnitcreateMonth (UErrorCode &status)
 Creates a unit of duration: month. More...
 
static MeasureUnitcreateSecond (UErrorCode &status)
 Creates a unit of duration: second. More...
 
static MeasureUnitcreateWeek (UErrorCode &status)
 Creates a unit of duration: week. More...
 
static MeasureUnitcreateYear (UErrorCode &status)
 Creates a unit of duration: year. More...
 
static MeasureUnitcreateCentimeter (UErrorCode &status)
 Creates a unit of length: centimeter. More...
 
static MeasureUnitcreateFoot (UErrorCode &status)
 Creates a unit of length: foot. More...
 
static MeasureUnitcreateInch (UErrorCode &status)
 Creates a unit of length: inch. More...
 
static MeasureUnitcreateKilometer (UErrorCode &status)
 Creates a unit of length: kilometer. More...
 
static MeasureUnitcreateLightYear (UErrorCode &status)
 Creates a unit of length: light-year. More...
 
static MeasureUnitcreateMeter (UErrorCode &status)
 Creates a unit of length: meter. More...
 
static MeasureUnitcreateMile (UErrorCode &status)
 Creates a unit of length: mile. More...
 
static MeasureUnitcreateMillimeter (UErrorCode &status)
 Creates a unit of length: millimeter. More...
 
static MeasureUnitcreatePicometer (UErrorCode &status)
 Creates a unit of length: picometer. More...
 
static MeasureUnitcreateYard (UErrorCode &status)
 Creates a unit of length: yard. More...
 
static MeasureUnitcreateGram (UErrorCode &status)
 Creates a unit of mass: gram. More...
 
static MeasureUnitcreateKilogram (UErrorCode &status)
 Creates a unit of mass: kilogram. More...
 
static MeasureUnitcreateOunce (UErrorCode &status)
 Creates a unit of mass: ounce. More...
 
static MeasureUnitcreatePound (UErrorCode &status)
 Creates a unit of mass: pound. More...
 
static MeasureUnitcreateHorsepower (UErrorCode &status)
 Creates a unit of power: horsepower. More...
 
static MeasureUnitcreateKilowatt (UErrorCode &status)
 Creates a unit of power: kilowatt. More...
 
static MeasureUnitcreateWatt (UErrorCode &status)
 Creates a unit of power: watt. More...
 
static MeasureUnitcreateHectopascal (UErrorCode &status)
 Creates a unit of pressure: hectopascal. More...
 
static MeasureUnitcreateInchHg (UErrorCode &status)
 Creates a unit of pressure: inch-hg. More...
 
static MeasureUnitcreateMillibar (UErrorCode &status)
 Creates a unit of pressure: millibar. More...
 
static MeasureUnitcreateKilometerPerHour (UErrorCode &status)
 Creates a unit of speed: kilometer-per-hour. More...
 
static MeasureUnitcreateMeterPerSecond (UErrorCode &status)
 Creates a unit of speed: meter-per-second. More...
 
static MeasureUnitcreateMilePerHour (UErrorCode &status)
 Creates a unit of speed: mile-per-hour. More...
 
static MeasureUnitcreateCelsius (UErrorCode &status)
 Creates a unit of temperature: celsius. More...
 
static MeasureUnitcreateFahrenheit (UErrorCode &status)
 Creates a unit of temperature: fahrenheit. More...
 
static MeasureUnitcreateCubicKilometer (UErrorCode &status)
 Creates a unit of volume: cubic-kilometer. More...
 
static MeasureUnitcreateCubicMile (UErrorCode &status)
 Creates a unit of volume: cubic-mile. More...
 
static MeasureUnitcreateLiter (UErrorCode &status)
 Creates a unit of volume: liter. More...
 

Additional Inherited Members

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

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.

Author
Alan Liu
Stable:
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.

Parameters
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.
Stable:
ICU 3.0
icu::CurrencyUnit::CurrencyUnit ( const CurrencyUnit other)

Copy constructor.

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

Destructor.

Stable:
ICU 3.0

Member Function Documentation

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

Return a polymorphic clone of this object.

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

Stable:
ICU 3.0

Reimplemented from icu::MeasureUnit.

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

Returns a unique class ID for this object POLYMORPHICALLY.

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

Returns
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.
Stable:
ICU 3.0

Reimplemented from icu::MeasureUnit.

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

Return the ISO currency code of this object.

Stable:
ICU 3.0

Definition at line 103 of file currunit.h.

static UClassID icu::CurrencyUnit::getStaticClassID ( )
static

Returns the class ID for this class.

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

Returns
The class ID for all objects of this class.
Stable:
ICU 3.0
CurrencyUnit& icu::CurrencyUnit::operator= ( const CurrencyUnit other)

Assignment operator.

Stable:
ICU 3.0

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