]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/measfmt.cpp
ICU-511.35.tar.gz
[apple/icu.git] / icuSources / i18n / measfmt.cpp
CommitLineData
374ca955
A
1/*
2**********************************************************************
4388f060 3* Copyright (c) 2004-2011, International Business Machines
374ca955
A
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
4388f060
A
22MeasureFormat::~MeasureFormat() {}
23
374ca955
A
24MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(const Locale& locale,
25 UErrorCode& ec) {
26 CurrencyFormat* fmt = NULL;
27 if (U_SUCCESS(ec)) {
28 fmt = new CurrencyFormat(locale, ec);
29 if (U_FAILURE(ec)) {
30 delete fmt;
31 fmt = NULL;
32 }
33 }
34 return fmt;
35}
36
37MeasureFormat* U_EXPORT2 MeasureFormat::createCurrencyFormat(UErrorCode& ec) {
38 if (U_FAILURE(ec)) {
39 return NULL;
40 }
41 return MeasureFormat::createCurrencyFormat(Locale::getDefault(), ec);
42}
43
44U_NAMESPACE_END
45
46#endif /* #if !UCONFIG_NO_FORMATTING */