CurrencyAmount Class Reference

#include <curramt.h>

Inheritance diagram for CurrencyAmount:

Measure UObject UMemory

Detailed Description

A currency together with a numeric amount, such as 200 USD.

Author:
Alan Liu
Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Definition at line 31 of file curramt.h.

Public Member Functions

 CurrencyAmount (const Formattable &amount, const UChar *isoCode, UErrorCode &ec)
 Construct an object with the given numeric amount and the given ISO currency code.

 CurrencyAmount (double amount, const UChar *isoCode, UErrorCode &ec)
 Construct an object with the given numeric amount and the given ISO currency code.

 CurrencyAmount (const CurrencyAmount &other)
 Copy constructor.

CurrencyAmountoperator= (const CurrencyAmount &other)
 Assignment operator.

virtual UObjectclone () const
 Return a polymorphic clone of this object.

virtual ~CurrencyAmount ()
 Destructor.

virtual UClassID getDynamicClassID () const
 Returns a unique class ID for this object POLYMORPHICALLY.

const CurrencyUnitgetCurrency () const
 Return the currency unit object of this object.

const UChargetISOCurrency () const
 Return the ISO currency code of this object.


Static Public Member Functions

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


Constructor & Destructor Documentation

CurrencyAmount::CurrencyAmount const Formattable amount,
const UChar isoCode,
UErrorCode ec
 

Construct an object with the given numeric amount and the given ISO currency code.

Parameters:
amount a numeric object; amount.isNumeric() must be TRUE
isoCode the 3-letter ISO 4217 currency code; must not be NULL and must have length 3
ec input-output error code. If the amount or the isoCode is invalid, then this will be set to a failing value.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

CurrencyAmount::CurrencyAmount double  amount,
const UChar isoCode,
UErrorCode ec
 

Construct an object with the given numeric amount and the given ISO currency code.

Parameters:
amount the amount of the given currency
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.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

CurrencyAmount::CurrencyAmount const CurrencyAmount other  ) 
 

Copy constructor.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

virtual CurrencyAmount::~CurrencyAmount  )  [virtual]
 

Destructor.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0


Member Function Documentation

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

Return a polymorphic clone of this object.

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

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Implements Measure.

const CurrencyUnit & CurrencyAmount::getCurrency  )  const [inline]
 

Return the currency unit object of this object.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Definition at line 135 of file curramt.h.

virtual UClassID CurrencyAmount::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.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Implements UObject.

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

Return the ISO currency code of this object.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Definition at line 139 of file curramt.h.

UClassID CurrencyAmount::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.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

CurrencyAmount& CurrencyAmount::operator= const CurrencyAmount other  ) 
 

Assignment operator.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 12:36:24 2004 for ICU by doxygen 1.3.7