OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * Copyright (C) 1997-2011, International Business Machines | 3 * Copyright (C) 1997-2011,2014 International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ******************************************************************************* | 5 ******************************************************************************* |
6 * Date Name Description | 6 * Date Name Description |
7 * 06/21/00 aliu Creation. | 7 * 06/21/00 aliu Creation. |
8 ******************************************************************************* | 8 ******************************************************************************* |
9 */ | 9 */ |
10 | 10 |
11 #ifndef UTRANS_H | 11 #ifndef UTRANS_H |
12 #define UTRANS_H | 12 #define UTRANS_H |
13 | 13 |
14 #include "unicode/utypes.h" | 14 #include "unicode/utypes.h" |
15 | 15 |
16 #if !UCONFIG_NO_TRANSLITERATION | 16 #if !UCONFIG_NO_TRANSLITERATION |
17 | 17 |
18 #include "unicode/localpointer.h" | 18 #include "unicode/localpointer.h" |
19 #include "unicode/urep.h" | 19 #include "unicode/urep.h" |
20 #include "unicode/parseerr.h" | 20 #include "unicode/parseerr.h" |
21 #include "unicode/uenum.h" | 21 #include "unicode/uenum.h" |
| 22 #include "unicode/uset.h" |
22 | 23 |
23 /******************************************************************** | 24 /******************************************************************** |
24 * General Notes | 25 * General Notes |
25 ******************************************************************** | 26 ******************************************************************** |
26 */ | 27 */ |
27 /** | 28 /** |
28 * \file | 29 * \file |
29 * \brief C API: Transliterator | 30 * \brief C API: Transliterator |
30 * | 31 * |
31 * <h2> Transliteration </h2> | 32 * <h2> Transliteration </h2> |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 * @stable ICU 2.0 | 502 * @stable ICU 2.0 |
502 */ | 503 */ |
503 U_STABLE void U_EXPORT2 | 504 U_STABLE void U_EXPORT2 |
504 utrans_transIncrementalUChars(const UTransliterator* trans, | 505 utrans_transIncrementalUChars(const UTransliterator* trans, |
505 UChar* text, | 506 UChar* text, |
506 int32_t* textLength, | 507 int32_t* textLength, |
507 int32_t textCapacity, | 508 int32_t textCapacity, |
508 UTransPosition* pos, | 509 UTransPosition* pos, |
509 UErrorCode* status); | 510 UErrorCode* status); |
510 | 511 |
| 512 #ifndef U_HIDE_DRAFT_API |
| 513 /** |
| 514 * Create a rule string that can be passed to utrans_openU to recreate this |
| 515 * transliterator. |
| 516 * |
| 517 * @param trans The transliterator |
| 518 * @param escapeUnprintable if TRUE then convert unprintable characters to their |
| 519 * hex escape representations, \\uxxxx or \\Uxxxxxxxx. |
| 520 * Unprintable characters are those other than |
| 521 * U+000A, U+0020..U+007E. |
| 522 * @param result A pointer to a buffer to receive the rules. |
| 523 * @param resultLength The maximum size of result. |
| 524 * @param status A pointer to the UErrorCode. In case of error status, the |
| 525 * contents of result are undefined. |
| 526 * @return int32_t The length of the rule string (may be greater than resultLe
ngth, |
| 527 * in which case an error is returned). |
| 528 * @draft ICU 53 |
| 529 */ |
| 530 U_DRAFT int32_t U_EXPORT2 |
| 531 utrans_toRules( const UTransliterator* trans, |
| 532 UBool escapeUnprintable, |
| 533 UChar* result, int32_t resultLength, |
| 534 UErrorCode* status); |
| 535 |
| 536 /** |
| 537 * Returns the set of all characters that may be modified in the input text by |
| 538 * this UTransliterator, optionally ignoring the transliterator's current filter
. |
| 539 * @param trans The transliterator. |
| 540 * @param ignoreFilter If FALSE, the returned set incorporates the |
| 541 * UTransliterator's current filter; if the filter is changed, |
| 542 * the return value of this function will change. If TRUE, the |
| 543 * returned set ignores the effect of the UTransliterator's |
| 544 * current filter. |
| 545 * @param fillIn Pointer to a USet object to receive the modifiable character
s |
| 546 * set. Previous contents of fillIn are lost. <em>If fillIn is |
| 547 * NULL, then a new USet is created and returned. The caller |
| 548 * owns the result and must dispose of it by calling uset_close
.</em> |
| 549 * @param status A pointer to the UErrorCode. |
| 550 * @return USet* Either fillIn, or if fillIn is NULL, a pointer to a |
| 551 * newly-allocated USet that the user must close. In case of |
| 552 * error, NULL is returned. |
| 553 * @draft ICU 53 |
| 554 */ |
| 555 U_DRAFT USet* U_EXPORT2 |
| 556 utrans_getSourceSet(const UTransliterator* trans, |
| 557 UBool ignoreFilter, |
| 558 USet* fillIn, |
| 559 UErrorCode* status); |
| 560 #endif /* U_HIDE_DRAFT_API */ |
| 561 |
511 /* deprecated API ----------------------------------------------------------- */ | 562 /* deprecated API ----------------------------------------------------------- */ |
512 | 563 |
513 #ifndef U_HIDE_DEPRECATED_API | 564 #ifndef U_HIDE_DEPRECATED_API |
514 | 565 |
515 /* see utrans.h documentation for why these functions are deprecated */ | 566 /* see utrans.h documentation for why these functions are deprecated */ |
516 | 567 |
517 /** | 568 /** |
518 * Deprecated, use utrans_openU() instead. | 569 * Deprecated, use utrans_openU() instead. |
519 * Open a custom transliterator, given a custom rules string | 570 * Open a custom transliterator, given a custom rules string |
520 * OR | 571 * OR |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 U_DEPRECATED int32_t U_EXPORT2 | 649 U_DEPRECATED int32_t U_EXPORT2 |
599 utrans_getAvailableID(int32_t index, | 650 utrans_getAvailableID(int32_t index, |
600 char* buf, | 651 char* buf, |
601 int32_t bufCapacity); | 652 int32_t bufCapacity); |
602 | 653 |
603 #endif /* U_HIDE_DEPRECATED_API */ | 654 #endif /* U_HIDE_DEPRECATED_API */ |
604 | 655 |
605 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ | 656 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
606 | 657 |
607 #endif | 658 #endif |
OLD | NEW |