AppendableWrapper;
347 #ifndef U_HIDE_OBSOLETE_API 501 returnmsgPattern.getApostropheMode();
758int32_t& count)
const;
828 #ifndef U_HIDE_INTERNAL_API 868 #ifndef U_HIDE_INTERNAL_API 887int32_t formatAliasesCapacity;
897 class U_I18N_APIPluralSelectorProvider :
publicPluralFormat::PluralSelector {
900 virtual~PluralSelectorProvider();
919int32_t argTypeCount;
920int32_t argTypeCapacity;
927 UBoolhasArgTypeConflicts;
945PluralSelectorProvider pluralProvider;
946PluralSelectorProvider ordinalProvider;
962 constchar16_t *
const*list);
993 void format(int32_t msgStart,
994 const void*plNumber,
998AppendableWrapper& appendTo,
1004 voidsetArgStartFormat(int32_t argStart,
Format* formatter,
UErrorCode& status);
1006 voidsetCustomArgStartFormat(int32_t argStart,
Format* formatter,
UErrorCode& status);
1008int32_t nextTopLevelArgStart(int32_t partIndex)
const;
1010 UBoolargNameMatches(int32_t partIndex,
const UnicodeString& argName, int32_t argNumber);
1012 voidcacheExplicitFormats(
UErrorCode& status);
1030 FieldPosition* updateMetaData(AppendableWrapper& dest, int32_t prevLength,
1038int32_t findOtherSubMessage(int32_t partIndex)
const;
1045int32_t findFirstPluralNumberArg(int32_t msgStart,
const UnicodeString&argName)
const;
1047 Format* getCachedFormatter(int32_t argumentNumber)
const;
1049 UnicodeStringgetLiteralStringUntilNextArgument(int32_t from)
const;
1053 voidformatComplexSubMessage(int32_t msgStart,
1054 const void*plNumber,
1058AppendableWrapper& appendTo,
1074listCount = argTypeCount;
1081 voidresetPattern();
1087 class U_I18N_APIDummyFormat :
publicFormat {
1089 virtual bool operator==(
constFormat&)
const override;
1090 virtualDummyFormat*
clone()
const override;
1091 virtualUnicodeString&
format(
constFormattable& obj,
1092UnicodeString& appendTo,
1094 virtualUnicodeString&
format(
constFormattable&,
1095UnicodeString& appendTo,
1098 virtualUnicodeString&
format(
constFormattable& obj,
1099UnicodeString& appendTo,
1100FieldPositionIterator* posIter,
1104ParsePosition&)
const override;
1107 friend classMessageFormatAdapter;
DateFormat is an abstract class for a family of classes that convert dates and times from their inter...
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Base class for all formats.
virtual void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const =0
Parse a string to produce an object.
virtual Format * clone() const =0
Clone this object polymorphically.
virtual bool operator==(const Format &other) const =0
Return true if the given Format objects are semantically equal.
UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
Formats an object to produce a string.
Formattable objects can be passed to the Format class or its subclasses for formatting.
Type
Selector for flavor of data type contained within a Formattable object.
A Locale object represents a specific geographical, political, or cultural region.
virtual void applyPattern(const UnicodeString &pattern, UMessagePatternApostropheMode aposMode, UParseError *parseError, UErrorCode &status)
Sets the UMessagePatternApostropheMode and the pattern used by this message format.
virtual UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const override
Formats the given array of arguments into a user-readable string.
UnicodeString & format(const UnicodeString *argumentNames, const Formattable *arguments, int32_t count, UnicodeString &appendTo, UErrorCode &status) const
Formats the given array of arguments into a user-defined argument name array.
virtual Format * getFormat(const UnicodeString &formatName, UErrorCode &status)
Gets subformat pointer for given format name.
static UnicodeString & format(const UnicodeString &pattern, const Formattable *arguments, int32_t count, UnicodeString &appendTo, UErrorCode &status)
Formats the given array of arguments into a user-readable string using the given pattern.
virtual Formattable * parse(const UnicodeString &source, ParsePosition &pos, int32_t &count) const
Parses the given string into an array of output arguments.
virtual void adoptFormat(const UnicodeString &formatName, Format *formatToAdopt, UErrorCode &status)
Sets one subformat for given format name.
MessageFormat(const UnicodeString &pattern, UErrorCode &status)
Constructs a new MessageFormat using the given pattern and the default locale.
MessageFormat(const UnicodeString &pattern, const Locale &newLocale, UParseError &parseError, UErrorCode &status)
Constructs a new MessageFormat using the given pattern and locale.
static UBool equalFormats(const void *left, const void *right)
Compares two Format objects.
virtual const Locale & getLocale() const
Gets the locale used for creating argument Format objects.
virtual void setFormats(const Format **newFormats, int32_t cnt)
Sets subformats.
static UnicodeString autoQuoteApostrophe(const UnicodeString &pattern, UErrorCode &status)
Convert an 'apostrophe-friendly' pattern into a standard pattern.
virtual void setFormat(int32_t formatNumber, const Format &format)
Sets one subformat.
UMessagePatternApostropheMode getApostropheMode() const
int32_t getArgTypeCount() const
This API is for ICU internal use only.
virtual StringEnumeration * getFormatNames(UErrorCode &status)
Gets format names.
virtual Formattable * parse(const UnicodeString &source, int32_t &count, UErrorCode &status) const
Parses the given string into an array of output arguments.
MessageFormat(const MessageFormat &)
Constructs a new MessageFormat from an existing one.
EFormatNumber
Enum type for kMaxFormat.
virtual void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &pos) const override
Parses the given string into an array of output arguments stored within a single Formattable of type ...
virtual void setLocale(const Locale &theLocale)
Sets the locale to be used for creating argument Format objects.
virtual UnicodeString & toPattern(UnicodeString &appendTo) const
Returns a pattern that can be used to recreate this object.
virtual MessageFormat * clone() const override
Clones this Format object polymorphically.
virtual ~MessageFormat()
Destructor.
UBool usesNamedArguments() const
Returns true if this MessageFormat uses named arguments, and false otherwise.
const MessageFormat & operator=(const MessageFormat &)
Assignment operator.
virtual const Format ** getFormats(int32_t &count) const
Gets an array of subformats of this object.
virtual void setFormat(const UnicodeString &formatName, const Format &format, UErrorCode &status)
Sets one subformat for given format name.
virtual bool operator==(const Format &other) const override
Returns true if the given Format objects are semantically equal.
UnicodeString & format(const Formattable *source, int32_t count, UnicodeString &appendTo, FieldPosition &ignore, UErrorCode &status) const
Formats the given array of arguments into a user-readable string.
virtual void adoptFormat(int32_t formatNumber, Format *formatToAdopt)
Sets one subformat.
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
MessageFormat(const UnicodeString &pattern, const Locale &newLocale, UErrorCode &status)
Constructs a new MessageFormat using the given pattern and locale.
static UClassID getStaticClassID()
Return the class ID for this class.
virtual void applyPattern(const UnicodeString &pattern, UParseError &parseError, UErrorCode &status)
Applies the given pattern string to this message format.
virtual void adoptFormats(Format **formatsToAdopt, int32_t count)
Sets subformats.
virtual void applyPattern(const UnicodeString &pattern, UErrorCode &status)
Applies the given pattern string to this message format.
Parses and represents ICU MessageFormat patterns.
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.
Base class for 'pure' C++ implementations of uenum api.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Base class for all formats.
C++ API: Locale ID object.
C++ API: MessagePattern class: Parses and represents ICU MessageFormat patterns.
UMessagePatternApostropheMode
Mode for when an apostrophe starts quoted literal text for MessageFormat output.
struct UHashtable UHashtable
C API: Parse Error Information.
C++ API: PluralFormat object.
C++ API: PluralRules object.
A UParseError struct is used to returned detailed information about parsing errors.
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
int8_t UBool
The ICU boolean type, a signed-byte integer.
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
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
Set to export library symbols from inside the i18n library, and to import them from outside.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4