+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
********************************************************************
* COPYRIGHT:
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
/**
* \file
* \brief C++ API: Unicode Normalization
#include "unicode/unorm.h"
#include "unicode/uobject.h"
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
/**
* Old Unicode normalization API.
* @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
* @deprecated ICU 56 Use Normalizer2 instead.
*/
Normalizer(const CharacterIterator& iter, UNormalizationMode mode);
+#endif /* U_HIDE_DEPRECATED_API */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Copy constructor.
* @param copy The object to be copied.
* @deprecated ICU 56 Use Normalizer2 instead.
*/
Normalizer(const Normalizer& copy);
-#endif /* U_HIDE_DEPRECATED_API */
/**
* Destructor
* @deprecated ICU 56 Use Normalizer2 instead.
*/
virtual ~Normalizer();
-
+#endif // U_FORCE_HIDE_DEPRECATED_API
//-------------------------------------------------------------------------
// Static utility methods
* @return a pointer to a new Normalizer
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- Normalizer* clone(void) const;
+ Normalizer* clone() const;
/**
* Generates a hash code for this iterator.
* @param status a UErrorCode
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- void setText(const UChar* newText,
+ void setText(ConstChar16Ptr newText,
int32_t length,
UErrorCode &status);
/**
static UClassID U_EXPORT2 getStaticClassID();
#endif /* U_HIDE_DEPRECATED_API */
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
* @return a UClassID for the actual class.
* @deprecated ICU 56 Use Normalizer2 instead.
*/
virtual UClassID getDynamicClassID() const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
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
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 */
#endif // NORMLZR_H
+
+#endif /* U_SHOW_CPLUSPLUS_API */