#include <tcoldata.h>
Public Methods | |
TableCollationData () | |
virtual | ~TableCollationData () |
void | streamIn (FileStream* is) |
The streamIn and streamOut methods read and write objects of this class as binary, platform-dependent data in the iostream. More... | |
void | streamOut (FileStream* os) const |
void | streamIn (UMemoryStream* is, UErrorCode& status) |
For internal use only - streaming to memory. | |
void | streamOut (UMemoryStream* os) const |
UBool | isBogus () const |
Checks if this object is valid. More... | |
Static Public Methods | |
void | addToCache (const UnicodeString& key, TableCollationData* data) |
Cache interface. More... | |
TableCollationData* | findInCache (const UnicodeString& key) |
Finds and returns the cached collation data. More... | |
Friends | |
class | RuleBasedCollator |
class | CollationElementIterator |
int32_t | ucol_getNextCE (const UCollator *coll, collIterate *source, UErrorCode *status) |
int32_t | getComplicatedCE (const UCollator *coll, collIterate *source, UErrorCode *status) |
int32_t | ucol_getSortKey (const UCollator *coll, const UChar *source, int32_t sourceLength, uint8_t *result, int32_t resultLength) |
Get a sort key for a string from a UCollator. More... | |
UCollationResult | ucol_strcoll ( const UCollator *coll, const UChar *source, int32_t sourceLength, const UChar *target, int32_t targetLength) |
Compare two strings. More... |
It encapsulates most of the data associated with a TableCollation. This includes the large collation tables, including the contract order and expand order tables, and some small pieces of data that don't change, such as the maximum secondary order. The general idea is that the TableCollation object should be a lightweight object. If there are two TableCollation objects, they will each be very small, and users can alter the strength of each object independently. However, both objects, if they are refering to the same underlying collation, will share pointers to the same TableCollationData object, which doesn't change.
TableCollationData objects are therefore good candidates for caching in memory and potentially for reference counting.
Definition at line 69 of file tcoldata.h.
|
|
|
|
|
Cache interface. The cache uses UnicodeString objects as keys. These are completely arbitrary, but are usually something uniquely associated with each collation, while at the same time fairly small, such as a locale identifier string. Adds the collation data object to the cache list.
|
|
Finds and returns the cached collation data.
|
|
Checks if this object is valid.
|
|
For internal use only - streaming to memory.
|
|
The streamIn and streamOut methods read and write objects of this class as binary, platform-dependent data in the iostream. The stream must be in ios::binary mode for this to work. These methods are not intended for general public use; they are used by the framework to improve performance by storing certain objects in binary files. |
|
|
|
|
|
Definition at line 133 of file tcoldata.h. |
|
The TableCollation class freely manipulates the data members within a TableCollationData object. This is because TableCollationData is intended to be an internal, invisible implementation detail. If TableCollationData every becomes a more public API, then this will have to change, although this is not really advised. Definition at line 132 of file tcoldata.h. |
|
|
|
|
|
Get a sort key for a string from a UCollator.
Sort keys may be compared using
|
|
Compare two strings. The strings will be compared using the normalization mode and options specified in \Ref{ucol_open} or \Ref{ucol_openRules}
|