Go to the documentation of this file.
33 #if !UCONFIG_NO_COLLATION
42 class RuleBasedCollator;
43 class CollationKeyByteSink;
163 UBool isBogus(
void)
const;
174 const uint8_t* getByteArray(int32_t& count)
const;
176 #ifdef U_USE_COLLATION_KEY_DEPRECATES
184 uint8_t* toByteArray(int32_t& count)
const;
187 #ifndef U_HIDE_DEPRECATED_API
232 int32_t hashCode(
void)
const;
244 static UClassID U_EXPORT2 getStaticClassID();
252 uint8_t *reallocate(int32_t newCapacity, int32_t length);
256 void setLength(int32_t newLength);
258 uint8_t *getBytes() {
259 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
261 const uint8_t *getBytes()
const {
262 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
264 int32_t getCapacity()
const {
265 return (fFlagAndLength >= 0) ? (int32_t)
sizeof(fUnion) : fUnion.fFields.fCapacity;
267 int32_t getLength()
const {
return fFlagAndLength & 0x7fffffff; }
284 friend class CollationKeyByteSink;
297 int32_t fFlagAndLength;
302 mutable int32_t fHashCode;
307 union StackBufferOrFields {
309 uint8_t fStackBuffer[32];
320 return !(*
this == other);
324 CollationKey::isBogus()
const
326 return fHashCode == 2;
329 inline const uint8_t*
330 CollationKey::getByteArray(int32_t &count)
const
C++ API: Collation Service.
Collation keys are generated by the Collator class.
Basic definitions for ICU, for both C and C++ APIs.
int8_t UBool
The ICU boolean type.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
The RuleBasedCollator class provides the implementation of Collator, using data-driven tables.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_BEGIN
EComparisonResult
LESS is returned if source string is compared to be less than target string in the compare() method.