~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/layout/LookupTables.h

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * @(#)LookupTables.h   1.5 00/03/15
3
 
 *
4
 
 * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
5
 
 *
6
 
 */
7
 
 
8
 
#ifndef __LOOKUPTABLES_H
9
 
#define __LOOKUPTABLES_H
10
 
 
11
 
#include "LETypes.h"
12
 
#include "LayoutTables.h"
13
 
 
14
 
U_NAMESPACE_BEGIN
15
 
 
16
 
enum LookupTableFormat
17
 
{
18
 
    ltfSimpleArray      = 0,
19
 
    ltfSegmentSingle    = 2,
20
 
    ltfSegmentArray     = 4,
21
 
    ltfSingleTable      = 6,
22
 
    ltfTrimmedArray     = 8
23
 
};
24
 
 
25
 
typedef le_int16 LookupValue;
26
 
 
27
 
struct LookupTable
28
 
{
29
 
    le_int16 format;
30
 
};
31
 
 
32
 
struct LookupSegment
33
 
{
34
 
    le_int16 lastGlyph;
35
 
    le_int16 firstGlyph;
36
 
    LookupValue value;
37
 
};
38
 
 
39
 
struct LookupSingle
40
 
{
41
 
    le_int16 glyph;
42
 
    LookupValue value;
43
 
};
44
 
 
45
 
struct BinarySearchLookupTable : LookupTable
46
 
{
47
 
    le_int16 unitSize;
48
 
    le_int16 nUnits;
49
 
    le_int16 searchRange;
50
 
    le_int16 entrySelector;
51
 
    le_int16 rangeShift;
52
 
 
53
 
    const LookupSegment *lookupSegment(const LookupSegment *segments, le_uint32 glyph) const;
54
 
 
55
 
    const LookupSingle *lookupSingle(const LookupSingle *entries, le_uint32 glyph) const;
56
 
};
57
 
 
58
 
struct SimpleArrayLookupTable : LookupTable
59
 
{
60
 
    LookupValue valueArray[ANY_NUMBER];
61
 
};
62
 
 
63
 
struct SegmentSingleLookupTable : BinarySearchLookupTable
64
 
{
65
 
    LookupSegment segments[ANY_NUMBER];
66
 
};
67
 
 
68
 
struct SegmentArrayLookupTable : BinarySearchLookupTable
69
 
{
70
 
    LookupSegment segments[ANY_NUMBER];
71
 
};
72
 
 
73
 
struct SingleTableLookupTable : BinarySearchLookupTable
74
 
{
75
 
    LookupSingle entries[ANY_NUMBER];
76
 
};
77
 
 
78
 
struct TrimmedArrayLookupTable : LookupTable
79
 
{
80
 
    le_int16 firstGlyph;
81
 
    le_int16 glyphCount;
82
 
    LookupValue valueArray[ANY_NUMBER];
83
 
};
84
 
 
85
 
U_NAMESPACE_END
86
 
#endif