00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ********************************************************************** 00005 * Copyright (c) 2004-2014, International Business Machines 00006 * Corporation and others. All Rights Reserved. 00007 ********************************************************************** 00008 * Author: Alan Liu 00009 * Created: April 26, 2004 00010 * Since: ICU 3.0 00011 ********************************************************************** 00012 */ 00013 #ifndef __CURRENCYUNIT_H__ 00014 #define __CURRENCYUNIT_H__ 00015 00016 #include "unicode/utypes.h" 00017 00018 #if !UCONFIG_NO_FORMATTING 00019 00020 #include "unicode/measunit.h" 00021 00027 U_NAMESPACE_BEGIN 00028 00037 class U_I18N_API CurrencyUnit: public MeasureUnit { 00038 public: 00043 CurrencyUnit(); 00044 00053 CurrencyUnit(ConstChar16Ptr isoCode, UErrorCode &ec); 00054 00059 CurrencyUnit(const CurrencyUnit& other); 00060 00061 #ifndef U_HIDE_DRAFT_API 00062 00070 CurrencyUnit(const MeasureUnit& measureUnit, UErrorCode &ec); 00071 #endif /* U_HIDE_DRAFT_API */ 00072 00077 CurrencyUnit& operator=(const CurrencyUnit& other); 00078 00084 virtual UObject* clone() const; 00085 00090 virtual ~CurrencyUnit(); 00091 00100 virtual UClassID getDynamicClassID() const; 00101 00108 static UClassID U_EXPORT2 getStaticClassID(); 00109 00114 inline const char16_t* getISOCurrency() const; 00115 00116 private: 00120 char16_t isoCode[4]; 00121 }; 00122 00123 inline const char16_t* CurrencyUnit::getISOCurrency() const { 00124 return isoCode; 00125 } 00126 00127 U_NAMESPACE_END 00128 00129 #endif // !UCONFIG_NO_FORMATTING 00130 #endif // __CURRENCYUNIT_H__
1.6.1