OLD | NEW |
1 /* | 1 /* |
2 ****************************************************************************** | 2 ****************************************************************************** |
3 * Copyright (C) 1996-2014, International Business Machines | 3 * Copyright (C) 1996-2015, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ****************************************************************************** | 5 ****************************************************************************** |
6 */ | 6 */ |
7 | 7 |
8 /** | 8 /** |
9 * \file | 9 * \file |
10 * \brief C++ API: Collation Service. | 10 * \brief C++ API: Collation Service. |
11 */ | 11 */ |
12 | 12 |
13 /** | 13 /** |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 * @see Collator#getStrength | 600 * @see Collator#getStrength |
601 * @param newStrength the new comparison level. | 601 * @param newStrength the new comparison level. |
602 * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead | 602 * @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead |
603 */ | 603 */ |
604 virtual void setStrength(ECollationStrength newStrength); | 604 virtual void setStrength(ECollationStrength newStrength); |
605 | 605 |
606 /** | 606 /** |
607 * Retrieves the reordering codes for this collator. | 607 * Retrieves the reordering codes for this collator. |
608 * @param dest The array to fill with the script ordering. | 608 * @param dest The array to fill with the script ordering. |
609 * @param destCapacity The length of dest. If it is 0, then dest may be NULL
and the function | 609 * @param destCapacity The length of dest. If it is 0, then dest may be NULL
and the function |
610 * will only return the length of the result without writing any of the res
ult string (pre-flighting). | 610 * will only return the length of the result without writing any codes (pre
-flighting). |
611 * @param status A reference to an error code value, which must not indicate | 611 * @param status A reference to an error code value, which must not indicate |
612 * a failure before the function call. | 612 * a failure before the function call. |
613 * @return The length of the script ordering array. | 613 * @return The length of the script ordering array. |
614 * @see ucol_setReorderCodes | 614 * @see ucol_setReorderCodes |
615 * @see Collator#getEquivalentReorderCodes | 615 * @see Collator#getEquivalentReorderCodes |
616 * @see Collator#setReorderCodes | 616 * @see Collator#setReorderCodes |
617 * @see UScriptCode | 617 * @see UScriptCode |
618 * @see UColReorderCode | 618 * @see UColReorderCode |
619 * @stable ICU 4.8 | 619 * @stable ICU 4.8 |
620 */ | 620 */ |
621 virtual int32_t getReorderCodes(int32_t *dest, | 621 virtual int32_t getReorderCodes(int32_t *dest, |
622 int32_t destCapacity, | 622 int32_t destCapacity, |
623 UErrorCode& status) const; | 623 UErrorCode& status) const; |
624 | 624 |
625 /** | 625 /** |
626 * Sets the ordering of scripts for this collator. | 626 * Sets the ordering of scripts for this collator. |
627 * | 627 * |
628 * <p>The reordering codes are a combination of script codes and reorder cod
es. | 628 * <p>The reordering codes are a combination of script codes and reorder cod
es. |
629 * @param reorderCodes An array of script codes in the new order. This can b
e NULL if the | 629 * @param reorderCodes An array of script codes in the new order. This can b
e NULL if the |
630 * length is also set to 0. An empty array will clear any reordering codes o
n the collator. | 630 * length is also set to 0. An empty array will clear any reordering codes o
n the collator. |
631 * @param reorderCodesLength The length of reorderCodes. | 631 * @param reorderCodesLength The length of reorderCodes. |
632 * @param status error code | 632 * @param status error code |
| 633 * @see ucol_setReorderCodes |
633 * @see Collator#getReorderCodes | 634 * @see Collator#getReorderCodes |
634 * @see Collator#getEquivalentReorderCodes | 635 * @see Collator#getEquivalentReorderCodes |
635 * @see UScriptCode | 636 * @see UScriptCode |
636 * @see UColReorderCode | 637 * @see UColReorderCode |
637 * @stable ICU 4.8 | 638 * @stable ICU 4.8 |
638 */ | 639 */ |
639 virtual void setReorderCodes(const int32_t* reorderCodes, | 640 virtual void setReorderCodes(const int32_t* reorderCodes, |
640 int32_t reorderCodesLength, | 641 int32_t reorderCodesLength, |
641 UErrorCode& status) ; | 642 UErrorCode& status) ; |
642 | 643 |
643 /** | 644 /** |
644 * Retrieves the reorder codes that are grouped with the given reorder code.
Some reorder | 645 * Retrieves the reorder codes that are grouped with the given reorder code.
Some reorder |
645 * codes will be grouped and must reorder together. | 646 * codes will be grouped and must reorder together. |
| 647 * Beginning with ICU 55, scripts only reorder together if they are primary-
equal, |
| 648 * for example Hiragana and Katakana. |
| 649 * |
646 * @param reorderCode The reorder code to determine equivalence for. | 650 * @param reorderCode The reorder code to determine equivalence for. |
647 * @param dest The array to fill with the script equivalence reordering code
s. | 651 * @param dest The array to fill with the script equivalence reordering code
s. |
648 * @param destCapacity The length of dest. If it is 0, then dest may be NULL
and the | 652 * @param destCapacity The length of dest. If it is 0, then dest may be NULL
and the |
649 * function will only return the length of the result without writing any of
the result | 653 * function will only return the length of the result without writing any co
des (pre-flighting). |
650 * string (pre-flighting). | |
651 * @param status A reference to an error code value, which must not indicate
| 654 * @param status A reference to an error code value, which must not indicate
|
652 * a failure before the function call. | 655 * a failure before the function call. |
653 * @return The length of the of the reordering code equivalence array. | 656 * @return The length of the of the reordering code equivalence array. |
654 * @see ucol_setReorderCodes | 657 * @see ucol_setReorderCodes |
655 * @see Collator#getReorderCodes | 658 * @see Collator#getReorderCodes |
656 * @see Collator#setReorderCodes | 659 * @see Collator#setReorderCodes |
657 * @see UScriptCode | 660 * @see UScriptCode |
658 * @see UColReorderCode | 661 * @see UColReorderCode |
659 * @stable ICU 4.8 | 662 * @stable ICU 4.8 |
660 */ | 663 */ |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 * Universal attribute getter | 862 * Universal attribute getter |
860 * @param attr attribute type | 863 * @param attr attribute type |
861 * @param status to indicate whether the operation went on smoothly or | 864 * @param status to indicate whether the operation went on smoothly or |
862 * there were errors | 865 * there were errors |
863 * @return attribute value | 866 * @return attribute value |
864 * @stable ICU 2.2 | 867 * @stable ICU 2.2 |
865 */ | 868 */ |
866 virtual UColAttributeValue getAttribute(UColAttribute attr, | 869 virtual UColAttributeValue getAttribute(UColAttribute attr, |
867 UErrorCode &status) const = 0; | 870 UErrorCode &status) const = 0; |
868 | 871 |
869 /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft methods since
they are virtual */ | |
870 /** | 872 /** |
871 * Sets the variable top to the top of the specified reordering group. | 873 * Sets the variable top to the top of the specified reordering group. |
872 * The variable top determines the highest-sorting character | 874 * The variable top determines the highest-sorting character |
873 * which is affected by UCOL_ALTERNATE_HANDLING. | 875 * which is affected by UCOL_ALTERNATE_HANDLING. |
874 * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has
no effect. | 876 * If that attribute is set to UCOL_NON_IGNORABLE, then the variable top has
no effect. |
875 * | 877 * |
876 * The base class implementation sets U_UNSUPPORTED_ERROR. | 878 * The base class implementation sets U_UNSUPPORTED_ERROR. |
877 * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATIO
N, | 879 * @param group one of UCOL_REORDER_CODE_SPACE, UCOL_REORDER_CODE_PUNCTUATIO
N, |
878 * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; | 880 * UCOL_REORDER_CODE_SYMBOL, UCOL_REORDER_CODE_CURRENCY; |
879 * or UCOL_REORDER_CODE_DEFAULT to restore the default max vari
able group | 881 * or UCOL_REORDER_CODE_DEFAULT to restore the default max vari
able group |
880 * @param errorCode Standard ICU error code. Its input value must | 882 * @param errorCode Standard ICU error code. Its input value must |
881 * pass the U_SUCCESS() test, or else the function returns | 883 * pass the U_SUCCESS() test, or else the function returns |
882 * immediately. Check for U_FAILURE() on output or use with | 884 * immediately. Check for U_FAILURE() on output or use with |
883 * function chaining. (See User Guide for details.) | 885 * function chaining. (See User Guide for details.) |
884 * @return *this | 886 * @return *this |
885 * @see getMaxVariable | 887 * @see getMaxVariable |
886 * @draft ICU 53 | 888 * @stable ICU 53 |
887 */ | 889 */ |
888 virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCod
e); | 890 virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCod
e); |
889 | 891 |
890 /** | 892 /** |
891 * Returns the maximum reordering group whose characters are affected by UCO
L_ALTERNATE_HANDLING. | 893 * Returns the maximum reordering group whose characters are affected by UCO
L_ALTERNATE_HANDLING. |
892 * | 894 * |
893 * The base class implementation returns UCOL_REORDER_CODE_PUNCTUATION. | 895 * The base class implementation returns UCOL_REORDER_CODE_PUNCTUATION. |
894 * @return the maximum variable reordering group. | 896 * @return the maximum variable reordering group. |
895 * @see setMaxVariable | 897 * @see setMaxVariable |
896 * @draft ICU 53 | 898 * @stable ICU 53 |
897 */ | 899 */ |
898 virtual UColReorderCode getMaxVariable() const; | 900 virtual UColReorderCode getMaxVariable() const; |
899 | 901 |
900 /** | 902 /** |
901 * Sets the variable top to the primary weight of the specified string. | 903 * Sets the variable top to the primary weight of the specified string. |
902 * | 904 * |
903 * Beginning with ICU 53, the variable top is pinned to | 905 * Beginning with ICU 53, the variable top is pinned to |
904 * the top of one of the supported reordering groups, | 906 * the top of one of the supported reordering groups, |
905 * and it must not be beyond the last of those groups. | 907 * and it must not be beyond the last of those groups. |
906 * See setMaxVariable(). | 908 * See setMaxVariable(). |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 }; | 1260 }; |
1259 #endif /* UCONFIG_NO_SERVICE */ | 1261 #endif /* UCONFIG_NO_SERVICE */ |
1260 | 1262 |
1261 // Collator inline methods ----------------------------------------------- | 1263 // Collator inline methods ----------------------------------------------- |
1262 | 1264 |
1263 U_NAMESPACE_END | 1265 U_NAMESPACE_END |
1264 | 1266 |
1265 #endif /* #if !UCONFIG_NO_COLLATION */ | 1267 #endif /* #if !UCONFIG_NO_COLLATION */ |
1266 | 1268 |
1267 #endif | 1269 #endif |
OLD | NEW |