| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2008-2013, International Business Machines Corporation and | 3 * Copyright (C) 2008-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 * | 6 * |
| 7 * | 7 * |
| 8 * File PLURRULE.H | 8 * File PLURRULE.H |
| 9 * | 9 * |
| 10 * Modification History:* | 10 * Modification History:* |
| 11 * Date Name Description | 11 * Date Name Description |
| 12 * | 12 * |
| 13 ******************************************************************************** | 13 ******************************************************************************** |
| (...skipping 22 matching lines...) Expand all Loading... |
| 36 #define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777) | 36 #define UPLRULES_NO_UNIQUE_VALUE ((double)-0.00123456777) |
| 37 | 37 |
| 38 U_NAMESPACE_BEGIN | 38 U_NAMESPACE_BEGIN |
| 39 | 39 |
| 40 class Hashtable; | 40 class Hashtable; |
| 41 class FixedDecimal; | 41 class FixedDecimal; |
| 42 class RuleChain; | 42 class RuleChain; |
| 43 class PluralRuleParser; | 43 class PluralRuleParser; |
| 44 class PluralKeywordEnumeration; | 44 class PluralKeywordEnumeration; |
| 45 class AndConstraint; | 45 class AndConstraint; |
| 46 class SharedPluralRules; |
| 46 | 47 |
| 47 /** | 48 /** |
| 48 * Defines rules for mapping non-negative numeric values onto a small set of | 49 * Defines rules for mapping non-negative numeric values onto a small set of |
| 49 * keywords. Rules are constructed from a text description, consisting | 50 * keywords. Rules are constructed from a text description, consisting |
| 50 * of a series of keywords and conditions. The {@link #select} method | 51 * of a series of keywords and conditions. The {@link #select} method |
| 51 * examines each condition in order and returns the keyword for the | 52 * examines each condition in order and returns the keyword for the |
| 52 * first condition that matches the number. If none match, | 53 * first condition that matches the number. If none match, |
| 53 * default rule(other) is returned. | 54 * default rule(other) is returned. |
| 54 * | 55 * |
| 55 * For more information, details, and tips for writing rules, see the | 56 * For more information, details, and tips for writing rules, see the |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 */ | 291 */ |
| 291 static StringEnumeration* U_EXPORT2 getAvailableLocales(UErrorCode &status); | 292 static StringEnumeration* U_EXPORT2 getAvailableLocales(UErrorCode &status); |
| 292 | 293 |
| 293 /** | 294 /** |
| 294 * Returns whether or not there are overrides. | 295 * Returns whether or not there are overrides. |
| 295 * @param locale the locale to check. | 296 * @param locale the locale to check. |
| 296 * @return | 297 * @return |
| 297 * @internal | 298 * @internal |
| 298 */ | 299 */ |
| 299 static UBool hasOverride(const Locale &locale); | 300 static UBool hasOverride(const Locale &locale); |
| 301 |
| 302 /** |
| 303 * For ICU use only. |
| 304 * creates a SharedPluralRules object |
| 305 * @internal |
| 306 */ |
| 307 static PluralRules* U_EXPORT2 internalForLocale(const Locale& locale, UPlura
lType type, UErrorCode& status); |
| 308 |
| 309 /** |
| 310 * For ICU use only. |
| 311 * Returns handle to the shared, cached PluralRules instance. |
| 312 * Caller must call removeRef() on returned value once it is done with |
| 313 * the shared instance. |
| 314 * @internal |
| 315 */ |
| 316 static const SharedPluralRules* U_EXPORT2 createSharedInstance( |
| 317 const Locale& locale, UPluralType type, UErrorCode& status); |
| 318 |
| 319 |
| 300 #endif /* U_HIDE_INTERNAL_API */ | 320 #endif /* U_HIDE_INTERNAL_API */ |
| 301 | 321 |
| 302 /** | 322 /** |
| 303 * Given a number, returns the keyword of the first rule that applies to | 323 * Given a number, returns the keyword of the first rule that applies to |
| 304 * the number. This function can be used with isKeyword* functions to | 324 * the number. This function can be used with isKeyword* functions to |
| 305 * determine the keyword for default plural rules. | 325 * determine the keyword for default plural rules. |
| 306 * | 326 * |
| 307 * @param number The number for which the rule has to be determined. | 327 * @param number The number for which the rule has to be determined. |
| 308 * @return The keyword of the selected rule. | 328 * @return The keyword of the selected rule. |
| 309 * @stable ICU 4.0 | 329 * @stable ICU 4.0 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 492 |
| 473 friend class PluralRuleParser; | 493 friend class PluralRuleParser; |
| 474 }; | 494 }; |
| 475 | 495 |
| 476 U_NAMESPACE_END | 496 U_NAMESPACE_END |
| 477 | 497 |
| 478 #endif /* #if !UCONFIG_NO_FORMATTING */ | 498 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| 479 | 499 |
| 480 #endif // _PLURRULE | 500 #endif // _PLURRULE |
| 481 //eof | 501 //eof |
| OLD | NEW |