ICU 4.8.1.1  4.8.1.1
curramt.h
Go to the documentation of this file.
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 __CURRENCYAMOUNT_H__
00012 #define __CURRENCYAMOUNT_H__
00013 
00014 #include "unicode/utypes.h"
00015 
00016 #if !UCONFIG_NO_FORMATTING
00017 
00018 #include "unicode/measure.h"
00019 #include "unicode/currunit.h"
00020 
00026 U_NAMESPACE_BEGIN
00027 
00035 class U_I18N_API CurrencyAmount: public Measure {
00036  public:
00047     CurrencyAmount(const Formattable& amount, const UChar* isoCode,
00048                    UErrorCode &ec);
00049 
00060     CurrencyAmount(double amount, const UChar* isoCode,
00061                    UErrorCode &ec);
00062 
00067     CurrencyAmount(const CurrencyAmount& other);
00068  
00073     CurrencyAmount& operator=(const CurrencyAmount& other);
00074 
00080     virtual UObject* clone() const;
00081 
00086     virtual ~CurrencyAmount();
00087     
00096     virtual UClassID getDynamicClassID() const;
00097 
00104     static UClassID U_EXPORT2 getStaticClassID();
00105 
00110     inline const CurrencyUnit& getCurrency() const;
00111 
00116     inline const UChar* getISOCurrency() const;
00117 };
00118 
00119 inline const CurrencyUnit& CurrencyAmount::getCurrency() const {
00120     return (const CurrencyUnit&) getUnit();
00121 }
00122 
00123 inline const UChar* CurrencyAmount::getISOCurrency() const {
00124     return getCurrency().getISOCurrency();
00125 }
00126 
00127 U_NAMESPACE_END
00128 
00129 #endif // !UCONFIG_NO_FORMATTING
00130 #endif // __CURRENCYAMOUNT_H__
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines