]>
git.saurik.com Git - apple/icu.git/blob - icuSources/tools/toolutil/propsvec.h
2 *******************************************************************************
4 * Copyright (C) 2002-2004, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * file name: propsvec.h
10 * tab size: 8 (not used)
13 * created on: 2002feb22
14 * created by: Markus W. Scherer
16 * Store additional Unicode character properties in bit set vectors.
19 #ifndef __UPROPSVEC_H__
20 #define __UPROPSVEC_H__
22 #include "unicode/utypes.h"
26 * Unicode Properties Vectors associated with code point ranges.
27 * Stored in an array of uint32_t.
29 * The array starts with a header, then rows of integers store
30 * the range limits and the properties vectors.
32 * In each row, row[0] contains the start code point and
33 * row[1] contains the limit code point,
34 * which is the start of the next range.
36 * Initially, there is only one range [0..0x110000[ with values 0.
38 * It would be possible to store only one range boundary per row,
39 * but self-contained rows allow to later sort them by contents.
42 /* stores number of columns, plus two for start & limit values */
46 /* search optimization: remember last row seen */
51 U_CAPI
uint32_t * U_EXPORT2
52 upvec_open(int32_t columns
, int32_t maxRows
);
55 upvec_close(uint32_t *pv
);
57 U_CAPI UBool U_EXPORT2
58 upvec_setValue(uint32_t *pv
,
59 UChar32 start
, UChar32 limit
,
61 uint32_t value
, uint32_t mask
,
62 UErrorCode
*pErrorCode
);
64 U_CAPI
uint32_t U_EXPORT2
65 upvec_getValue(uint32_t *pv
, UChar32 c
, int32_t column
);
68 * pRangeStart and pRangeLimit can be NULL.
69 * @return NULL if rowIndex out of range and for illegal arguments
71 U_CAPI
uint32_t * U_EXPORT2
72 upvec_getRow(uint32_t *pv
, int32_t rowIndex
,
73 UChar32
*pRangeStart
, UChar32
*pRangeLimit
);
75 U_CAPI
int32_t U_EXPORT2
76 upvec_toTrie(uint32_t *pv
, UNewTrie
*trie
, UErrorCode
*pErrorCode
);