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

« back to all changes in this revision

Viewing changes to source/layout/Lookups.cpp

  • 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
 
 * @(#)Lookups.cpp      1.5 00/03/15
3
 
 *
4
 
 * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
5
 
 *
6
 
 */
7
 
 
8
 
#include "LETypes.h"
9
 
#include "OpenTypeTables.h"
10
 
#include "Lookups.h"
11
 
#include "CoverageTables.h"
12
 
#include "LESwaps.h"
13
 
 
14
 
U_NAMESPACE_BEGIN
15
 
 
16
 
const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const
17
 
{
18
 
    if (lookupTableIndex >= SWAPW(lookupCount)) {
19
 
        return 0;
20
 
    }
21
 
 
22
 
    Offset lookupTableOffset = lookupTableOffsetArray[lookupTableIndex];
23
 
 
24
 
    return (const LookupTable *) ((char *) this + SWAPW(lookupTableOffset));
25
 
}
26
 
 
27
 
const LookupSubtable *LookupTable::getLookupSubtable(le_uint16 subtableIndex) const
28
 
{
29
 
    if (subtableIndex >= SWAPW(subTableCount)) {
30
 
        return 0;
31
 
    }
32
 
 
33
 
    Offset subtableOffset = subTableOffsetArray[subtableIndex];
34
 
 
35
 
    return (const LookupSubtable *) ((char *) this + SWAPW(subtableOffset));
36
 
}
37
 
 
38
 
le_int32 LookupSubtable::getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const
39
 
{
40
 
    const CoverageTable *coverageTable = (const CoverageTable *) ((char *) this + SWAPW(tableOffset));
41
 
 
42
 
    return coverageTable->getGlyphCoverage(glyphID);
43
 
}
44
 
 
45
 
U_NAMESPACE_END