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 
00024 struct USet;
00025 typedef struct USet USet;
00026 
00027 enum {
00028     USET_SERIALIZED_STATIC_ARRAY_CAPACITY=8     
00029 };
00030 
00035 struct USerializedSet {
00036     const uint16_t *array;
00037     int32_t bmpLength, length;
00038     uint16_t staticArray[USET_SERIALIZED_STATIC_ARRAY_CAPACITY];
00039 };
00040 typedef struct USerializedSet USerializedSet;
00041 
00042 
00043 /*********************************************************************
00044  * USet API
00045  *********************************************************************/
00046 
00055 U_CAPI USet* U_EXPORT2
00056 uset_open(UChar32 start, UChar32 end);
00057 
00066 U_CAPI USet* U_EXPORT2
00067 uset_openPattern(const UChar* pattern, int32_t patternLength,
00068                  UErrorCode* ec);
00069 
00075 U_CAPI void U_EXPORT2
00076 uset_close(USet* set);
00077 
00092 U_CAPI int32_t U_EXPORT2
00093 uset_toPattern(const USet* set,
00094                UChar* result, int32_t resultCapacity,
00095                UBool escapeUnprintable,
00096                UErrorCode* ec);
00097 
00104 U_CAPI void U_EXPORT2
00105 uset_add(USet* set, UChar32 c);
00106 
00114 U_CAPI void U_EXPORT2
00115 uset_addString(USet* set, const UChar* str, int32_t strLen);
00116 
00123 U_CAPI void U_EXPORT2
00124 uset_remove(USet* set, UChar32 c);
00125 
00133 U_CAPI void U_EXPORT2
00134 uset_removeString(USet* set, const UChar* str, int32_t strLen);
00135 
00142 U_CAPI void U_EXPORT2
00143 uset_complement(USet* set);
00144 
00150 U_CAPI void U_EXPORT2
00151 uset_clear(USet* set);
00152 
00159 U_CAPI UBool U_EXPORT2
00160 uset_isEmpty(const USet* set);
00161 
00167 U_CAPI UBool U_EXPORT2
00168 uset_contains(const USet* set, UChar32 c);
00169 
00177 U_CAPI UBool U_EXPORT2
00178 uset_containsString(const USet* set, const UChar* str, int32_t strLen);
00179 
00187 U_CAPI int32_t U_EXPORT2
00188 uset_size(const USet* set);
00189 
00197 U_CAPI int32_t U_EXPORT2
00198 uset_getItemCount(const USet* set);
00199 
00217 U_CAPI int32_t U_EXPORT2
00218 uset_getItem(const USet* set, int32_t itemIndex,
00219              UChar32* start, UChar32* end,
00220              UChar* str, int32_t strCapacity,
00221              UErrorCode* ec);
00222 
00223 /*********************************************************************
00224  * Serialized set API
00225  *********************************************************************/
00226 
00275 U_CAPI int32_t U_EXPORT2
00276 uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* pErrorCode);
00277 
00285 U_CAPI UBool U_EXPORT2
00286 uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength);
00287 
00292 U_CAPI void U_EXPORT2
00293 uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c);
00294 
00301 U_CAPI UBool U_EXPORT2
00302 uset_serializedContains(const USerializedSet* set, UChar32 c);
00303 
00312 U_CAPI int32_t U_EXPORT2
00313 uset_getSerializedRangeCount(const USerializedSet* set);
00314 
00327 U_CAPI UBool U_EXPORT2
00328 uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
00329                         UChar32* pStart, UChar32* pEnd);
00330 
00331 #endif

Generated on Thu Aug 15 14:13:34 2002 for ICU 2.2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001