]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unicode/normlzr.h
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / common / unicode / normlzr.h
index 7be0a7d392f2a6994ffb5169ab52ddea4a524a63..eceb6e6b9d9933f9018d50caf794cb0526e32cbe 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
  ********************************************************************
  * COPYRIGHT:
@@ -24,6 +26,7 @@
 #include "unicode/unorm.h"
 #include "unicode/uobject.h"
 
+#if U_SHOW_CPLUSPLUS_API
 U_NAMESPACE_BEGIN
 /**
  * Old Unicode normalization API.
@@ -166,7 +169,7 @@ public:
    * @param mode  The normalization mode.
    * @deprecated ICU 56 Use Normalizer2 instead.
    */
-  Normalizer(const UChar* str, int32_t length, UNormalizationMode mode);
+  Normalizer(ConstChar16Ptr str, int32_t length, UNormalizationMode mode);
 
   /**
    * Creates a new <code>Normalizer</code> object for iterating over the
@@ -179,6 +182,7 @@ public:
    * @deprecated ICU 56 Use Normalizer2 instead.
    */
   Normalizer(const CharacterIterator& iter, UNormalizationMode mode);
+#endif  /* U_HIDE_DEPRECATED_API */
 
   /**
    * Copy constructor.
@@ -186,7 +190,6 @@ public:
    * @deprecated ICU 56 Use Normalizer2 instead.
    */
   Normalizer(const Normalizer& copy);
-#endif  /* U_HIDE_DEPRECATED_API */
 
   /**
    * Destructor
@@ -702,7 +705,7 @@ public:
    * @param status a UErrorCode
    * @deprecated ICU 56 Use Normalizer2 instead.
    */
-  void setText(const UChar* newText,
+  void setText(ConstChar16Ptr newText,
                     int32_t length,
             UErrorCode &status);
   /**
@@ -750,9 +753,7 @@ private:
 
   FilteredNormalizer2*fFilteredNorm2;  // owned if not NULL
   const Normalizer2  *fNorm2;  // not owned; may be equal to fFilteredNorm2
-#ifndef U_HIDE_DEPRECATED_API
-  UNormalizationMode  fUMode;
-#endif  /* U_HIDE_DEPRECATED_API */
+  UNormalizationMode  fUMode;  // deprecated
   int32_t             fOptions;
 
   // The input text and our position in it
@@ -796,13 +797,14 @@ Normalizer::compare(const UnicodeString &s1, const UnicodeString &s2,
                     uint32_t options,
                     UErrorCode &errorCode) {
   // all argument checking is done in unorm_compare
-  return unorm_compare(s1.getBuffer(), s1.length(),
-                       s2.getBuffer(), s2.length(),
+  return unorm_compare(toUCharPtr(s1.getBuffer()), s1.length(),
+                       toUCharPtr(s2.getBuffer()), s2.length(),
                        options,
                        &errorCode);
 }
 
 U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
 
 #endif /* #if !UCONFIG_NO_NORMALIZATION */