OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * Copyright (C) 2007-2013, International Business Machines Corporation and | 3 * Copyright (C) 2007-2014, International Business Machines Corporation and |
4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
5 ******************************************************************************* | 5 ******************************************************************************* |
6 * | 6 * |
7 | 7 |
8 * File PLURFMT.H | 8 * File PLURFMT.H |
9 ******************************************************************************** | 9 ******************************************************************************** |
10 */ | 10 */ |
11 | 11 |
12 #ifndef PLURFMT | 12 #ifndef PLURFMT |
13 #define PLURFMT | 13 #define PLURFMT |
14 | 14 |
15 #include "unicode/utypes.h" | 15 #include "unicode/utypes.h" |
16 | 16 |
17 /** | 17 /** |
18 * \file | 18 * \file |
19 * \brief C++ API: PluralFormat object | 19 * \brief C++ API: PluralFormat object |
20 */ | 20 */ |
21 | 21 |
22 #if !UCONFIG_NO_FORMATTING | 22 #if !UCONFIG_NO_FORMATTING |
23 | 23 |
24 #include "unicode/messagepattern.h" | 24 #include "unicode/messagepattern.h" |
25 #include "unicode/numfmt.h" | 25 #include "unicode/numfmt.h" |
26 #include "unicode/plurrule.h" | 26 #include "unicode/plurrule.h" |
27 | 27 |
28 U_NAMESPACE_BEGIN | 28 U_NAMESPACE_BEGIN |
29 | 29 |
30 class Hashtable; | 30 class Hashtable; |
| 31 class NFRule; |
31 | 32 |
32 /** | 33 /** |
33 * <p> | 34 * <p> |
34 * <code>PluralFormat</code> supports the creation of internationalized | 35 * <code>PluralFormat</code> supports the creation of internationalized |
35 * messages with plural inflection. It is based on <i>plural | 36 * messages with plural inflection. It is based on <i>plural |
36 * selection</i>, i.e. the caller specifies messages for each | 37 * selection</i>, i.e. the caller specifies messages for each |
37 * plural case that can appear in the user's language and the | 38 * plural case that can appear in the user's language and the |
38 * <code>PluralFormat</code> selects the appropriate message based on | 39 * <code>PluralFormat</code> selects the appropriate message based on |
39 * the number. | 40 * the number. |
40 * </p> | 41 * </p> |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 * @param context worker object for the selector. | 593 * @param context worker object for the selector. |
593 * @param number a number to be matched to one of the PluralFormat argument'
s explicit values, | 594 * @param number a number to be matched to one of the PluralFormat argument'
s explicit values, |
594 * or mapped via the PluralSelector. | 595 * or mapped via the PluralSelector. |
595 * @param ec ICU error code. | 596 * @param ec ICU error code. |
596 * @return the sub-message start part index. | 597 * @return the sub-message start part index. |
597 */ | 598 */ |
598 static int32_t findSubMessage( | 599 static int32_t findSubMessage( |
599 const MessagePattern& pattern, int32_t partIndex, | 600 const MessagePattern& pattern, int32_t partIndex, |
600 const PluralSelector& selector, void *context, double number, UErrorCod
e& ec); /**< @internal */ | 601 const PluralSelector& selector, void *context, double number, UErrorCod
e& ec); /**< @internal */ |
601 | 602 |
| 603 void parseType(const UnicodeString& source, const NFRule *rbnfLenientScanner
, |
| 604 Formattable& result, FieldPosition& pos) const; |
| 605 |
602 friend class MessageFormat; | 606 friend class MessageFormat; |
| 607 friend class NFRule; |
603 }; | 608 }; |
604 | 609 |
605 U_NAMESPACE_END | 610 U_NAMESPACE_END |
606 | 611 |
607 #endif /* #if !UCONFIG_NO_FORMATTING */ | 612 #endif /* #if !UCONFIG_NO_FORMATTING */ |
608 | 613 |
609 #endif // _PLURFMT | 614 #endif // _PLURFMT |
610 //eof | 615 //eof |
OLD | NEW |