#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
#if !UCONFIG_NO_COLLATION
#include "unicode/uobject.h"
#include "unicode/uiter.h"
#include "unicode/stringpiece.h"
-#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class StringEnumeration;
// Cannot use #ifndef U_HIDE_DEPRECATED_API for the following, it is
// used by virtual methods that cannot have that conditional.
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* LESS is returned if source string is compared to be less than target
* string in the compare() method.
EQUAL = UCOL_EQUAL, // 0
GREATER = UCOL_GREATER // 1
};
+#endif // U_FORCE_HIDE_DEPRECATED_API
// Collator public destructor -----------------------------------------
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual Collator* clone(void) const = 0;
+ virtual Collator* clone() const = 0;
/**
* Creates the Collator object for the current default locale.
*/
static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
* different strings. Returns information about whether a string is less
*/
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
const UnicodeString& target,
UErrorCode &status) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Does the same thing as compare but limits the comparison to a specified
* length
virtual EComparisonResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length) const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Does the same thing as compare but limits the comparison to a specified
int32_t length,
UErrorCode &status) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
* different string arrays. Returns information about whether a string array
virtual EComparisonResult compare(const char16_t* source, int32_t sourceLength,
const char16_t* target, int32_t targetLength)
const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* The comparison function compares the character data stored in two
*/
virtual int32_t hashCode(void) const = 0;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the locale of the Collator
*
* in ICU 3.0.
*/
virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const = 0;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Convenience method for comparing two strings based on the collation rules.
*/
UBool equals(const UnicodeString& source, const UnicodeString& target) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Determines the minimum strength that will be used in comparison or
* transformation.
* @deprecated ICU 2.6 Use setAttribute(UCOL_STRENGTH...) instead
*/
virtual void setStrength(ECollationStrength newStrength);
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Retrieves the reordering codes for this collator.
*/
virtual UColReorderCode getMaxVariable() const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Sets the variable top to the primary weight of the specified string.
*
* @deprecated ICU 53 Call setMaxVariable() instead.
*/
virtual void setVariableTop(uint32_t varTop, UErrorCode &status) = 0;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Gets the variable top value of a Collator.
*/
virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
+#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
* Same as clone().
* The base class implementation simply calls clone().
* @see clone()
* @deprecated ICU 50 no need to have two methods for cloning
*/
- virtual Collator* safeClone(void) const;
+ virtual Collator* safeClone() const;
+#endif // U_FORCE_HIDE_DEPRECATED_API
/**
* Get the sort key as an array of bytes from a UnicodeString.
// Collator inline methods -----------------------------------------------
U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
#endif /* #if !UCONFIG_NO_COLLATION */
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif