michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (c) 2004, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * Author: Alan Liu michael@0: * Created: April 26, 2004 michael@0: * Since: ICU 3.0 michael@0: ********************************************************************** michael@0: */ michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/curramt.h" michael@0: #include "unicode/currunit.h" michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: CurrencyAmount::CurrencyAmount(const Formattable& amount, const UChar* isoCode, michael@0: UErrorCode& ec) : michael@0: Measure(amount, new CurrencyUnit(isoCode, ec), ec) { michael@0: } michael@0: michael@0: CurrencyAmount::CurrencyAmount(double amount, const UChar* isoCode, michael@0: UErrorCode& ec) : michael@0: Measure(Formattable(amount), new CurrencyUnit(isoCode, ec), ec) { michael@0: } michael@0: michael@0: CurrencyAmount::CurrencyAmount(const CurrencyAmount& other) : michael@0: Measure(other) { michael@0: } michael@0: michael@0: CurrencyAmount& CurrencyAmount::operator=(const CurrencyAmount& other) { michael@0: Measure::operator=(other); michael@0: return *this; michael@0: } michael@0: michael@0: UObject* CurrencyAmount::clone() const { michael@0: return new CurrencyAmount(*this); michael@0: } michael@0: michael@0: CurrencyAmount::~CurrencyAmount() { michael@0: } michael@0: michael@0: UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyAmount) michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: #endif // !UCONFIG_NO_FORMATTING