1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /******************************************************************** 5 * Copyright (c) 1997-2011, International Business Machines Corporation and 6 * others. All Rights Reserved. 7 * Copyright (C) 2010 , Yahoo! Inc. 8 ******************************************************************** 12 * Modification History: 14 * Date Name Description 15 * 11/11/09 kirtig Finished first cut of implementation. 16 ********************************************************************/ 23 #if U_SHOW_CPLUSPLUS_API 33 #if !UCONFIG_NO_FORMATTING 351 SelectFormat() =
delete;
// default constructor not implemented. 361 static int32_t findSubMessage(
constMessagePattern& pattern, int32_t partIndex,
369 #endif/* #if !UCONFIG_NO_FORMATTING */ 371 #endif/* U_SHOW_CPLUSPLUS_API */ FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Base class for all formats.
U_I18N_API 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.
Parses and represents ICU MessageFormat patterns.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
virtual bool operator!=(const Format &other) const
Return true if another object is semantically unequal to this one.
SelectFormat(const SelectFormat &other)
copy constructor.
UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const override
Format an object to produce a string.
virtual SelectFormat * clone() const override
Clones this Format object polymorphically.
virtual void parseObject(const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const override
This method is not yet supported by SelectFormat.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
UnicodeString & toPattern(UnicodeString &appendTo)
Returns the pattern from applyPattern() or constructor.
virtual UClassID getDynamicClassID() const override
ICU "poor man's RTTI", returns a UClassID for the actual class.
UnicodeString & format(const UnicodeString &keyword, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const
Selects the phrase for the given keyword.
SelectFormat & operator=(const SelectFormat &other)
Assignment operator.
virtual bool operator==(const Format &other) const override
Return true if another object is semantically equal to this one.
virtual ~SelectFormat()
Destructor.
void applyPattern(const UnicodeString &pattern, UErrorCode &status)
Sets the pattern used by this select format.
SelectFormat(const UnicodeString &pattern, UErrorCode &status)
Creates a new SelectFormat for a given pattern string.
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.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
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.