ICU 54.1 54.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
curramt.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (c) 2004-2006, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Author: Alan Liu
7 * Created: April 26, 2004
8 * Since: ICU 3.0
9 **********************************************************************
10 */
11 #ifndef __CURRENCYAMOUNT_H__
12 #define __CURRENCYAMOUNT_H__
13
14 #include "unicode/utypes.h"
15
16 #if !UCONFIG_NO_FORMATTING
17
18 #include "unicode/measure.h"
19 #include "unicode/currunit.h"
20
26 U_NAMESPACE_BEGIN
27
35 class U_I18N_API CurrencyAmount: public Measure {
36 public:
47 CurrencyAmount(const Formattable& amount, const UChar* isoCode,
48 UErrorCode &ec);
49
60 CurrencyAmount(double amount, const UChar* isoCode,
61 UErrorCode &ec);
62
67 CurrencyAmount(const CurrencyAmount& other);
68
73 CurrencyAmount& operator=(const CurrencyAmount& other);
74
80 virtual UObject* clone() const;
81
86 virtual ~CurrencyAmount();
87
96 virtual UClassID getDynamicClassID() const;
97
104 static UClassID U_EXPORT2 getStaticClassID();
105
110 inline const CurrencyUnit& getCurrency() const;
111
116 inline const UChar* getISOCurrency() const;
117 };
118
119 inline const CurrencyUnit& CurrencyAmount::getCurrency() const {
120 return (const CurrencyUnit&) getUnit();
121 }
122
123 inline const UChar* CurrencyAmount::getISOCurrency() const {
124 return getCurrency().getISOCurrency();
125 }
126
127 U_NAMESPACE_END
128
129 #endif // !UCONFIG_NO_FORMATTING
130 #endif // __CURRENCYAMOUNT_H__