X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..efa1e6592fb03ce23b15276b2b91d885a3ee7da5:/icuSources/i18n/unicode/utrans.h diff --git a/icuSources/i18n/unicode/utrans.h b/icuSources/i18n/unicode/utrans.h index dc0597ee..5c1b4136 100644 --- a/icuSources/i18n/unicode/utrans.h +++ b/icuSources/i18n/unicode/utrans.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 1997-2004, International Business Machines +* Copyright (C) 1997-2011, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * Date Name Description @@ -15,6 +15,7 @@ #if !UCONFIG_NO_TRANSLITERATION +#include "unicode/localpointer.h" #include "unicode/urep.h" #include "unicode/parseerr.h" #include "unicode/uenum.h" @@ -182,9 +183,9 @@ typedef struct UTransPosition { * @param pErrorCode a pointer to the UErrorCode * @return a transliterator pointer that may be passed to other * utrans_xxx() functions, or NULL if the open call fails. - * @draft ICU 2.8 + * @stable ICU 2.8 */ -U_DRAFT UTransliterator* U_EXPORT2 +U_STABLE UTransliterator* U_EXPORT2 utrans_openU(const UChar *id, int32_t idLength, UTransDirection dir, @@ -235,6 +236,25 @@ utrans_clone(const UTransliterator* trans, U_STABLE void U_EXPORT2 utrans_close(UTransliterator* trans); +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalUTransliteratorPointer + * "Smart pointer" class, closes a UTransliterator via utrans_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @stable ICU 4.4 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close); + +U_NAMESPACE_END + +#endif + /** * Return the programmatic identifier for this transliterator. * If this identifier is passed to utrans_openU(), it will open @@ -247,9 +267,9 @@ utrans_close(UTransliterator* trans); * @return the NUL-terminated ID string. This pointer remains * valid until utrans_close() is called on this transliterator. * - * @draft ICU 2.8 + * @stable ICU 2.8 */ -U_DRAFT const UChar * U_EXPORT2 +U_STABLE const UChar * U_EXPORT2 utrans_getUnicodeID(const UTransliterator *trans, int32_t *resultLength); @@ -278,9 +298,9 @@ utrans_register(UTransliterator* adoptedTrans, * * @param id an ID to unregister * @param idLength the length of id, or -1 if id is zero-terminated - * @draft ICU 2.8 + * @stable ICU 2.8 */ -U_DRAFT void U_EXPORT2 +U_STABLE void U_EXPORT2 utrans_unregisterID(const UChar* id, int32_t idLength); /** @@ -324,9 +344,9 @@ utrans_countAvailableIDs(void); * @return UEnumeration for the available transliterators. * Close with uenum_close(). * - * @draft ICU 2.8 + * @stable ICU 2.8 */ -U_DRAFT UEnumeration * U_EXPORT2 +U_STABLE UEnumeration * U_EXPORT2 utrans_openIDs(UErrorCode *pErrorCode); /******************************************************************** @@ -490,6 +510,8 @@ utrans_transIncrementalUChars(const UTransliterator* trans, /* deprecated API ----------------------------------------------------------- */ +#ifndef U_HIDE_DEPRECATED_API + /* see utrans.h documentation for why these functions are deprecated */ /** @@ -578,6 +600,8 @@ utrans_getAvailableID(int32_t index, char* buf, int32_t bufCapacity); +#endif /* U_HIDE_DEPRECATED_API */ + #endif /* #if !UCONFIG_NO_TRANSLITERATION */ #endif