12e5b6d6dSopenharmony_ci// © 2018 and later: Unicode, Inc. and others.
22e5b6d6dSopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html
32e5b6d6dSopenharmony_ci
42e5b6d6dSopenharmony_ci#include "unicode/utypes.h"
52e5b6d6dSopenharmony_ci
62e5b6d6dSopenharmony_ci#if !UCONFIG_NO_FORMATTING
72e5b6d6dSopenharmony_ci#ifndef __SOURCE_NUMBER_CURRENCYSYMBOLS_H__
82e5b6d6dSopenharmony_ci#define __SOURCE_NUMBER_CURRENCYSYMBOLS_H__
92e5b6d6dSopenharmony_ci
102e5b6d6dSopenharmony_ci#include "numparse_types.h"
112e5b6d6dSopenharmony_ci#include "charstr.h"
122e5b6d6dSopenharmony_ci#include "number_decimfmtprops.h"
132e5b6d6dSopenharmony_ci
142e5b6d6dSopenharmony_ciU_NAMESPACE_BEGIN namespace number {
152e5b6d6dSopenharmony_cinamespace impl {
162e5b6d6dSopenharmony_ci
172e5b6d6dSopenharmony_ci
182e5b6d6dSopenharmony_ci// Exported as U_I18N_API for tests
192e5b6d6dSopenharmony_ciclass U_I18N_API CurrencySymbols : public UMemory {
202e5b6d6dSopenharmony_ci  public:
212e5b6d6dSopenharmony_ci    CurrencySymbols() = default; // default constructor: leaves class in valid but undefined state
222e5b6d6dSopenharmony_ci
232e5b6d6dSopenharmony_ci    /** Creates an instance in which all symbols are loaded from data. */
242e5b6d6dSopenharmony_ci    CurrencySymbols(CurrencyUnit currency, const Locale& locale, UErrorCode& status);
252e5b6d6dSopenharmony_ci
262e5b6d6dSopenharmony_ci    /** Creates an instance in which some symbols might be pre-populated. */
272e5b6d6dSopenharmony_ci    CurrencySymbols(CurrencyUnit currency, const Locale& locale, const DecimalFormatSymbols& symbols,
282e5b6d6dSopenharmony_ci                    UErrorCode& status);
292e5b6d6dSopenharmony_ci
302e5b6d6dSopenharmony_ci    const char16_t* getIsoCode() const;
312e5b6d6dSopenharmony_ci
322e5b6d6dSopenharmony_ci    UnicodeString getNarrowCurrencySymbol(UErrorCode& status) const;
332e5b6d6dSopenharmony_ci
342e5b6d6dSopenharmony_ci    UnicodeString getFormalCurrencySymbol(UErrorCode& status) const;
352e5b6d6dSopenharmony_ci
362e5b6d6dSopenharmony_ci    UnicodeString getVariantCurrencySymbol(UErrorCode& status) const;
372e5b6d6dSopenharmony_ci
382e5b6d6dSopenharmony_ci    UnicodeString getCurrencySymbol(UErrorCode& status) const;
392e5b6d6dSopenharmony_ci
402e5b6d6dSopenharmony_ci    UnicodeString getIntlCurrencySymbol(UErrorCode& status) const;
412e5b6d6dSopenharmony_ci
422e5b6d6dSopenharmony_ci    UnicodeString getPluralName(StandardPlural::Form plural, UErrorCode& status) const;
432e5b6d6dSopenharmony_ci
442e5b6d6dSopenharmony_ci    bool hasEmptyCurrencySymbol() const;
452e5b6d6dSopenharmony_ci
462e5b6d6dSopenharmony_ci  protected:
472e5b6d6dSopenharmony_ci    // Required fields:
482e5b6d6dSopenharmony_ci    CurrencyUnit fCurrency;
492e5b6d6dSopenharmony_ci    CharString fLocaleName;
502e5b6d6dSopenharmony_ci
512e5b6d6dSopenharmony_ci    // Optional fields:
522e5b6d6dSopenharmony_ci    UnicodeString fCurrencySymbol;
532e5b6d6dSopenharmony_ci    UnicodeString fIntlCurrencySymbol;
542e5b6d6dSopenharmony_ci
552e5b6d6dSopenharmony_ci    UnicodeString loadSymbol(UCurrNameStyle selector, UErrorCode& status) const;
562e5b6d6dSopenharmony_ci};
572e5b6d6dSopenharmony_ci
582e5b6d6dSopenharmony_ci
592e5b6d6dSopenharmony_ci/**
602e5b6d6dSopenharmony_ci * Resolves the effective currency from the property bag.
612e5b6d6dSopenharmony_ci */
622e5b6d6dSopenharmony_ciCurrencyUnit
632e5b6d6dSopenharmony_ciresolveCurrency(const DecimalFormatProperties& properties, const Locale& locale, UErrorCode& status);
642e5b6d6dSopenharmony_ci
652e5b6d6dSopenharmony_ci
662e5b6d6dSopenharmony_ci} // namespace impl
672e5b6d6dSopenharmony_ci} // namespace numparse
682e5b6d6dSopenharmony_ciU_NAMESPACE_END
692e5b6d6dSopenharmony_ci
702e5b6d6dSopenharmony_ci#endif //__SOURCE_NUMBER_CURRENCYSYMBOLS_H__
712e5b6d6dSopenharmony_ci#endif /* #if !UCONFIG_NO_FORMATTING */
72