]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/utrie2.h
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / common / utrie2.h
index 4e7ead05215326f98272ebbf056d257cc8bfa2cd..36ea9b4bb9423fc0e8de71c64a3975015f45f826 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2001-2010, International Business Machines
+*   Copyright (C) 2001-2014, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
@@ -18,6 +18,7 @@
 #define __UTRIE2_H__
 
 #include "unicode/utypes.h"
+#include "putilimp.h"
 #include "udataswp.h"
 
 U_CDECL_BEGIN
@@ -318,7 +319,7 @@ utrie2_isFrozen(const UTrie2 *trie);
  * @see utrie2_openFromSerialized()
  */
 U_CAPI int32_t U_EXPORT2
-utrie2_serialize(UTrie2 *trie,
+utrie2_serialize(const UTrie2 *trie,
                  void *data, int32_t capacity,
                  UErrorCode *pErrorCode);
 
@@ -618,8 +619,9 @@ U_CDECL_END
 
 /* C++ convenience wrappers ------------------------------------------------- */
 
-#ifdef XP_CPLUSPLUS
+#ifdef __cplusplus
 
+#include "unicode/utf.h"
 #include "mutex.h"
 
 U_NAMESPACE_BEGIN
@@ -657,19 +659,6 @@ public:
     const UChar *limit;
 };
 
-class UTrie2Singleton {
-public:
-    UTrie2Singleton(SimpleSingleton &s) : singleton(s) {}
-    void deleteInstance() {
-        utrie2_close((UTrie2 *)singleton.fInstance);
-        singleton.reset();
-    }
-    UTrie2 *getInstance(InstantiatorFn *instantiator, const void *context,
-                        UErrorCode &errorCode);
-private:
-    SimpleSingleton &singleton;
-};
-
 U_NAMESPACE_END
 
 #endif