27 #if !UCONFIG_NO_FORMATTING
39 typedef struct UHashtable UHashtable;
44 class AppendableWrapper;
410 virtual void setLocale(
const Locale& theLocale);
472 return msgPattern.getApostropheMode();
501 virtual void adoptFormats(
Format** formatsToAdopt, int32_t count);
517 virtual void setFormats(
const Format** newFormats, int32_t cnt);
534 virtual void adoptFormat(int32_t formatNumber,
Format* formatToAdopt);
545 virtual void setFormat(int32_t formatNumber,
const Format& format);
615 virtual const Format** getFormats(int32_t& count)
const;
748 int32_t& count)
const;
815 UBool usesNamedArguments()
const;
828 int32_t getArgTypeCount()
const;
866 static UBool equalFormats(
const void* left,
const void* right);
873 int32_t formatAliasesCapacity;
883 class U_I18N_API PluralSelectorProvider :
public PluralFormat::PluralSelector {
885 PluralSelectorProvider(
const Locale* loc);
886 virtual ~PluralSelectorProvider();
889 void reset(
const Locale* loc);
904 int32_t argTypeCount;
905 int32_t argTypeCapacity;
912 UBool hasArgTypeConflicts;
927 UHashtable* cachedFormatters;
928 UHashtable* customFormatArgStarts;
930 PluralSelectorProvider pluralProvider;
946 const UChar *
const *list);
977 void format(int32_t msgStart,
982 AppendableWrapper& appendTo,
988 void setArgStartFormat(int32_t argStart,
Format* formatter,
UErrorCode& status);
990 void setCustomArgStartFormat(int32_t argStart,
Format* formatter,
UErrorCode& status);
992 int32_t nextTopLevelArgStart(int32_t partIndex)
const;
994 UBool argNameMatches(int32_t partIndex,
const UnicodeString& argName, int32_t argNumber);
996 void cacheExplicitFormats(
UErrorCode& status);
1014 FieldPosition* updateMetaData(AppendableWrapper& dest, int32_t prevLength,
1017 Format* getCachedFormatter(int32_t argumentNumber)
const;
1019 UnicodeString getLiteralStringUntilNextArgument(int32_t from)
const;
1023 void formatComplexSubMessage(int32_t msgStart,
1024 double pluralNumber,
1028 AppendableWrapper& appendTo,
1045 listCount = argTypeCount;
1052 void resetPattern();
1062 virtual Format* clone()
const;
1070 virtual UClassID getDynamicClassID()
const;
1073 friend class MessageFormatAdapter;
C++ API: PluralFormat object.
C++ API: PluralRules object.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Parses and represents ICU MessageFormat patterns.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
C API: Parse Error Information.
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Base class for 'pure' C++ implementations of uenum api.
Defines rules for mapping non-negative numeric values onto a small set of keywords.
C++ API: Locale ID object.
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
C++ API: MessagePattern class: Parses and represents ICU MessageFormat patterns.
A Locale object represents a specific geographical, political, or cultural region.
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
UMessagePatternApostropheMode
Mode for when an apostrophe starts quoted literal text for MessageFormat output.
int8_t UBool
The ICU boolean type.