Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ucoleitr.h File Reference

#include "unicode/ucol.h"

Go to the source code of this file.

Defines

#define UCOL_NULLORDER   0xFFFFFFFF
 This indicates an error has occured during processing or if no more CEs is to be returned. More...


Functions

U_CAPI UCollationElementsucol_openElements (const UCollator *coll, const UChar *text, int32_t textLength, UErrorCode *status)
 Open the collation elements for a string. More...

U_CAPI int32_t ucol_keyHashCode (const uint8_t* key, int32_t length)
 get a hash code for a key... More...

U_CAPI void ucol_closeElements (UCollationElements *elems)
 Close a UCollationElements. More...

U_CAPI void ucol_reset (UCollationElements *elems)
 Reset the collation elements to their initial state. More...

U_CAPI int32_t ucol_next (UCollationElements *elems, UErrorCode *status)
 Get the ordering priority of the next collation element in the text. More...

U_CAPI int32_t ucol_previous (UCollationElements *elems, UErrorCode *status)
 Get the ordering priority of the previous collation element in the text. More...

U_CAPI int32_t ucol_getMaxExpansion (const UCollationElements *elems, int32_t order)
 Get the maximum length of any expansion sequences that end with the specified comparison order. More...

U_CAPI void ucol_setText ( UCollationElements *elems, const UChar *text, int32_t textLength, UErrorCode *status)
 Set the text containing the collation elements. More...

U_CAPI UTextOffset ucol_getOffset (const UCollationElements *elems)
 Get the offset of the current source character. More...

U_CAPI void ucol_setOffset (UCollationElements *elems, UTextOffset offset, UErrorCode *status)
 Set the offset of the current source character. More...


Define Documentation

#define UCOL_NULLORDER   0xFFFFFFFF
 

This indicates an error has occured during processing or if no more CEs is to be returned.

Definition at line 23 of file ucoleitr.h.


Function Documentation

U_CAPI void ucol_closeElements ( UCollationElements * elems )
 

Close a UCollationElements.

Once closed, a UCollationElements may no longer be used.

Parameters:
elems   The UCollationElements to close.

U_CAPI int32_t ucol_getMaxExpansion ( const UCollationElements * elems,
int32_t order )
 

Get the maximum length of any expansion sequences that end with the specified comparison order.

This is useful for .... ?

Parameters:
elems   The UCollationElements containing the text.
order   A collation order returned by previous or next.
Returns:
maximum size of the expansion sequences ending with the collation element or 1 if collation element does not occur at the end of any expansion sequence

Referenced by CollationElementIterator::getMaxExpansion().

U_CAPI UTextOffset ucol_getOffset ( const UCollationElements * elems )
 

Get the offset of the current source character.

This is an offset into the text of the character containing the current collation elements.

Parameters:
elems   The UCollationElements to query.
Returns:
The offset of the current source character.
See also:
ucol_setOffset

U_CAPI int32_t ucol_keyHashCode ( const uint8_t * key,
int32_t length )
 

get a hash code for a key...

Not very useful!

Deprecated:

U_CAPI int32_t ucol_next ( UCollationElements * elems,
UErrorCode * status )
 

Get the ordering priority of the next collation element in the text.

A single character may contain more than one collation element.

Parameters:
elems   The UCollationElements containing the text.
status   A pointer to an UErrorCode to receive any errors.
Returns:
The next collation elements ordering, otherwise returns NULLORDER if an error has occured or if the end of string has been reached

U_CAPI UCollationElements * ucol_openElements ( const UCollator * coll,
const UChar * text,
int32_t textLength,
UErrorCode * status )
 

Open the collation elements for a string.

Parameters:
coll   The collator containing the desired collation rules.
text   The text to iterate over.
textLength   The number of characters in text, or -1 if null-terminated
status   A pointer to an UErrorCode to receive any errors.
Returns:
a struct containing collation element information

U_CAPI int32_t ucol_previous ( UCollationElements * elems,
UErrorCode * status )
 

Get the ordering priority of the previous collation element in the text.

A single character may contain more than one collation element. Note that internally a stack is used to store buffered collation elements. It is very rare that the stack will overflow, however if such a case is encountered, the problem can be solved by increasing the size UCOL_EXPAND_CE_BUFFER_SIZE in ucol_imp.h.

Parameters:
elems   The UCollationElements containing the text.
status   A pointer to an UErrorCode to receive any errors. Noteably a U_BUFFER_OVERFLOW_ERROR is returned if the internal stack buffer has been exhausted.
Returns:
The previous collation elements ordering, otherwise returns NULLORDER if an error has occured or if the start of string has been reached.

U_CAPI void ucol_reset ( UCollationElements * elems )
 

Reset the collation elements to their initial state.

This will move the 'cursor' to the beginning of the text.

Parameters:
elems   The UCollationElements to reset.
See also:
ucol_next , ucol_previous

U_CAPI void ucol_setOffset ( UCollationElements * elems,
UTextOffset offset,
UErrorCode * status )
 

Set the offset of the current source character.

This is an offset into the text of the character to be processed.

Parameters:
elems   The UCollationElements to set.
offset   The desired character offset.
status   A pointer to an UErrorCode to receive any errors.
See also:
ucol_getOffset

U_CAPI void ucol_setText ( UCollationElements * elems,
const UChar * text,
int32_t textLength,
UErrorCode * status )
 

Set the text containing the collation elements.

Parameters:
elems   The UCollationElements to set.
text   The source text containing the collation elements.
textLength   The length of text, or -1 if null-terminated.
status   A pointer to an UErrorCode to receive any errors.
See also:
ucol_getText


Generated at Tue Jun 12 14:04:11 2001 for ICU 1.8.1 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000