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

uset.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 2002, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *   file name:  uset.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 *
00013 *   created on: 2002mar07
00014 *   created by: Markus W. Scherer
00015 *
00016 *   C version of UnicodeSet.
00017 */
00018 
00019 #ifndef __USET_H__
00020 #define __USET_H__
00021 
00022 #include "unicode/utypes.h"
00023 
00029 struct USet;
00030 typedef struct USet USet;
00031 
00032 enum {
00033     USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8     
00034 };
00035 
00041 struct USerializedSet {
00042     const uint16_t *array;
00043     int32_t bmpLength, length;
00044     uint16_t staticArray[USET_SERIALIZED_STATIC_ARRAY_CAPACITY];
00045 };
00046 typedef struct USerializedSet USerializedSet;
00047 
00048 
00049 /*********************************************************************
00050  * USet API
00051  *********************************************************************/
00052 
00062 U_CAPI USet* U_EXPORT2
00063 uset_open(UChar32 start, UChar32 end);
00064 
00074 U_CAPI USet* U_EXPORT2
00075 uset_openPattern(const UChar* pattern, int32_t patternLength,
00076                  UErrorCode* ec);
00077 
00084 U_CAPI void U_EXPORT2
00085 uset_close(USet* set);
00086 
00102 U_CAPI int32_t U_EXPORT2
00103 uset_toPattern(const USet* set,
00104                UChar* result, int32_t resultCapacity,
00105                UBool escapeUnprintable,
00106                UErrorCode* ec);
00107 
00115 U_CAPI void U_EXPORT2
00116 uset_add(USet* set, UChar32 c);
00117 
00126 U_CAPI void U_EXPORT2
00127 uset_addRange(USet* set, UChar32 start, UChar32 end);
00128 
00137 U_CAPI void U_EXPORT2
00138 uset_addString(USet* set, const UChar* str, int32_t strLen);
00139 
00147 U_CAPI void U_EXPORT2
00148 uset_remove(USet* set, UChar32 c);
00149 
00158 U_CAPI void U_EXPORT2
00159 uset_removeRange(USet* set, UChar32 start, UChar32 end);
00160 
00169 U_CAPI void U_EXPORT2
00170 uset_removeString(USet* set, const UChar* str, int32_t strLen);
00171 
00179 U_CAPI void U_EXPORT2
00180 uset_complement(USet* set);
00181 
00188 U_CAPI void U_EXPORT2
00189 uset_clear(USet* set);
00190 
00198 U_CAPI UBool U_EXPORT2
00199 uset_isEmpty(const USet* set);
00200 
00207 U_CAPI UBool U_EXPORT2
00208 uset_contains(const USet* set, UChar32 c);
00209 
00218 U_CAPI UBool U_EXPORT2
00219 uset_containsRange(const USet* set, UChar32 start, UChar32 end);
00220 
00229 U_CAPI UBool U_EXPORT2
00230 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
00231 
00240 U_CAPI int32_t U_EXPORT2
00241 uset_size(const USet* set);
00242 
00251 U_CAPI int32_t U_EXPORT2
00252 uset_getItemCount(const USet* set);
00253 
00272 U_CAPI int32_t U_EXPORT2
00273 uset_getItem(const USet* set, int32_t itemIndex,
00274              UChar32* start, UChar32* end,
00275              UChar* str, int32_t strCapacity,
00276              UErrorCode* ec);
00277 
00278 /*********************************************************************
00279  * Serialized set API
00280  *********************************************************************/
00281 
00331 U_CAPI int32_t U_EXPORT2
00332 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
00333 
00342 U_CAPI UBool U_EXPORT2
00343 uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength);
00344 
00350 U_CAPI void U_EXPORT2
00351 uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c);
00352 
00360 U_CAPI UBool U_EXPORT2
00361 uset_serializedContains(const USerializedSet* set, UChar32 c);
00362 
00372 U_CAPI int32_t U_EXPORT2
00373 uset_getSerializedRangeCount(const USerializedSet* set);
00374 
00388 U_CAPI UBool U_EXPORT2
00389 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
00390                         UChar32* pStart, UChar32* pEnd);
00391 
00392 #endif

Generated on Wed Dec 18 16:50:05 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001