00001 /* 00002 ********************************************************************** 00003 * Copyright (c) 2004-2006, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ********************************************************************** 00006 * Author: Alan Liu 00007 * Created: April 26, 2004 00008 * Since: ICU 3.0 00009 ********************************************************************** 00010 */ 00011 #ifndef __CURRENCYUNIT_H__ 00012 #define __CURRENCYUNIT_H__ 00013 00014 #include "unicode/utypes.h" 00015 00016 #if !UCONFIG_NO_FORMATTING 00017 00018 #include "unicode/measunit.h" 00019 00025 U_NAMESPACE_BEGIN 00026 00035 class U_I18N_API CurrencyUnit: public MeasureUnit { 00036 public: 00045 CurrencyUnit(const UChar* isoCode, UErrorCode &ec); 00046 00051 CurrencyUnit(const CurrencyUnit& other); 00052 00057 CurrencyUnit& operator=(const CurrencyUnit& other); 00058 00064 virtual UObject* clone() const; 00065 00070 virtual ~CurrencyUnit(); 00071 00077 UBool operator==(const UObject& other) const; 00078 00087 virtual UClassID getDynamicClassID() const; 00088 00095 static UClassID U_EXPORT2 getStaticClassID(); 00096 00101 inline const UChar* getISOCurrency() const; 00102 00103 private: 00107 UChar isoCode[4]; 00108 }; 00109 00110 inline const UChar* CurrencyUnit::getISOCurrency() const { 00111 return isoCode; 00112 } 00113 00114 U_NAMESPACE_END 00115 00116 #endif // !UCONFIG_NO_FORMATTING 00117 #endif // __CURRENCYUNIT_H__