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-2006, 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 __CURRENCYAMOUNT_H__ 00014 #define __CURRENCYAMOUNT_H__ 00015 00016 #include "unicode/utypes.h" 00017 00018 #if !UCONFIG_NO_FORMATTING 00019 00020 #include "unicode/measure.h" 00021 #include "unicode/currunit.h" 00022 00028 U_NAMESPACE_BEGIN 00029 00037 class U_I18N_API CurrencyAmount: public Measure { 00038 public: 00049 CurrencyAmount(const Formattable& amount, ConstChar16Ptr isoCode, 00050 UErrorCode &ec); 00051 00062 CurrencyAmount(double amount, ConstChar16Ptr isoCode, 00063 UErrorCode &ec); 00064 00069 CurrencyAmount(const CurrencyAmount& other); 00070 00075 CurrencyAmount& operator=(const CurrencyAmount& other); 00076 00082 virtual UObject* clone() const; 00083 00088 virtual ~CurrencyAmount(); 00089 00098 virtual UClassID getDynamicClassID() const; 00099 00106 static UClassID U_EXPORT2 getStaticClassID(); 00107 00112 inline const CurrencyUnit& getCurrency() const; 00113 00118 inline const char16_t* getISOCurrency() const; 00119 }; 00120 00121 inline const CurrencyUnit& CurrencyAmount::getCurrency() const { 00122 return (const CurrencyUnit&) getUnit(); 00123 } 00124 00125 inline const char16_t* CurrencyAmount::getISOCurrency() const { 00126 return getCurrency().getISOCurrency(); 00127 } 00128 00129 U_NAMESPACE_END 00130 00131 #endif // !UCONFIG_NO_FORMATTING 00132 #endif // __CURRENCYAMOUNT_H__
1.6.1