~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/tools/genprops/propsvec.h

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*******************************************************************************
 
3
*
 
4
*   Copyright (C) 2002, International Business Machines
 
5
*   Corporation and others.  All Rights Reserved.
 
6
*
 
7
*******************************************************************************
 
8
*   file name:  propsvec.h
 
9
*   encoding:   US-ASCII
 
10
*   tab size:   8 (not used)
 
11
*   indentation:4
 
12
*
 
13
*   created on: 2002feb22
 
14
*   created by: Markus W. Scherer
 
15
*
 
16
*   Store additional Unicode character properties in bit set vectors.
 
17
*/
 
18
 
 
19
#ifndef __UPROPSVEC_H__
 
20
#define __UPROPSVEC_H__
 
21
 
 
22
#include "unicode/utypes.h"
 
23
#include "utrie.h"
 
24
 
 
25
/*
 
26
 * Unicode Properties Vectors associated with code point ranges.
 
27
 * Stored in an array of uint32_t.
 
28
 *
 
29
 * The array starts with a header, then rows of integers store
 
30
 * the range limits and the properties vectors.
 
31
 *
 
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.
 
35
 *
 
36
 * Initially, there is only one range [0..0x110000[ with values 0.
 
37
 *
 
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.
 
40
 */
 
41
enum {
 
42
    UPVEC_COLUMNS,
 
43
    UPVEC_MAXROWS,
 
44
    UPVEC_ROWS,
 
45
    UPVEC_RESERVED,
 
46
    UPVEC_HEADER_LENGTH
 
47
};
 
48
 
 
49
U_CFUNC uint32_t *
 
50
upvec_open(int32_t columns, int32_t maxRows);
 
51
 
 
52
U_CFUNC void
 
53
upvec_close(uint32_t *pv);
 
54
 
 
55
U_CFUNC UBool
 
56
upvec_setValue(uint32_t *pv,
 
57
               uint32_t start, uint32_t limit,
 
58
               int32_t column,
 
59
               uint32_t value, uint32_t mask,
 
60
               UErrorCode *pErrorCode);
 
61
 
 
62
U_CFUNC uint32_t *
 
63
upvec_getRow(uint32_t *pv, int32_t rowIndex,
 
64
             uint32_t *pRangeStart, uint32_t *pRangeLimit);
 
65
 
 
66
U_CFUNC int32_t
 
67
upvec_toTrie(uint32_t *pv, UNewTrie *trie, UErrorCode *pErrorCode);
 
68
 
 
69
#endif