65 #if !UCONFIG_NO_COLLATION
74 struct CollationCacheEntry;
76 struct CollationSettings;
77 struct CollationTailoring;
85 class CollationElementIterator;
87 class SortKeyByteSink;
164 #ifndef U_HIDE_INTERNAL_API
257 using Collator::compare;
310 const UChar* target, int32_t targetLength,
379 int32_t sourceLength,
416 #ifndef U_HIDE_DEPRECATED_API
433 int32_t getMaxExpansion(int32_t order)
const;
459 static UClassID U_EXPORT2 getStaticClassID(
void);
461 #ifndef U_HIDE_DEPRECATED_API
472 uint8_t *cloneRuleData(int32_t &length,
UErrorCode &status)
const;
485 int32_t cloneBinary(uint8_t *buffer, int32_t capacity,
UErrorCode &status)
const;
629 int32_t resultLength)
const;
648 uint8_t *result, int32_t resultLength)
const;
664 int32_t destCapacity,
679 int32_t reorderCodesLength,
687 const char *left, int32_t leftLength,
688 const char *right, int32_t rightLength,
725 uint8_t *dest, int32_t count,
UErrorCode &errorCode)
const;
734 #ifndef U_HIDE_INTERNAL_API
755 void internalGetContractionsAndExpansions(
770 void internalBuildTailoring(
791 #endif // U_HIDE_INTERNAL_API
819 void adoptTailoring(CollationTailoring *t,
UErrorCode &errorCode);
823 const UChar *right, int32_t rightLength,
826 const uint8_t *right, int32_t rightLength,
829 void writeSortKey(
const UChar *s, int32_t length,
830 SortKeyByteSink &sink,
UErrorCode &errorCode)
const;
832 void writeIdenticalLevel(
const UChar *s,
const UChar *limit,
833 SortKeyByteSink &sink,
UErrorCode &errorCode)
const;
835 const CollationSettings &getDefaultSettings()
const;
837 void setAttributeDefault(int32_t attribute) {
838 explicitlySetAttributes &= ~((uint32_t)1 << attribute);
840 void setAttributeExplicitly(int32_t attribute) {
841 explicitlySetAttributes |= (uint32_t)1 << attribute;
843 UBool attributeHasBeenSetExplicitly(int32_t attribute)
const {
845 return (
UBool)((explicitlySetAttributes & ((uint32_t)1 << attribute)) != 0);
857 static void computeMaxExpansions(
const CollationTailoring *t,
UErrorCode &errorCode);
860 void setFastLatinOptions(CollationSettings &ownedSettings)
const;
862 const CollationData *data;
863 const CollationSettings *settings;
864 const CollationTailoring *tailoring;
865 const CollationCacheEntry *cacheEntry;
867 uint32_t explicitlySetAttributes;
869 UBool actualLocaleIsSameAsValid;
874 #endif // !UCONFIG_NO_COLLATION