/src/icu/source/i18n/curramt.cpp
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | // © 2016 and later: Unicode, Inc. and others.  | 
2  |  | // License & terms of use: http://www.unicode.org/copyright.html  | 
3  |  | /*  | 
4  |  | **********************************************************************  | 
5  |  | * Copyright (c) 2004, International Business Machines  | 
6  |  | * Corporation and others.  All Rights Reserved.  | 
7  |  | **********************************************************************  | 
8  |  | * Author: Alan Liu  | 
9  |  | * Created: April 26, 2004  | 
10  |  | * Since: ICU 3.0  | 
11  |  | **********************************************************************  | 
12  |  | */  | 
13  |  | #include "unicode/utypes.h"  | 
14  |  |  | 
15  |  | #if !UCONFIG_NO_FORMATTING  | 
16  |  |  | 
17  |  | #include "unicode/curramt.h"  | 
18  |  | #include "unicode/currunit.h"  | 
19  |  |  | 
20  |  | U_NAMESPACE_BEGIN  | 
21  |  |  | 
22  |  | CurrencyAmount::CurrencyAmount(const Formattable& amount, ConstChar16Ptr isoCode,  | 
23  |  |                                UErrorCode& ec) :  | 
24  | 0  |     Measure(amount, new CurrencyUnit(isoCode, ec), ec) { | 
25  | 0  | }  | 
26  |  |  | 
27  |  | CurrencyAmount::CurrencyAmount(double amount, ConstChar16Ptr isoCode,  | 
28  |  |                                UErrorCode& ec) :  | 
29  | 0  |     Measure(Formattable(amount), new CurrencyUnit(isoCode, ec), ec) { | 
30  | 0  | }  | 
31  |  |  | 
32  |  | CurrencyAmount::CurrencyAmount(const CurrencyAmount& other) :  | 
33  | 0  |     Measure(other) { | 
34  | 0  | }  | 
35  |  |  | 
36  | 0  | CurrencyAmount& CurrencyAmount::operator=(const CurrencyAmount& other) { | 
37  | 0  |     Measure::operator=(other);  | 
38  | 0  |     return *this;  | 
39  | 0  | }  | 
40  |  |  | 
41  | 0  | CurrencyAmount* CurrencyAmount::clone() const { | 
42  | 0  |     return new CurrencyAmount(*this);  | 
43  | 0  | }  | 
44  |  |  | 
45  | 0  | CurrencyAmount::~CurrencyAmount() { | 
46  | 0  | }  | 
47  |  |       | 
48  |  | UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyAmount)  | 
49  |  |  | 
50  |  | U_NAMESPACE_END  | 
51  |  |  | 
52  |  | #endif // !UCONFIG_NO_FORMATTING  |