]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/currfmt.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / currfmt.h
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**********************************************************************
57a6839d 5* Copyright (c) 2004-2014, International Business Machines
374ca955
A
6* Corporation and others. All Rights Reserved.
7**********************************************************************
8* Author: Alan Liu
9* Created: April 20, 2004
10* Since: ICU 3.0
11**********************************************************************
12*/
13#ifndef CURRENCYFORMAT_H
14#define CURRENCYFORMAT_H
15
16#include "unicode/utypes.h"
17
18#if !UCONFIG_NO_FORMATTING
19
20#include "unicode/measfmt.h"
21
22U_NAMESPACE_BEGIN
23
24class NumberFormat;
25
26/**
27 * Temporary internal concrete subclass of MeasureFormat implementing
28 * parsing and formatting of currency amount objects. This class is
29 * likely to be redesigned and rewritten in the near future.
30 *
31 * <p>This class currently delegates to DecimalFormat for parsing and
32 * formatting.
33 *
34 * @see MeasureFormat
35 * @author Alan Liu
36 * @internal
37 */
46f4442e 38class CurrencyFormat : public MeasureFormat {
374ca955
A
39
40 public:
41
42 /**
43 * Construct a CurrencyFormat for the given locale.
44 */
45 CurrencyFormat(const Locale& locale, UErrorCode& ec);
46
47 /**
48 * Copy constructor.
49 */
50 CurrencyFormat(const CurrencyFormat& other);
51
52 /**
53 * Destructor.
54 */
55 virtual ~CurrencyFormat();
56
374ca955
A
57 /**
58 * Override Format API.
59 */
60 virtual Format* clone() const;
61
729e4ab9
A
62
63 using MeasureFormat::format;
64
374ca955
A
65 /**
66 * Override Format API.
67 */
68 virtual UnicodeString& format(const Formattable& obj,
69 UnicodeString& appendTo,
70 FieldPosition& pos,
71 UErrorCode& ec) const;
72
374ca955
A
73 /**
74 * Override Format API.
75 */
76 virtual void parseObject(const UnicodeString& source,
77 Formattable& result,
78 ParsePosition& pos) const;
79
374ca955
A
80 /**
81 * Override Format API.
82 */
83 virtual UClassID getDynamicClassID() const;
84
85 /**
86 * Returns the class ID for this class.
87 */
88 static UClassID U_EXPORT2 getStaticClassID();
89
90 private:
91
92 NumberFormat* fmt;
93};
94
95U_NAMESPACE_END
96
97#endif // #if !UCONFIG_NO_FORMATTING
98#endif // #ifndef CURRENCYFORMAT_H