michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (c) 2004-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * Author: Alan Liu michael@0: * Created: April 20, 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/measfmt.h" michael@0: #include "currfmt.h" michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: MeasureFormat::MeasureFormat() {} michael@0: michael@0: MeasureFormat::~MeasureFormat() {} michael@0: michael@0: MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(const Locale& locale, michael@0: UErrorCode& ec) { michael@0: CurrencyFormat* fmt = NULL; michael@0: if (U_SUCCESS(ec)) { michael@0: fmt = new CurrencyFormat(locale, ec); michael@0: if (U_FAILURE(ec)) { michael@0: delete fmt; michael@0: fmt = NULL; michael@0: } michael@0: } michael@0: return fmt; michael@0: } michael@0: michael@0: MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(UErrorCode& ec) { michael@0: if (U_FAILURE(ec)) { michael@0: return NULL; michael@0: } michael@0: return MeasureFormat::createCurrencyFormat(Locale::getDefault(), ec); michael@0: } michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: #endif /* #if !UCONFIG_NO_FORMATTING */