michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (c) 2004-2010, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * Author: Alan Liu michael@0: * Created: April 20, 2004 michael@0: * Since: ICU 3.0 michael@0: ********************************************************************** michael@0: */ michael@0: #ifndef CURRENCYFORMAT_H michael@0: #define CURRENCYFORMAT_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/measfmt.h" michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: class NumberFormat; michael@0: michael@0: /** michael@0: * Temporary internal concrete subclass of MeasureFormat implementing michael@0: * parsing and formatting of currency amount objects. This class is michael@0: * likely to be redesigned and rewritten in the near future. michael@0: * michael@0: *

This class currently delegates to DecimalFormat for parsing and michael@0: * formatting. michael@0: * michael@0: * @see MeasureFormat michael@0: * @author Alan Liu michael@0: * @internal michael@0: */ michael@0: class CurrencyFormat : public MeasureFormat { michael@0: michael@0: public: michael@0: michael@0: /** michael@0: * Construct a CurrencyFormat for the given locale. michael@0: */ michael@0: CurrencyFormat(const Locale& locale, UErrorCode& ec); michael@0: michael@0: /** michael@0: * Copy constructor. michael@0: */ michael@0: CurrencyFormat(const CurrencyFormat& other); michael@0: michael@0: /** michael@0: * Destructor. michael@0: */ michael@0: virtual ~CurrencyFormat(); michael@0: michael@0: /** michael@0: * Override Format API. michael@0: */ michael@0: virtual UBool operator==(const Format& other) const; michael@0: michael@0: /** michael@0: * Override Format API. michael@0: */ michael@0: virtual Format* clone() const; michael@0: michael@0: michael@0: using MeasureFormat::format; michael@0: michael@0: /** michael@0: * Override Format API. michael@0: */ michael@0: virtual UnicodeString& format(const Formattable& obj, michael@0: UnicodeString& appendTo, michael@0: FieldPosition& pos, michael@0: UErrorCode& ec) const; michael@0: michael@0: /** michael@0: * Override Format API. michael@0: */ michael@0: virtual void parseObject(const UnicodeString& source, michael@0: Formattable& result, michael@0: ParsePosition& pos) const; michael@0: michael@0: /** michael@0: * Override Format API. michael@0: */ michael@0: virtual UClassID getDynamicClassID() const; michael@0: michael@0: /** michael@0: * Returns the class ID for this class. michael@0: */ michael@0: static UClassID U_EXPORT2 getStaticClassID(); michael@0: michael@0: private: michael@0: michael@0: NumberFormat* fmt; michael@0: }; michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: #endif // #if !UCONFIG_NO_FORMATTING michael@0: #endif // #ifndef CURRENCYFORMAT_H