19#if !UCONFIG_NO_COLLATION
26#ifndef U_HIDE_INTERNAL_API
31#define KEY_BUFFER_SIZE 64
37#define CELIST_BUFFER_SIZE 4
51#define STRING_LIST_BUFFER_SIZE 16
109 uint32_t
get(int32_t index)
const;
154#ifdef INSTRUMENT_CELIST
155 static int32_t _active;
156 static int32_t _histogram[10];
248#ifdef INSTRUMENT_STRING_LIST
249 static int32_t _lists;
250 static int32_t _strings;
251 static int32_t _histogram[101];
263#ifndef U_HIDE_INTERNAL_API
309 static void close(CollData *collData);
425 friend class CollDataCache;
426 friend class CollDataCacheEntry;
433 static char *getCollatorKey(
UCollator *collator,
char *buffer, int32_t bufferLength);
435 static CollDataCache *getCollDataCache();
438 StringToCEsMap *charsToCEList;
439 CEToStringsMap *ceToCharsStartingWith;
444 static CollDataCache *collDataCache;
449 uint32_t jamoLimits[4];
This object holds a list of CEs generated from a particular UnicodeString
static UClassID getStaticClassID()
UObject glue...
uint32_t & operator[](int32_t index) const
The index operator.
int32_t size() const
Return the number of CEs in the list.
virtual UClassID getDynamicClassID() const
UObject glue...
UBool matchesAt(int32_t offset, const CEList *other) const
Check if the CEs in another CEList match the suffix of this list starting at a give offset.
CEList(UCollator *coll, const UnicodeString &string, UErrorCode &status)
Construct a CEList object.
uint32_t get(int32_t index) const
Get a particular CE from the list.
UCollator * getCollator() const
Get the UCollator object used to create this object.
static CollData * open(UCollator *collator, UErrorCode &status)
Construct a CollData object.
int32_t minLengthInChars(const CEList *ces, int32_t offset, int32_t *history) const
Return the length of the shortest string that will generate the given list of CEs.
virtual UClassID getDynamicClassID() const
UObject glue...
int32_t minLengthInChars(const CEList *ces, int32_t offset) const
Return the length of the shortest string that will generate the given list of CEs.
void freeCEList(const CEList *list)
Release a CEList returned by getCEList.
const CEList * getCEList(const UnicodeString *string) const
Get a list of the CEs generated by a partcular stirng.
static UClassID getStaticClassID()
UObject glue...
const StringList * getStringList(int32_t ce) const
Get a list of all the strings which generate a list of CEs starting with a given CE.
static void flushCollDataCache()
CollData objects are expensive to compute, and so may be cached.
static void close(CollData *collData)
Release a CollData object.
static void freeCollDataCache()
CollData objects are expensive to compute, and so may be cached.
void add(const UChar *chars, int32_t count, UErrorCode &status)
Add an array of Unicode code points to the list.
virtual UClassID getDynamicClassID() const
the UObject glue...
const UnicodeString * get(int32_t index) const
Get a particular string from the list.
StringList(UErrorCode &status)
Construct an empty StringList
~StringList()
The destructor.
int32_t size() const
Get the number of stings in the list.
void add(const UnicodeString *string, UErrorCode &status)
Add a string to the list.
static UClassID getStaticClassID()
the UObject glue...
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
#define KEY_BUFFER_SIZE
The size of the internal buffer for the Collator's short description string.
#define CELIST_BUFFER_SIZE
The size of the internal CE buffer in a CEList object.
struct UCollator UCollator
structure representing a collator object instance
int8_t UBool
The ICU boolean type.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
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.