57 #if U_SHOW_CPLUSPLUS_API 59 #if !UCONFIG_NO_COLLATION 72 class StringEnumeration;
74 #if !UCONFIG_NO_SERVICE 78 class CollatorFactory;
270 virtual Collator* clone()
const = 0;
372 int32_t length)
const;
426 const char16_t* target, int32_t targetLength)
445 virtual UCollationResult compare(
const char16_t* source, int32_t sourceLength,
446 const char16_t* target, int32_t targetLength,
522 virtual CollationKey& getCollationKey(
const char16_t*source,
523 int32_t sourceLength,
530 virtual int32_t hashCode(
void)
const = 0;
628 virtual int32_t getReorderCodes(int32_t *dest,
629 int32_t destCapacity,
647 virtual void setReorderCodes(
const int32_t* reorderCodes,
648 int32_t reorderCodesLength,
671 static int32_t U_EXPORT2 getEquivalentReorderCodes(int32_t reorderCode,
673 int32_t destCapacity,
686 const Locale& displayLocale,
711 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
793 static Locale U_EXPORT2 getFunctionalEquivalent(
const char* keyword,
const Locale& locale,
796 #if !UCONFIG_NO_SERVICE 925 virtual uint32_t setVariableTop(
const char16_t *varTop, int32_t len,
UErrorCode &status) = 0;
955 virtual void setVariableTop(uint32_t varTop,
UErrorCode &status) = 0;
964 virtual uint32_t getVariableTop(
UErrorCode &status)
const = 0;
984 virtual Collator* safeClone()
const;
1004 int32_t resultLength)
const = 0;
1025 virtual int32_t getSortKey(
const char16_t*source, int32_t sourceLength,
1026 uint8_t*result, int32_t resultLength)
const = 0;
1065 static int32_t U_EXPORT2 getBound(
const uint8_t *source,
1066 int32_t sourceLength,
1068 uint32_t noOfLevels,
1070 int32_t resultLength,
1087 #ifndef U_HIDE_DEPRECATED_API 1118 virtual void setLocales(
const Locale& requestedLocale,
const Locale& validLocale,
const Locale& actualLocale);
1143 virtual int32_t internalGetShortDefinitionString(
const char *locale,
1153 const char *left, int32_t leftLength,
1154 const char *right, int32_t rightLength,
1162 internalNextSortKeyPart(
1164 uint8_t *dest, int32_t count,
UErrorCode &errorCode)
const;
1166 #ifndef U_HIDE_INTERNAL_API 1169 return reinterpret_cast<Collator *
>(uc);
1173 return reinterpret_cast<const Collator *
>(uc);
1177 return reinterpret_cast<UCollator *
>(
this);
1181 return reinterpret_cast<const UCollator *
>(
this);
1183 #endif // U_HIDE_INTERNAL_API 1191 friend class CFactory;
1192 friend class SimpleCFactory;
1193 friend class ICUCollatorFactory;
1194 friend class ICUCollatorService;
1199 #if !UCONFIG_NO_SERVICE 1232 virtual UBool visible(
void)
const;
1254 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.
const UCollator * toUCollator() const
UCollationResult
UCOL_LESS is returned if source string is compared to be less than target string in the ucol_strcoll(...
UNormalizationMode
Constants for normalization modes.
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.
static const Collator * fromUCollator(const UCollator *uc)
ECollationStrength
Base letter represents a primary difference.
UColReorderCode
Enum containing the codes for reordering segments of the collation table that are not script codes...
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...
UCollator * toUCollator()
C++ API: StringPiece: Read-only byte string wrapper class.
Secondary collation strength.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
C API: Unicode Normalization.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
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...
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
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.
static Collator * fromUCollator(UCollator *uc)
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.