X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..729e4ab9bc6618bc3d8a898e575df7f4019e29ca:/icuSources/i18n/unicode/plurrule.h diff --git a/icuSources/i18n/unicode/plurrule.h b/icuSources/i18n/unicode/plurrule.h index 7c3fedbf..7c05fecc 100644 --- a/icuSources/i18n/unicode/plurrule.h +++ b/icuSources/i18n/unicode/plurrule.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2008, International Business Machines Corporation and +* Copyright (C) 2008-2010, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* * @@ -66,6 +66,7 @@ class RuleParser; *
** Syntax:
+ * \code * rules = rule (';' rule)* * rule = keyword ':' condition * keyword =*@@ -79,6 +80,7 @@ class RuleParser; * value = digit+ * digit = 0|1|2|3|4|5|6|7|8|9 * range = value'..'value + * \endcode *
* The difference between 'in' and 'within' is that 'in' only includes
@@ -98,6 +100,12 @@ class RuleParser;
* }
* else if ( ... )
*
+ * Note:
+ *
+ * ICU defines plural rules for many locales based on CLDR Language Plural Rules. + * For these predefined rules, see CLDR page at + * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + *
*/ class U_I18N_API PluralRules : public UObject { public: @@ -107,31 +115,31 @@ public: * @param status Output param set to success/failure code on exit, which * must not indicate a failure before the function call. * - * @draft ICU 4.0 + * @stable ICU 4.0 */ PluralRules(UErrorCode& status); /** * Copy constructor. - * @draft ICU 4.0 + * @stable ICU 4.0 */ PluralRules(const PluralRules& other); /** * Destructor. - * @draft ICU 4.0 + * @stable ICU 4.0 */ virtual ~PluralRules(); /** * Clone - * @draft ICU 4.0 + * @stable ICU 4.0 */ PluralRules* clone() const; /** * Assignment operator. - * @draft ICU 4.0 + * @stable ICU 4.0 */ PluralRules& operator=(const PluralRules&); @@ -143,7 +151,7 @@ public: * @param status Output param set to success/failure code on exit, which * must not indicate a failure before the function call. * @return new PluralRules pointer. NULL if there is an error. - * @draft ICU 4.0 + * @stable ICU 4.0 */ static PluralRules* U_EXPORT2 createRules(const UnicodeString& description, UErrorCode& status); @@ -154,7 +162,7 @@ public: * @param status Output param set to success/failure code on exit, which * must not indicate a failure before the function call. * @return new PluralRules pointer. NULL if there is an error. - * @draft ICU 4.0 + * @stable ICU 4.0 */ static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status); @@ -171,7 +179,7 @@ public: * the rules for the closest parent in the locale hierarchy * that has one will be returned. The final fallback always * returns the default 'other' rules. - * @draft ICU 4.0 + * @stable ICU 4.0 */ static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status); @@ -182,7 +190,7 @@ public: * * @param number The number for which the rule has to be determined. * @return The keyword of the selected rule. - * @draft ICU 4.0 + * @stable ICU 4.0 */ UnicodeString select(int32_t number) const; @@ -193,7 +201,7 @@ public: * * @param number The number for which the rule has to be determined. * @return The keyword of the selected rule. - * @draft ICU 4.0 + * @stable ICU 4.0 */ UnicodeString select(double number) const; @@ -205,7 +213,7 @@ public: * must not indicate a failure before the function call. * @return StringEnumeration with the keywords. * The caller must delete the object. - * @draft ICU 4.0 + * @stable ICU 4.0 */ StringEnumeration* getKeywords(UErrorCode& status) const; @@ -216,7 +224,7 @@ public: * @param keyword the input keyword. * @return TRUE if the input keyword is defined. * Otherwise, return FALSE. - * @draft ICU 4.0 + * @stable ICU 4.0 */ UBool isKeyword(const UnicodeString& keyword) const; @@ -226,7 +234,7 @@ public: * * @return keyword for default plural form. * @internal 4.0 - * @draft ICU 4.0 + * @stable ICU 4.0 */ UnicodeString getKeywordOther() const; @@ -236,7 +244,7 @@ public: * @param other The other PluralRules object to be compared with. * @return True if the given PluralRules is the same as this * PluralRules; false otherwise. - * @draft ICU 4.0 + * @stable ICU 4.0 */ virtual UBool operator==(const PluralRules& other) const; @@ -246,7 +254,7 @@ public: * @param other The PluralRules object to be compared with. * @return True if the given PluralRules is not the same as this * PluralRules; false otherwise. - * @draft ICU 4.0 + * @stable ICU 4.0 */ UBool operator!=(const PluralRules& other) const {return !operator==(other);} @@ -254,7 +262,7 @@ public: /** * ICU "poor man's RTTI", returns a UClassID for this class. * - * @draft ICU 4.0 + * @stable ICU 4.0 * */ static UClassID U_EXPORT2 getStaticClassID(void); @@ -262,7 +270,7 @@ public: /** * ICU "poor man's RTTI", returns a UClassID for the actual class. * - * @draft ICU 4.0 + * @stable ICU 4.0 */ virtual UClassID getDynamicClassID() const;