view modules/javafx.web/src/main/native/Source/ThirdParty/icu/source/i18n/number_currencysymbols.h @ 11038:20a8447c71c6

8207159: Update ICU to version 62.1 Reviewed-by: mbilla, kcr, ghb
author arajkumar
date Fri, 24 Aug 2018 15:06:40 +0530
line wrap: on
line source
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use:

#include "unicode/utypes.h"


#include "numparse_types.h"
#include "charstr.h"
#include "number_decimfmtprops.h"

U_NAMESPACE_BEGIN namespace number {
namespace impl {

// Exported as U_I18N_API for tests
class U_I18N_API CurrencySymbols : public UMemory {
    CurrencySymbols() = default; // default constructor: leaves class in valid but undefined state

    /** Creates an instance in which all symbols are loaded from data. */
    CurrencySymbols(CurrencyUnit currency, const Locale& locale, UErrorCode& status);

    /** Creates an instance in which some symbols might be pre-populated. */
    CurrencySymbols(CurrencyUnit currency, const Locale& locale, const DecimalFormatSymbols& symbols,
                    UErrorCode& status);

    const char16_t* getIsoCode() const;

    UnicodeString getNarrowCurrencySymbol(UErrorCode& status) const;

    UnicodeString getCurrencySymbol(UErrorCode& status) const;

    UnicodeString getIntlCurrencySymbol(UErrorCode& status) const;

    UnicodeString getPluralName(StandardPlural::Form plural, UErrorCode& status) const;

    // Required fields:
    CurrencyUnit fCurrency;
    CharString fLocaleName;

    // Optional fields:
    UnicodeString fCurrencySymbol;
    UnicodeString fIntlCurrencySymbol;

    UnicodeString loadSymbol(UCurrNameStyle selector, UErrorCode& status) const;

 * Resolves the effective currency from the property bag.
resolveCurrency(const DecimalFormatProperties& properties, const Locale& locale, UErrorCode& status);

} // namespace impl
} // namespace numparse

#endif /* #if !UCONFIG_NO_FORMATTING */