CurrencyUnit Class Reference

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

#include <currunit.h>

Inheritance diagram for CurrencyUnit:

MeasureUnit UObject 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 ()
 Destructor.
UBool operator== (const UObject &other) const
 Equality operator.
virtual UClassID getDynamicClassID () const
 Returns a unique class ID for this object POLYMORPHICALLY.
const UChar * getISOCurrency () const
 Return the ISO currency code of this object.

Static Public Member Functions

UClassID U_EXPORT2 getStaticClassID ()
 Returns the class ID for this class.

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
ICU_Draft:
ICU 3.0

Definition at line 31 of file currunit.h.


Constructor & Destructor Documentation

CurrencyUnit::CurrencyUnit const UChar *  isoCode,
UErrorCode ec
 

Construct an object with the given ISO currency code.

Parameters:
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_Draft:
ICU 3.0

CurrencyUnit::CurrencyUnit const CurrencyUnit other  ) 
 

Copy constructor.

ICU_Draft:
ICU 3.0

virtual CurrencyUnit::~CurrencyUnit  )  [virtual]
 

Destructor.

ICU_Draft:
ICU 3.0


Member Function Documentation

virtual UObject* CurrencyUnit::clone  )  const [virtual]
 

Return a polymorphic clone of this object.

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

ICU_Draft:
ICU 3.0

Implements MeasureUnit.

virtual UClassID 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.
ICU_Draft:
ICU 3.0

Implements UObject.

const UChar * CurrencyUnit::getISOCurrency  )  const [inline]
 

Return the ISO currency code of this object.

ICU_Draft:
ICU 3.0

Definition at line 115 of file currunit.h.

UClassID U_EXPORT2 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.
ICU_Draft:
ICU 3.0

CurrencyUnit& CurrencyUnit::operator= const CurrencyUnit other  ) 
 

Assignment operator.

ICU_Draft:
ICU 3.0

UBool CurrencyUnit::operator== const UObject other  )  const [virtual]
 

Equality operator.

Return true if this object is equal to the given object.

ICU_Draft:
ICU 3.0

Implements MeasureUnit.


The documentation for this class was generated from the following file:
Generated on Tue Nov 16 10:03:16 2004 for ICU 3.2 by  doxygen 1.3.9.1