54 #if !UCONFIG_NO_COLLATION
67 class StringEnumeration;
69 #if !UCONFIG_NO_SERVICE
73 class CollatorFactory;
277 virtual Collator* clone(
void)
const = 0;
325 #ifdef U_USE_COLLATION_OBSOLETE_2_6
363 virtual EComparisonResult compare(
const UnicodeString& source,
394 virtual EComparisonResult compare(
const UnicodeString& source,
396 int32_t length)
const;
449 virtual EComparisonResult compare(
const UChar* source, int32_t sourceLength,
450 const UChar* target, int32_t targetLength)
470 const UChar* target, int32_t targetLength,
541 int32_t sourceLength,
548 virtual int32_t hashCode(
void)
const = 0;
609 virtual ECollationStrength getStrength(
void)
const;
629 virtual void setStrength(ECollationStrength newStrength);
646 virtual int32_t getReorderCodes(int32_t *dest,
647 int32_t destCapacity,
664 virtual void setReorderCodes(
const int32_t* reorderCodes,
665 int32_t reorderCodesLength,
686 static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
688 int32_t destCapacity,
701 const Locale& displayLocale,
726 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
808 static Locale U_EXPORT2 getFunctionalEquivalent(
const char* keyword,
const Locale& locale,
811 #if !UCONFIG_NO_SERVICE
895 virtual uint32_t setVariableTop(
const UChar *varTop, int32_t len,
UErrorCode &status) = 0;
915 virtual void setVariableTop(uint32_t varTop,
UErrorCode &status) = 0;
923 virtual uint32_t getVariableTop(
UErrorCode &status)
const = 0;
943 virtual Collator* safeClone(
void)
const;
959 int32_t resultLength)
const = 0;
976 virtual int32_t getSortKey(
const UChar*source, int32_t sourceLength,
977 uint8_t*result, int32_t resultLength)
const = 0;
1016 static int32_t U_EXPORT2 getBound(
const uint8_t *source,
1017 int32_t sourceLength,
1019 uint32_t noOfLevels,
1021 int32_t resultLength,
1038 #ifndef U_HIDE_DEPRECATED_API
1071 virtual void setLocales(
const Locale& requestedLocale,
const Locale& validLocale,
const Locale& actualLocale);
1074 #if !UCONFIG_NO_SERVICE
1075 #ifndef U_HIDE_INTERNAL_API
1107 virtual int32_t internalGetShortDefinitionString(
const char *locale,
1118 friend class CFactory;
1119 friend class SimpleCFactory;
1120 friend class ICUCollatorFactory;
1121 friend class ICUCollatorService;
1136 #if !UCONFIG_NO_SERVICE
1169 virtual UBool visible(
void)
const;
1191 const Locale& displayLocale,
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
The Collator class performs locale-sensitive string comparison.
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the u_strcoll() m...
UNormalizationMode
Constants for normalization modes.
C++ API: Unicode Normalization.
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.
A factory, used with registerFactory, the creates multiple collators and provides display names for t...
C API for code unit iteration.
Base class for 'pure' C++ implementations of uenum api.
ECollationStrength
Base letter represents a primary difference.
UColAttribute
Attributes that collation service understands.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
C++ API: StringPiece: Read-only byte string wrapper class.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Secondary collation strength.
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.
Tertiary collation strength.
A mutable set of Unicode characters and multicharacter strings.
C API: Unicode Character Iteration.
C++ API: Common ICU base class UObject.
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration...
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
#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...
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
UColBoundMode
enum that is taken by ucol_getBound API See below for explanation do not change the values assigned t...
C++ API: Locale ID object.
struct UCollator UCollator
structure representing a collator object instance
Basic definitions for ICU, for both C and C++ APIs.
Identical collation strength.
Quaternary collation strength.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UColAttributeValue
Enum containing attribute values for controling collation behavior.
A string-like object that points to a sized piece of memory.
UObject is the common ICU "boilerplate" class.
Primary collation strength.
int8_t UBool
The ICU boolean type.
A Locale object represents a specific geographical, political, or cultural region.