diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /intl/icu/source/i18n/currfmt.h | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu/source/i18n/currfmt.h')
-rw-r--r-- | intl/icu/source/i18n/currfmt.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/intl/icu/source/i18n/currfmt.h b/intl/icu/source/i18n/currfmt.h new file mode 100644 index 0000000000..69a031957b --- /dev/null +++ b/intl/icu/source/i18n/currfmt.h @@ -0,0 +1,94 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +********************************************************************** +* Copyright (c) 2004-2014, International Business Machines +* Corporation and others. All Rights Reserved. +********************************************************************** +* Author: Alan Liu +* Created: April 20, 2004 +* Since: ICU 3.0 +********************************************************************** +*/ +#ifndef CURRENCYFORMAT_H +#define CURRENCYFORMAT_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING + +#include "unicode/measfmt.h" + +U_NAMESPACE_BEGIN + +class NumberFormat; + +/** + * Temporary internal concrete subclass of MeasureFormat implementing + * parsing and formatting of currency amount objects. This class is + * likely to be redesigned and rewritten in the near future. + * + * <p>This class currently delegates to DecimalFormat for parsing and + * formatting. + * + * @see MeasureFormat + * @author Alan Liu + * @internal + */ +class CurrencyFormat : public MeasureFormat { + + public: + + /** + * Construct a CurrencyFormat for the given locale. + */ + CurrencyFormat(const Locale& locale, UErrorCode& ec); + + /** + * Copy constructor. + */ + CurrencyFormat(const CurrencyFormat& other); + + /** + * Destructor. + */ + virtual ~CurrencyFormat(); + + /** + * Override Format API. + */ + virtual CurrencyFormat* clone() const; + + + using MeasureFormat::format; + + /** + * Override Format API. + */ + virtual UnicodeString& format(const Formattable& obj, + UnicodeString& appendTo, + FieldPosition& pos, + UErrorCode& ec) const; + + /** + * Override Format API. + */ + virtual void parseObject(const UnicodeString& source, + Formattable& result, + ParsePosition& pos) const; + + /** + * Override Format API. + */ + virtual UClassID getDynamicClassID() const; + + /** + * Returns the class ID for this class. + */ + static UClassID U_EXPORT2 getStaticClassID(); +}; + +U_NAMESPACE_END + +#endif // #if !UCONFIG_NO_FORMATTING +#endif // #ifndef CURRENCYFORMAT_H |