2 **********************************************************************
3 * Copyright (c) 2004, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
7 * Created: April 20, 2004
9 **********************************************************************
11 #ifndef CURRENCYFORMAT_H
12 #define CURRENCYFORMAT_H
14 #include "unicode/utypes.h"
16 #if !UCONFIG_NO_FORMATTING
18 #include "unicode/measfmt.h"
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.
29 * <p>This class currently delegates to DecimalFormat for parsing and
36 class U_I18N_API CurrencyFormat
: public MeasureFormat
{
41 * Construct a CurrencyFormat for the given locale.
43 CurrencyFormat(const Locale
& locale
, UErrorCode
& ec
);
48 CurrencyFormat(const CurrencyFormat
& other
);
53 virtual ~CurrencyFormat();
56 * Override Format API.
58 virtual UBool
operator==(const Format
& other
) const;
61 * Override Format API.
63 virtual Format
* clone() const;
66 * Override Format API.
68 virtual UnicodeString
& format(const Formattable
& obj
,
69 UnicodeString
& appendTo
,
71 UErrorCode
& ec
) const;
74 * Redeclare Format API to prevent hiding.
76 UnicodeString
& format(const Formattable
& obj
,
77 UnicodeString
& appendTo
,
78 UErrorCode
& ec
) const;
81 * Override Format API.
83 virtual void parseObject(const UnicodeString
& source
,
85 ParsePosition
& pos
) const;
88 * Redeclare Format API to prevent hiding.
90 void parseObject(const UnicodeString
& source
,
92 UErrorCode
& ec
) const;
95 * Override Format API.
97 virtual UClassID
getDynamicClassID() const;
100 * Returns the class ID for this class.
102 static UClassID U_EXPORT2
getStaticClassID();
111 #endif // #if !UCONFIG_NO_FORMATTING
112 #endif // #ifndef CURRENCYFORMAT_H