4#ifndef __NUMBERRANGEFORMATTER_H__
5#define __NUMBERRANGEFORMATTER_H__
9#if U_SHOW_CPLUSPLUS_API
11#if !UCONFIG_NO_FORMATTING
56class UnlocalizedNumberRangeFormatter;
57class LocalizedNumberRangeFormatter;
58class FormattedNumberRange;
63struct RangeMacroProps;
65class UFormattedNumberRangeData;
66class NumberRangeFormatterImpl;
67struct UFormattedNumberRangeImpl;
114template<
typename Derived>
352 fMacros.copyErrorTo(outErrorCode);
371extern template class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
372extern template class NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>;
384 :
public NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>,
public UMemory {
444 const NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>& other);
447 NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>&& src)
noexcept;
454 friend class NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>;
457 friend class NumberRangeFormatter;
460 friend class LocalizedNumberRangeFormatter;
472 :
public NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>,
public UMemory {
540#ifndef U_HIDE_INTERNAL_API
564 std::atomic<impl::NumberRangeFormatterImpl*> fAtomicFormatter = {};
566 const impl::NumberRangeFormatterImpl* getFormatter(
UErrorCode& stauts)
const;
643 template<
typename StringClass>
696 const impl::UFormattedNumberRangeData *fData;
708 : fData(nullptr), fErrorCode(errorCode) {}
712 const impl::UFormattedNumberRangeData* getData(
UErrorCode& status)
const;
715 friend class ::icu::PluralRules;
718 friend class LocalizedNumberRangeFormatter;
721 friend struct impl::UFormattedNumberRangeImpl;
725template<
typename StringClass>
732 return std::make_pair(str1, str2);
C++ API: Appendable class: Sink for Unicode code points and 16-bit code units (char16_ts).
A ByteSink can be filled with bytes.
Represents a span of a string containing a given field.
"Smart pointer" class, deletes objects via the standard C++ delete operator.
A Locale object represents a specific geographical, political, or cultural region.
Implementation of ByteSink that writes to a "string".
UMemory is the common ICU base class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: FieldPosition identifies the fields in a formatted output.
C++ API: FieldPosition Iterator.
UNumberRangeIdentityFallback identityFallback
UnlocalizedNumberFormatter formatter2
UnlocalizedNumberFormatter formatter1
bool copyErrorTo(UErrorCode &status) const
Check all members for errors.
UNumberRangeCollapse collapse
int8_t UBool
The ICU boolean type, a signed-byte integer.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
@ U_INVALID_STATE_ERROR
Requested operation can not be completed with ICU in its current state.
@ U_ZERO_ERROR
No error, no warning.
#define U_FAILURE(x)
Does the error code indicate a failure?
#define U_I18N_API_CLASS
Set to export library symbols from inside the i18n library, and to import them from outside,...
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.