]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/measfmt.cpp
ICU-6.2.15.tar.gz
[apple/icu.git] / icuSources / i18n / measfmt.cpp
CommitLineData
374ca955
A
1/*
2**********************************************************************
3* Copyright (c) 2004, International Business Machines
4* Corporation and others. All Rights Reserved.
5**********************************************************************
6* Author: Alan Liu
7* Created: April 20, 2004
8* Since: ICU 3.0
9**********************************************************************
10*/
11#include "unicode/utypes.h"
12
13#if !UCONFIG_NO_FORMATTING
14
15#include "unicode/measfmt.h"
16#include "currfmt.h"
17
18U_NAMESPACE_BEGIN
19
20MeasureFormat::MeasureFormat() {}
21
22MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(const Locale& locale,
23 UErrorCode& ec) {
24 CurrencyFormat* fmt = NULL;
25 if (U_SUCCESS(ec)) {
26 fmt = new CurrencyFormat(locale, ec);
27 if (U_FAILURE(ec)) {
28 delete fmt;
29 fmt = NULL;
30 }
31 }
32 return fmt;
33}
34
35MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(UErrorCode& ec) {
36 if (U_FAILURE(ec)) {
37 return NULL;
38 }
39 return MeasureFormat::createCurrencyFormat(Locale::getDefault(), ec);
40}
41
42U_NAMESPACE_END
43
44#endif /* #if !UCONFIG_NO_FORMATTING */