ICU 4.8.1.1
4.8.1.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... | |
UBool | operator== (const UObject &other) const |
Equality operator. 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... | |
![]() | |
virtual | ~MeasureUnit () |
Destructor. More... | |
![]() | |
virtual | ~UObject () |
Destructor. More... | |
Static Public Member Functions | |
static UClassID | getStaticClassID () |
Returns the class ID for this class. More... | |
![]() | |
static void * | operator new (size_t size) |
Override for ICU4C C++ memory management. More... | |
static void * | operator new[] (size_t size) |
Override for ICU4C C++ memory management. More... | |
static void | operator delete (void *p) |
Override for ICU4C C++ memory management. More... | |
static void | operator delete[] (void *p) |
Override for ICU4C C++ memory management. More... | |
static void * | operator new (size_t, void *ptr) |
Override for ICU4C C++ memory management for STL. More... | |
static void | operator delete (void *, void *) |
Override for ICU4C C++ memory management for STL. More... | |
Additional Inherited Members | |
![]() | |
MeasureUnit () | |
Default constructor. 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.
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. |
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().
Implements MeasureUnit.
|
virtual |
|
inline |
Return the ISO currency code of this object.
Definition at line 110 of file currunit.h.
Referenced by CurrencyAmount::getISOCurrency().
|
static |
Returns the class ID for this class.
This is used to compare to the return value of getDynamicClassID().
CurrencyUnit& CurrencyUnit::operator= | ( | const CurrencyUnit & | other | ) |
Assignment operator.
Equality operator.
Return true if this object is equal to the given object.
Implements MeasureUnit.