38#if !UCONFIG_NO_COLLATION
361 order &= RuleBasedCollator::PRIMARYORDERMASK;
362 return (order >> RuleBasedCollator::PRIMARYORDERSHIFT);
372 order = order & RuleBasedCollator::SECONDARYORDERMASK;
373 return (order >> RuleBasedCollator::SECONDARYORDERSHIFT);
383 return (order &= RuleBasedCollator::TERTIARYORDERMASK);
393 return (
primaryOrder(order) == RuleBasedCollator::PRIMIGNORABLE);
Abstract class that defines an API for iteration on text objects.
int32_t previous(UErrorCode &status)
Get the ordering priority of the previous collation element in the string.
virtual ~CollationElementIterator()
Destructor.
friend class RuleBasedCollator
CollationElementIterator(const UnicodeString &sourceText, const RuleBasedCollator *order, UErrorCode &status)
CollationElementIterator constructor.
int32_t next(UErrorCode &status)
Gets the ordering priority of the next character in the string.
virtual UClassID getDynamicClassID() const
ICU "poor man's RTTI", returns a UClassID for the actual class.
@ NULLORDER
NULLORDER indicates that an error has occured while processing.
int32_t getOffset(void) const
Gets the offset of the currently processed character in the source string.
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
void reset(void)
Resets the cursor to the beginning of the string.
void setOffset(int32_t newOffset, UErrorCode &status)
Sets the offset of the currently processed character in the source string.
UBool operator!=(const CollationElementIterator &other) const
Returns true if "other" is not the same as "this".
static UBool isIgnorable(int32_t order)
Checks if a comparison order is ignorable.
int32_t strengthOrder(int32_t order) const
Gets the comparison order in the desired strength.
CollationElementIterator(const CharacterIterator &sourceText, const RuleBasedCollator *order, UErrorCode &status)
CollationElementIterator constructor.
CollationElementIterator(const CollationElementIterator &other)
Copy constructor.
static int32_t tertiaryOrder(int32_t order)
Gets the tertiary order of a collation order.
static int32_t primaryOrder(int32_t order)
Gets the primary order of a collation order.
void setText(CharacterIterator &str, UErrorCode &status)
Sets the source string.
UBool operator==(const CollationElementIterator &other) const
Returns true if "other" is the same as "this".
int32_t getMaxExpansion(int32_t order) const
Return the maximum length of any expansion sequences that end with the specified comparison order.
static int32_t secondaryOrder(int32_t order)
Gets the secondary order of a collation order.
void setText(const UnicodeString &str, UErrorCode &status)
Sets the source string.
const CollationElementIterator & operator=(const CollationElementIterator &other)
Assignment operator.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
struct UCollationElements UCollationElements
File coleitr.h.
C++ API: RuleBasedCollator class provides the simple implementation of Collator.
C API: UCollationElements.
int32_t ucol_getMaxExpansion(const UCollationElements *elems, int32_t order)
Get the maximum length of any expansion sequences that end with the specified comparison order.
int8_t UBool
The ICU boolean type.
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.