]> git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/currfmt.h
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / i18n / currfmt.h
1 /*
2 **********************************************************************
3 * Copyright (c) 2004-2008, 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 #ifndef CURRENCYFORMAT_H
12 #define CURRENCYFORMAT_H
13
14 #include "unicode/utypes.h"
15
16 #if !UCONFIG_NO_FORMATTING
17
18 #include "unicode/measfmt.h"
19
20 U_NAMESPACE_BEGIN
21
22 class NumberFormat;
23
24 /**
25 * Temporary internal concrete subclass of MeasureFormat implementing
26 * parsing and formatting of currency amount objects. This class is
27 * likely to be redesigned and rewritten in the near future.
28 *
29 * <p>This class currently delegates to DecimalFormat for parsing and
30 * formatting.
31 *
32 * @see MeasureFormat
33 * @author Alan Liu
34 * @internal
35 */
36 class CurrencyFormat : public MeasureFormat {
37
38 public:
39
40 /**
41 * Construct a CurrencyFormat for the given locale.
42 */
43 CurrencyFormat(const Locale& locale, UErrorCode& ec);
44
45 /**
46 * Copy constructor.
47 */
48 CurrencyFormat(const CurrencyFormat& other);
49
50 /**
51 * Destructor.
52 */
53 virtual ~CurrencyFormat();
54
55 /**
56 * Override Format API.
57 */
58 virtual UBool operator==(const Format& other) const;
59
60 /**
61 * Override Format API.
62 */
63 virtual Format* clone() const;
64
65 /**
66 * Override Format API.
67 */
68 virtual UnicodeString& format(const Formattable& obj,
69 UnicodeString& appendTo,
70 FieldPosition& pos,
71 UErrorCode& ec) const;
72
73 /**
74 * Override Format API.
75 */
76 virtual void parseObject(const UnicodeString& source,
77 Formattable& result,
78 ParsePosition& pos) const;
79
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
95 U_NAMESPACE_END
96
97 #endif // #if !UCONFIG_NO_FORMATTING
98 #endif // #ifndef CURRENCYFORMAT_H