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

« back to all changes in this revision

Viewing changes to source/layout/SimpleArrayProcessor.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
 
 * @(#)SimpleArrayProcessor.cpp 1.6 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 "MorphTables.h"
10
 
#include "SubtableProcessor.h"
11
 
#include "NonContextualGlyphSubst.h"
12
 
#include "NonContextualGlyphSubstProc.h"
13
 
#include "SimpleArrayProcessor.h"
14
 
#include "LESwaps.h"
15
 
 
16
 
U_NAMESPACE_BEGIN
17
 
 
18
 
SimpleArrayProcessor::SimpleArrayProcessor()
19
 
{
20
 
}
21
 
 
22
 
SimpleArrayProcessor::SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader)
23
 
  : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader)
24
 
{
25
 
    const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader;
26
 
 
27
 
    simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table;
28
 
}
29
 
 
30
 
SimpleArrayProcessor::~SimpleArrayProcessor()
31
 
{
32
 
}
33
 
 
34
 
void SimpleArrayProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
35
 
{
36
 
    le_int32 glyph;
37
 
 
38
 
    for (glyph = 0; glyph < glyphCount; glyph += 1) {
39
 
        if (glyphs[glyph] < 0xFFFF) {
40
 
            le_int16 newGlyph = simpleArrayLookupTable->valueArray[glyphs[glyph]];
41
 
 
42
 
            glyphs[glyph] = SWAPW(newGlyph);
43
 
        }
44
 
    }
45
 
}
46
 
 
47
 
U_NAMESPACE_END