Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

uset.h

Go to the documentation of this file.
00001 /* 00002 ******************************************************************************* 00003 * 00004 * Copyright (C) 2002-2003, 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 00027 #ifndef __USET_H__ 00028 #define __USET_H__ 00029 00030 #include "unicode/utypes.h" 00031 00032 #ifndef UCNV_H 00033 struct USet; 00039 typedef struct USet USet; 00040 #endif 00041 00047 enum { 00052 USET_IGNORE_SPACE = 1, 00053 00060 USET_CASE_INSENSITIVE = 2, 00061 00067 USET_CASE = 2, 00072 USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8 00073 }; 00074 00080 typedef struct USerializedSet { 00085 const uint16_t *array; 00090 int32_t bmpLength; 00095 int32_t length; 00100 uint16_t staticArray[USET_SERIALIZED_STATIC_ARRAY_CAPACITY]; 00101 } USerializedSet; 00102 00103 /********************************************************************* 00104 * USet API 00105 *********************************************************************/ 00106 00116 U_CAPI USet* U_EXPORT2 00117 uset_open(UChar32 start, UChar32 end); 00118 00128 U_CAPI USet* U_EXPORT2 00129 uset_openPattern(const UChar* pattern, int32_t patternLength, 00130 UErrorCode* ec); 00131 00143 U_CAPI USet* U_EXPORT2 00144 uset_openPatternOptions(const UChar* pattern, int32_t patternLength, 00145 uint32_t options, 00146 UErrorCode* ec); 00147 00154 U_CAPI void U_EXPORT2 00155 uset_close(USet* set); 00156 00177 U_CAPI int32_t U_EXPORT2 00178 uset_applyPattern(USet *set, 00179 const UChar *pattern, int32_t patternLength, 00180 uint32_t options, 00181 UErrorCode *status); 00182 00198 U_CAPI int32_t U_EXPORT2 00199 uset_toPattern(const USet* set, 00200 UChar* result, int32_t resultCapacity, 00201 UBool escapeUnprintable, 00202 UErrorCode* ec); 00203 00211 U_CAPI void U_EXPORT2 00212 uset_add(USet* set, UChar32 c); 00213 00225 U_CAPI void U_EXPORT2 00226 uset_addAll(USet* set, const USet *additionalSet); 00227 00236 U_CAPI void U_EXPORT2 00237 uset_addRange(USet* set, UChar32 start, UChar32 end); 00238 00247 U_CAPI void U_EXPORT2 00248 uset_addString(USet* set, const UChar* str, int32_t strLen); 00249 00257 U_CAPI void U_EXPORT2 00258 uset_remove(USet* set, UChar32 c); 00259 00268 U_CAPI void U_EXPORT2 00269 uset_removeRange(USet* set, UChar32 start, UChar32 end); 00270 00279 U_CAPI void U_EXPORT2 00280 uset_removeString(USet* set, const UChar* str, int32_t strLen); 00281 00289 U_CAPI void U_EXPORT2 00290 uset_complement(USet* set); 00291 00298 U_CAPI void U_EXPORT2 00299 uset_clear(USet* set); 00300 00308 U_CAPI UBool U_EXPORT2 00309 uset_isEmpty(const USet* set); 00310 00318 U_CAPI UBool U_EXPORT2 00319 uset_contains(const USet* set, UChar32 c); 00320 00330 U_CAPI UBool U_EXPORT2 00331 uset_containsRange(const USet* set, UChar32 start, UChar32 end); 00332 00341 U_CAPI UBool U_EXPORT2 00342 uset_containsString(const USet* set, const UChar* str, int32_t strLen); 00343 00352 U_CAPI int32_t U_EXPORT2 00353 uset_size(const USet* set); 00354 00363 U_CAPI int32_t U_EXPORT2 00364 uset_getItemCount(const USet* set); 00365 00384 U_CAPI int32_t U_EXPORT2 00385 uset_getItem(const USet* set, int32_t itemIndex, 00386 UChar32* start, UChar32* end, 00387 UChar* str, int32_t strCapacity, 00388 UErrorCode* ec); 00389 00390 /********************************************************************* 00391 * Serialized set API 00392 *********************************************************************/ 00393 00443 U_CAPI int32_t U_EXPORT2 00444 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode); 00445 00454 U_CAPI UBool U_EXPORT2 00455 uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength); 00456 00464 U_CAPI void U_EXPORT2 00465 uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c); 00466 00475 U_CAPI UBool U_EXPORT2 00476 uset_serializedContains(const USerializedSet* set, UChar32 c); 00477 00487 U_CAPI int32_t U_EXPORT2 00488 uset_getSerializedRangeCount(const USerializedSet* set); 00489 00503 U_CAPI UBool U_EXPORT2 00504 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, 00505 UChar32* pStart, UChar32* pEnd); 00506 00507 #endif

Generated on Wed Sep 15 17:18:10 2004 for ICU 2.8 by doxygen 1.3.8