55 #if !UCONFIG_NO_COLLATION
68 class StringEnumeration;
70 #if !UCONFIG_NO_SERVICE
74 class CollatorFactory;
266 virtual Collator* clone(
void)
const = 0;
335 virtual EComparisonResult compare(
const UnicodeString& source,
366 virtual EComparisonResult compare(
const UnicodeString& source,
368 int32_t length)
const;
421 virtual EComparisonResult compare(
const UChar* source, int32_t sourceLength,
422 const UChar* target, int32_t targetLength)
442 const UChar* target, int32_t targetLength,
519 int32_t sourceLength,
526 virtual int32_t hashCode(
void)
const = 0;
587 virtual ECollationStrength getStrength(
void)
const;
607 virtual void setStrength(ECollationStrength newStrength);
624 virtual int32_t getReorderCodes(int32_t *dest,
625 int32_t destCapacity,
643 virtual void setReorderCodes(
const int32_t* reorderCodes,
644 int32_t reorderCodesLength,
667 static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
669 int32_t destCapacity,
682 const Locale& displayLocale,
707 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
789 static Locale U_EXPORT2 getFunctionalEquivalent(
const char* keyword,
const Locale& locale,
792 #if !UCONFIG_NO_SERVICE
921 virtual uint32_t setVariableTop(
const UChar *varTop, int32_t len,
UErrorCode &status) = 0;
951 virtual void setVariableTop(uint32_t varTop,
UErrorCode &status) = 0;
960 virtual uint32_t getVariableTop(
UErrorCode &status)
const = 0;
980 virtual Collator* safeClone(
void)
const;
1000 int32_t resultLength)
const = 0;
1021 virtual int32_t getSortKey(
const UChar*source, int32_t sourceLength,
1022 uint8_t*result, int32_t resultLength)
const = 0;
1061 static int32_t U_EXPORT2 getBound(
const uint8_t *source,
1062 int32_t sourceLength,
1064 uint32_t noOfLevels,
1066 int32_t resultLength,
1083 #ifndef U_HIDE_DEPRECATED_API
1114 virtual void setLocales(
const Locale& requestedLocale,
const Locale& validLocale,
const Locale& actualLocale);
1139 virtual int32_t internalGetShortDefinitionString(
const char *locale,
1149 const char *left, int32_t leftLength,
1150 const char *right, int32_t rightLength,
1158 internalNextSortKeyPart(
1160 uint8_t *dest, int32_t count,
UErrorCode &errorCode)
const;
1162 #ifndef U_HIDE_INTERNAL_API
1165 return reinterpret_cast<Collator *
>(uc);
1169 return reinterpret_cast<const Collator *
>(uc);
1173 return reinterpret_cast<UCollator *
>(
this);
1177 return reinterpret_cast<const UCollator *
>(
this);
1179 #endif // U_HIDE_INTERNAL_API
1187 friend class CFactory;
1188 friend class SimpleCFactory;
1189 friend class ICUCollatorFactory;
1190 friend class ICUCollatorService;
1195 #if !UCONFIG_NO_SERVICE
1228 virtual UBool visible(
void)
const;
1250 const Locale& displayLocale,