]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/currfmt.h
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / i18n / currfmt.h
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#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
20U_NAMESPACE_BEGIN
21
22class 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 */
36class U_I18N_API 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 * Redeclare Format API to prevent hiding.
75 */
76 UnicodeString& format(const Formattable& obj,
77 UnicodeString& appendTo,
78 UErrorCode& ec) const;
79
80 /**
81 * Override Format API.
82 */
83 virtual void parseObject(const UnicodeString& source,
84 Formattable& result,
85 ParsePosition& pos) const;
86
87 /**
88 * Redeclare Format API to prevent hiding.
89 */
90 void parseObject(const UnicodeString& source,
91 Formattable& result,
92 UErrorCode& ec) const;
93
94 /**
95 * Override Format API.
96 */
97 virtual UClassID getDynamicClassID() const;
98
99 /**
100 * Returns the class ID for this class.
101 */
102 static UClassID U_EXPORT2 getStaticClassID();
103
104 private:
105
106 NumberFormat* fmt;
107};
108
109U_NAMESPACE_END
110
111#endif // #if !UCONFIG_NO_FORMATTING
112#endif // #ifndef CURRENCYFORMAT_H