#include <colldata.h>
Inheritance diagram for CollData:
Public Member Functions | |
UCollator * | getCollator () const |
Get the UCollator object used to create this object. | |
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. | |
const CEList * | getCEList (const UnicodeString *string) const |
Get a list of the CEs generated by a partcular stirng. | |
void | freeCEList (const CEList *list) |
Release a CEList returned by getCEList . | |
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. | |
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 |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. | |
Static Public Member Functions | |
CollData * | open (UCollator *collator, UErrorCode &status) |
Construct a CollData object. | |
void | close (CollData *collData) |
Release a CollData object. | |
UClassID | getStaticClassID () |
void | freeCollDataCache () |
CollData objects are expensive to compute, and so may be cached. | |
void | flushCollDataCache () |
CollData objects are expensive to compute, and so may be cached. | |
Friends | |
class | CollDataCache |
class | CollDataCacheEntry |
This class holds the Collator-specific data needed to compute the length of the shortest string that can generate a partcular list of CEs.
CollData
objects are quite expensive to compute. Because of this, they are cached. When you call CollData::open
it returns a reference counted cached object. When you call CollData::close
the reference count on the object is decremented but the object is not deleted.
If you do not need to reuse any unreferenced objects in the cache, you can call CollData::flushCollDataCache
. If you no longer need any CollData
objects, you can call CollData::freeCollDataCache
Definition at line 263 of file colldata.h.
|
Release a
|
|
This routine will remove any unused
|
|
Release a
|
|
This routine will free the cached objects and delete the cache.
WARNING: Don't call this until you are have called
|
|
Get a list of the CEs generated by a partcular stirng.
|
|
Get the The object returned may not be the exact object that was used to create this object, but it will have the same behavior. |
|
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
Implements UObject. |
|
Get a list of all the strings which generate a list of CEs starting with a given CE.
StringList object containing all the stirngs, or NULL if there are no such strings.
|
|
Return the length of the shortest string that will generate the given list of CEs. Note: the algorithm used to do this computation is recursive. To limit the amount of recursion, a "history" list is used to record the best answer starting at a particular offset in the list of CEs. If the same offset is visited again during the recursion, the answer in the history list is used.
|
|
Return the length of the shortest string that will generate the given list of CEs.
|
|
Construct a
CollData::close .
|