/*
*******************************************************************************
-* Copyright (C) 1997-2004, International Business Machines
+* Copyright (C) 1997-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* Date Name Description
#if !UCONFIG_NO_TRANSLITERATION
+#include "unicode/localpointer.h"
#include "unicode/urep.h"
#include "unicode/parseerr.h"
#include "unicode/uenum.h"
* @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,
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
* @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);
*
* @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);
/**
* @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);
/********************************************************************
/* deprecated API ----------------------------------------------------------- */
+#ifndef U_HIDE_DEPRECATED_API
+
/* see utrans.h documentation for why these functions are deprecated */
/**
char* buf,
int32_t bufCapacity);
+#endif /* U_HIDE_DEPRECATED_API */
+
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
#endif