31 #if !UCONFIG_NO_COLLATION
32 #ifndef U_HIDE_DEPRECATED_API
41 class RuleBasedCollator;
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;
228 int32_t hashCode(
void)
const;
240 static UClassID U_EXPORT2 getStaticClassID();
248 uint8_t *reallocate(int32_t newCapacity, int32_t length);
252 void setLength(int32_t newLength);
254 uint8_t *getBytes() {
255 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
257 const uint8_t *getBytes()
const {
258 return (fFlagAndLength >= 0) ? fUnion.fStackBuffer : fUnion.fFields.fBytes;
260 int32_t getCapacity()
const {
261 return (fFlagAndLength >= 0) ? (int32_t)
sizeof(fUnion) : fUnion.fFields.fCapacity;
263 int32_t getLength()
const {
return fFlagAndLength & 0x7fffffff; }
280 friend class CollationKeyByteSink;
293 int32_t fFlagAndLength;
298 mutable int32_t fHashCode;
303 union StackBufferOrFields {
305 uint8_t fStackBuffer[32];
316 return !(*
this == other);
320 CollationKey::isBogus()
const
322 return fHashCode == 2;
325 inline const uint8_t*
326 CollationKey::getByteArray(int32_t &count)
const
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the u_strcoll() m...
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
The RuleBasedCollator class provides the simple implementation of Collator, using data-driven tables...
C++ API: Collation Service.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
EComparisonResult
LESS is returned if source string is compared to be less than target string in the compare() method...
Collation keys are generated by the Collator class.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Basic definitions for ICU, for both C and C++ APIs.
UObject is the common ICU "boilerplate" class.
int8_t UBool
The ICU boolean type.