]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/curramt.cpp
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / curramt.cpp
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
374ca955
A
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
20U_NAMESPACE_BEGIN
21
f3c0d7a5 22CurrencyAmount::CurrencyAmount(const Formattable& amount, ConstChar16Ptr isoCode,
374ca955
A
23 UErrorCode& ec) :
24 Measure(amount, new CurrencyUnit(isoCode, ec), ec) {
25}
26
f3c0d7a5 27CurrencyAmount::CurrencyAmount(double amount, ConstChar16Ptr isoCode,
374ca955
A
28 UErrorCode& ec) :
29 Measure(Formattable(amount), new CurrencyUnit(isoCode, ec), ec) {
30}
31
32CurrencyAmount::CurrencyAmount(const CurrencyAmount& other) :
33 Measure(other) {
34}
35
36CurrencyAmount& CurrencyAmount::operator=(const CurrencyAmount& other) {
37 Measure::operator=(other);
38 return *this;
39}
40
41UObject* CurrencyAmount::clone() const {
42 return new CurrencyAmount(*this);
43}
44
45CurrencyAmount::~CurrencyAmount() {
46}
47
48UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyAmount)
49
50U_NAMESPACE_END
51
52#endif // !UCONFIG_NO_FORMATTING