LocalizationInfo;
49 classRuleBasedCollator;
67 #ifndef U_HIDE_DEPRECATED_API 80URBNF_NUMBERING_SYSTEM = 3,
81 #ifndef U_HIDE_DEPRECATED_API 835 const Locale& locale = Locale::getDefault());
846 const Locale& locale = Locale::getDefault());
979 #if !UCONFIG_NO_COLLATION 1116 voidinitCapitalizationContextInfo(
const Locale& thelocale);
1119 voidinitDefaultRuleSet();
1123 friend classNFSubstitution;
1124 friend classNFRule;
1125 friend classNFRuleSet;
1126 friend classFractionalPartSubstitution;
1128 inlineNFRuleSet * getDefaultRuleSet()
const;
1132NFRule * initializeDefaultInfinityRule(
UErrorCode&status);
1133 constNFRule * getDefaultInfinityRule()
const;
1134NFRule * initializeDefaultNaNRule(
UErrorCode&status);
1135 constNFRule * getDefaultNaNRule()
const;
1142NFRuleSet **fRuleSets;
1144int32_t numRuleSets;
1145NFRuleSet *defaultRuleSet;
1149NFRule *defaultInfinityRule;
1150NFRule *defaultNaNRule;
1154LocalizationInfo* localizations;
1156 UBoolcapitalizationInfoSet;
1157 UBoolcapitalizationForUIListMenu;
1158 UBoolcapitalizationForStandAlone;
1164 #if !UCONFIG_NO_COLLATION 1167RuleBasedNumberFormat::isLenient()
const{
1174RuleBasedNumberFormat::getDefaultRuleSet()
const{
1175 returndefaultRuleSet;
The BreakIterator class implements methods for finding the location of boundaries in text.
This class represents the set of symbols needed by DecimalFormat to format numbers.
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Base class for all formats.
Formattable objects can be passed to the Format class or its subclasses for formatting.
A Locale object represents a specific geographical, political, or cultural region.
ERoundingMode
Rounding mode.
virtual void parse(const UnicodeString &text, Formattable &result, ParsePosition &parsePosition) const =0
Return a long if possible (e.g.
virtual UBool isLenient() const
Returns whether lenient parsing is enabled (it is off by default).
UnicodeString & format(const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
Formats an object to produce a string.
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
The RuleBasedCollator class provides the implementation of Collator, using data-driven tables.
The RuleBasedNumberFormat class formats numbers according to a set of rules.
virtual void setLenient(UBool enabled) override
Turns lenient parse mode on and off.
RuleBasedNumberFormat & operator=(const RuleBasedNumberFormat &rhs)
Assignment operator.
virtual UnicodeString & format(double number, UnicodeString &toAppendTo, FieldPosition &pos) const override
Formats the specified number using the default ruleset.
virtual UnicodeString getRuleSetName(int32_t index) const
Return the name of the index'th public ruleSet.
RuleBasedNumberFormat(const UnicodeString &rules, const UnicodeString &localizations, UParseError &perror, UErrorCode &status)
Creates a RuleBasedNumberFormat that behaves according to the description passed in.
virtual UnicodeString & format(int32_t number, UnicodeString &toAppendTo, FieldPosition &pos) const override
Formats the specified 32-bit number using the default ruleset.
virtual UnicodeString getRules() const
return the rules that were provided to the RuleBasedNumberFormat.
virtual int32_t getNumberOfRuleSetDisplayNameLocales() const
Return the number of locales for which we have localized rule set display names.
RuleBasedNumberFormat(const UnicodeString &rules, const Locale &locale, UParseError &perror, UErrorCode &status)
Creates a RuleBasedNumberFormat that behaves according to the rules passed in.
virtual int32_t getNumberOfRuleSetNames() const
Return the number of public rule set names.
virtual UnicodeString & format(int64_t number, UnicodeString &toAppendTo, FieldPosition &pos) const override
Formats the specified 64-bit number using the default ruleset.
virtual void setDecimalFormatSymbols(const DecimalFormatSymbols &symbols)
Sets the decimal format symbols, which is generally not changed by the programmer or user.
virtual void setContext(UDisplayContext value, UErrorCode &status) override
Set a particular UDisplayContext value in the formatter, such as UDISPCTX_CAPITALIZATION_FOR_STANDALO...
virtual UnicodeString & format(int64_t number, const UnicodeString &ruleSetName, UnicodeString &toAppendTo, FieldPosition &pos, UErrorCode &status) const
Formats the specified 64-bit number using the named ruleset.
virtual ~RuleBasedNumberFormat()
Release memory allocated for a RuleBasedNumberFormat when you are finished with it.
virtual void parse(const UnicodeString &text, Formattable &result, ParsePosition &parsePosition) const override
Parses the specified string, beginning at the specified position, according to this formatter's rules...
virtual ERoundingMode getRoundingMode() const override
Get the rounding mode.
virtual void setRoundingMode(ERoundingMode roundingMode) override
Set the rounding mode.
virtual void setDefaultRuleSet(const UnicodeString &ruleSetName, UErrorCode &status)
Override the default rule set to use.
virtual UClassID getDynamicClassID() const override
ICU "poor man's RTTI", returns a UClassID for the actual class.
virtual RuleBasedNumberFormat * clone() const override
Clone this object polymorphically.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
virtual UnicodeString & format(double number, const UnicodeString &ruleSetName, UnicodeString &toAppendTo, FieldPosition &pos, UErrorCode &status) const
Formats the specified number using the named ruleset.
RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale &locale, UErrorCode &status)
Creates a RuleBasedNumberFormat from a predefined ruleset.
virtual UnicodeString getRuleSetDisplayName(int32_t index, const Locale &locale=Locale::getDefault())
Return the rule set display names for the provided locale.
RuleBasedNumberFormat(const RuleBasedNumberFormat &rhs)
Copy constructor.
virtual UnicodeString getDefaultRuleSetName() const
Return the name of the current default rule set.
RuleBasedNumberFormat(const UnicodeString &rules, const UnicodeString &localizations, const Locale &locale, UParseError &perror, UErrorCode &status)
Creates a RuleBasedNumberFormat that behaves according to the description passed in.
virtual Locale getRuleSetDisplayNameLocale(int32_t index, UErrorCode &status) const
Return the index'th display name locale.
virtual UnicodeString & format(const number::impl::DecimalQuantity &number, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const override
Format a decimal number.
virtual UnicodeString & format(int32_t number, const UnicodeString &ruleSetName, UnicodeString &toAppendTo, FieldPosition &pos, UErrorCode &status) const
Formats the specified number using the named ruleset.
virtual bool operator==(const Format &other) const override
Return true if the given Format objects are semantically equal.
virtual UnicodeString getRuleSetDisplayName(const UnicodeString &ruleSetName, const Locale &locale=Locale::getDefault())
Return the rule set display name for the provided rule set and locale.
virtual void adoptDecimalFormatSymbols(DecimalFormatSymbols *symbolsToAdopt)
Sets the decimal format symbols, which is generally not changed by the programmer or user.
RuleBasedNumberFormat(const UnicodeString &rules, UParseError &perror, UErrorCode &status)
Creates a RuleBasedNumberFormat that behaves according to the description passed in.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Symbols for formatting numbers.
C++ API: Formattable is a thin wrapper for primitive types used for formatting and parsing.
C++ API: Locale ID object.
URBNFRuleSetTag
Tags for the predefined rulesets.
@ URBNF_COUNT
One more than the highest normal URBNFRuleSetTag value.
@ URBNF_DURATION
Requests predefined ruleset for formatting a value as a duration in hours, minutes,...
@ URBNF_ORDINAL
Requests predefined ruleset for the ordinal form of a number.
@ URBNF_SPELLOUT
Requests predefined ruleset for spelling out numeric values in words.
C++ API: Compatibility APIs for number formatting.
C++ API: String Enumeration.
A UParseError struct is used to returned detailed information about parsing errors.
UDisplayContext
Display context settings.
int8_t UBool
The ICU boolean type, a signed-byte integer.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
C API: Plural rules, select plural keywords for numeric values.
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