31 #if !UCONFIG_NO_COLLATION
40 class RuleBasedCollator;
41 class CollationKeyByteSink;
161 UBool isBogus(
void)
const;
172 const uint8_t* getByteArray(int32_t& count)
const;
174 #ifdef U_USE_COLLATION_KEY_DEPRECATES
182 uint8_t* toByteArray(int32_t& count)
const;
185 #ifndef U_HIDE_DEPRECATED_API
230 int32_t hashCode(
void)
const;
242 static UClassID U_EXPORT2 getStaticClassID();
250 uint8_t *reallocate(int32_t newCapacity, int32_t length);
254 void setLength(int32_t newLength);
256 uint8_t *getBytes() {
257 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
259 const uint8_t *getBytes()
const {
260 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
262 int32_t getCapacity()
const {
263 return (fFlagAndLength >= 0) ? (int32_t)
sizeof(fUnion) : fUnion.fFields.fCapacity;
265 int32_t getLength()
const {
return fFlagAndLength & 0x7fffffff; }
282 friend class CollationKeyByteSink;
295 int32_t fFlagAndLength;
300 mutable int32_t fHashCode;
305 union StackBufferOrFields {
307 uint8_t fStackBuffer[32];
318 return !(*
this == other);
322 CollationKey::isBogus()
const
324 return fHashCode == 2;
327 inline const uint8_t*
328 CollationKey::getByteArray(int32_t &count)
const