19 #if U_SHOW_CPLUSPLUS_API
26 #if !UCONFIG_NO_FORMATTING
384 #ifndef U_HIDE_DEPRECATED_API
518 class PluralSelector :
public UMemory {
520 virtual ~PluralSelector();
532 class PluralSelectorAdapter :
public PluralSelector {
534 PluralSelectorAdapter() : pluralRules(nullptr) {
537 virtual ~PluralSelectorAdapter();
539 virtual UnicodeString select(
void *context,
double number,
UErrorCode& )
const override;
543 PluralRules* pluralRules;
547 MessagePattern msgPattern;
548 NumberFormat* numberFormat;
550 PluralSelectorAdapter pluralRulesWrapper;
552 PluralFormat() =
delete;
558 void copyObjects(
const PluralFormat& other);
560 UnicodeString&
format(
const Formattable& numberObject,
double number,
561 UnicodeString& appendTo,
576 static int32_t findSubMessage(
577 const MessagePattern& pattern, int32_t partIndex,
578 const PluralSelector& selector,
void *context,
double number,
UErrorCode& ec);
580 void parseType(
const UnicodeString& source,
const NFRule *rbnfLenientScanner,
581 Formattable& result, FieldPosition& pos)
const;
583 friend class MessageFormat;
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
A Locale object represents a specific geographical, political, or cultural region.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
Defines rules for mapping non-negative numeric values onto a small set of keywords.
UMemory is the common ICU base class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: MessagePattern class: Parses and represents ICU MessageFormat patterns.
C++ API: Compatibility APIs for number formatting.
C++ API: PluralRules object.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UPluralType
Type of plurals and PluralRules.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#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.