Go to the documentation of this file.
38 #if !UCONFIG_NO_COLLATION
50 class CharacterIterator;
51 class CollationIterator;
52 class RuleBasedCollator;
129 NULLORDER = (int32_t)0xffffffff
198 static inline int32_t primaryOrder(int32_t order);
206 static inline int32_t secondaryOrder(int32_t order);
214 static inline int32_t tertiaryOrder(int32_t order);
225 int32_t getMaxExpansion(int32_t order)
const;
233 int32_t strengthOrder(int32_t order)
const;
257 static inline UBool isIgnorable(int32_t order);
264 int32_t getOffset(
void)
const;
273 void setOffset(int32_t newOffset,
UErrorCode& status);
287 static UClassID U_EXPORT2 getStaticClassID();
289 #ifndef U_HIDE_INTERNAL_API
306 #endif // U_HIDE_INTERNAL_API
310 friend class UCollationPCE;
355 inline int8_t normalizeDir()
const {
return dir_ == 1 ? 0 : dir_; }
357 static UHashtable *computeMaxExpansions(
const CollationData *data,
UErrorCode &errorCode);
359 static int32_t getMaxExpansion(
const UHashtable *maxExpansions, int32_t order);
363 CollationIterator *iter_;
364 const RuleBasedCollator *rbc_;
378 UnicodeString string_;
383 inline int32_t CollationElementIterator::primaryOrder(int32_t order)
385 return (order >> 16) & 0xffff;
388 inline int32_t CollationElementIterator::secondaryOrder(int32_t order)
390 return (order >> 8) & 0xff;
393 inline int32_t CollationElementIterator::tertiaryOrder(int32_t order)
398 inline UBool CollationElementIterator::isIgnorable(int32_t order)
400 return (order & 0xffff0000) == 0;
static CollationElementIterator * fromUCollationElements(UCollationElements *uc)
struct UCollationElements UCollationElements
The UCollationElements struct.
UCollationElements * toUCollationElements()
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.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
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.
Abstract class that defines an API for iteration on text objects.
static const CollationElementIterator * fromUCollationElements(const UCollationElements *uc)
C++ API: Common ICU base class UObject.
The CollationElementIterator class is used as an iterator to walk through each character of an inte...
#define U_NAMESPACE_BEGIN
const UCollationElements * toUCollationElements() const