00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef __USET_H__
00028 #define __USET_H__
00029
00030 #include "unicode/utypes.h"
00031 #include "unicode/uchar.h"
00032
00033 #ifndef UCNV_H
00034 struct USet;
00040 typedef struct USet USet;
00041 #endif
00042
00048 enum {
00053 USET_IGNORE_SPACE = 1,
00054
00062 USET_CASE_INSENSITIVE = 2,
00063
00069 USET_CASE = 2,
00070
00079 USET_ADD_CASE_MAPPINGS = 4,
00080
00085 USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8
00086 };
00087
00093 typedef struct USerializedSet {
00098 const uint16_t *array;
00103 int32_t bmpLength;
00108 int32_t length;
00113 uint16_t staticArray[USET_SERIALIZED_STATIC_ARRAY_CAPACITY];
00114 } USerializedSet;
00115
00116
00117
00118
00119
00129 U_STABLE USet* U_EXPORT2
00130 uset_open(UChar32 start, UChar32 end);
00131
00141 U_STABLE USet* U_EXPORT2
00142 uset_openPattern(const UChar* pattern, int32_t patternLength,
00143 UErrorCode* ec);
00144
00156 U_STABLE USet* U_EXPORT2
00157 uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
00158 uint32_t options,
00159 UErrorCode* ec);
00160
00167 U_STABLE void U_EXPORT2
00168 uset_close(USet* set);
00169
00178 U_DRAFT void U_EXPORT2
00179 uset_set(USet* set,
00180 UChar32 start, UChar32 end);
00181
00202 U_DRAFT int32_t U_EXPORT2
00203 uset_applyPattern(USet *set,
00204 const UChar *pattern, int32_t patternLength,
00205 uint32_t options,
00206 UErrorCode *status);
00207
00229 U_DRAFT void U_EXPORT2
00230 uset_applyIntPropertyValue(USet* set,
00231 UProperty prop, int32_t value, UErrorCode* ec);
00232
00266 U_DRAFT void U_EXPORT2
00267 uset_applyPropertyAlias(USet* set,
00268 const UChar *prop, int32_t propLength,
00269 const UChar *value, int32_t valueLength,
00270 UErrorCode* ec);
00271
00281 U_DRAFT UBool U_EXPORT2
00282 uset_resemblesPattern(const UChar *pattern, int32_t patternLength,
00283 int32_t pos);
00284
00300 U_STABLE int32_t U_EXPORT2
00301 uset_toPattern(const USet* set,
00302 UChar* result, int32_t resultCapacity,
00303 UBool escapeUnprintable,
00304 UErrorCode* ec);
00305
00313 U_STABLE void U_EXPORT2
00314 uset_add(USet* set, UChar32 c);
00315
00327 U_STABLE void U_EXPORT2
00328 uset_addAll(USet* set, const USet *additionalSet);
00329
00338 U_STABLE void U_EXPORT2
00339 uset_addRange(USet* set, UChar32 start, UChar32 end);
00340
00349 U_STABLE void U_EXPORT2
00350 uset_addString(USet* set, const UChar* str, int32_t strLen);
00351
00359 U_STABLE void U_EXPORT2
00360 uset_remove(USet* set, UChar32 c);
00361
00370 U_STABLE void U_EXPORT2
00371 uset_removeRange(USet* set, UChar32 start, UChar32 end);
00372
00381 U_STABLE void U_EXPORT2
00382 uset_removeString(USet* set, const UChar* str, int32_t strLen);
00383
00394 U_DRAFT void U_EXPORT2
00395 uset_removeAll(USet* set, const USet* removeSet);
00396
00410 U_DRAFT void U_EXPORT2
00411 uset_retain(USet* set, UChar32 start, UChar32 end);
00412
00424 U_DRAFT void U_EXPORT2
00425 uset_retainAll(USet* set, const USet* retain);
00426
00434 U_DRAFT void U_EXPORT2
00435 uset_compact(USet* set);
00436
00444 U_STABLE void U_EXPORT2
00445 uset_complement(USet* set);
00446
00457 U_DRAFT void U_EXPORT2
00458 uset_complementAll(USet* set, const USet* complement);
00459
00466 U_STABLE void U_EXPORT2
00467 uset_clear(USet* set);
00468
00476 U_STABLE UBool U_EXPORT2
00477 uset_isEmpty(const USet* set);
00478
00486 U_STABLE UBool U_EXPORT2
00487 uset_contains(const USet* set, UChar32 c);
00488
00498 U_STABLE UBool U_EXPORT2
00499 uset_containsRange(const USet* set, UChar32 start, UChar32 end);
00500
00509 U_STABLE UBool U_EXPORT2
00510 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
00511
00522 U_DRAFT int32_t U_EXPORT2
00523 uset_indexOf(const USet* set, UChar32 c);
00524
00535 U_DRAFT UChar32 U_EXPORT2
00536 uset_charAt(const USet* set, int32_t index);
00537
00546 U_STABLE int32_t U_EXPORT2
00547 uset_size(const USet* set);
00548
00557 U_STABLE int32_t U_EXPORT2
00558 uset_getItemCount(const USet* set);
00559
00578 U_STABLE int32_t U_EXPORT2
00579 uset_getItem(const USet* set, int32_t itemIndex,
00580 UChar32* start, UChar32* end,
00581 UChar* str, int32_t strCapacity,
00582 UErrorCode* ec);
00583
00592 U_DRAFT UBool U_EXPORT2
00593 uset_containsAll(const USet* set1, const USet* set2);
00594
00603 U_DRAFT UBool U_EXPORT2
00604 uset_containsNone(const USet* set1, const USet* set2);
00605
00614 U_DRAFT UBool U_EXPORT2
00615 uset_containsSome(const USet* set1, const USet* set2);
00616
00625 U_DRAFT UBool U_EXPORT2
00626 uset_equals(const USet* set1, const USet* set2);
00627
00628
00629
00630
00631
00681 U_STABLE int32_t U_EXPORT2
00682 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
00683
00692 U_STABLE UBool U_EXPORT2
00693 uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength);
00694
00702 U_STABLE void U_EXPORT2
00703 uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c);
00704
00713 U_STABLE UBool U_EXPORT2
00714 uset_serializedContains(const USerializedSet* set, UChar32 c);
00715
00725 U_STABLE int32_t U_EXPORT2
00726 uset_getSerializedRangeCount(const USerializedSet* set);
00727
00741 U_STABLE UBool U_EXPORT2
00742 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
00743 UChar32* pStart, UChar32* pEnd);
00744
00745 #endif