os/textandloc/fontservices/textshaperplugin/IcuSource/layout/DefaultCharMapper.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
 * %W% %W%
sl@0
     3
 *
sl@0
     4
 * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
sl@0
     5
 *
sl@0
     6
 */
sl@0
     7
sl@0
     8
#ifndef __DEFAULTCHARMAPPER_H
sl@0
     9
#define __DEFAULTCHARMAPPER_H
sl@0
    10
sl@0
    11
/**
sl@0
    12
 * \file
sl@0
    13
 * \internal
sl@0
    14
 */
sl@0
    15
sl@0
    16
#include "LETypes.h"
sl@0
    17
#include "LEFontInstance.h"
sl@0
    18
sl@0
    19
U_NAMESPACE_BEGIN
sl@0
    20
sl@0
    21
/**
sl@0
    22
 * This class is an instance of LECharMapper which
sl@0
    23
 * implements control character filtering and bidi
sl@0
    24
 * mirroring.
sl@0
    25
 *
sl@0
    26
 * @see LECharMapper
sl@0
    27
 */
sl@0
    28
class DefaultCharMapper : public UMemory, public LECharMapper
sl@0
    29
{
sl@0
    30
private:
sl@0
    31
    le_bool fFilterControls;
sl@0
    32
    le_bool fMirror;
sl@0
    33
sl@0
    34
    static const LEUnicode32 controlChars[];
sl@0
    35
sl@0
    36
    static const le_int32 controlCharsCount;
sl@0
    37
sl@0
    38
    static const LEUnicode32 mirroredChars[];
sl@0
    39
sl@0
    40
    static const le_int32 mirroredCharsCount;
sl@0
    41
sl@0
    42
public:
sl@0
    43
    DefaultCharMapper(le_bool filterControls, le_bool mirror)
sl@0
    44
        : fFilterControls(filterControls), fMirror(mirror)
sl@0
    45
    {
sl@0
    46
        // nothing
sl@0
    47
    };
sl@0
    48
sl@0
    49
    ~DefaultCharMapper()
sl@0
    50
    {
sl@0
    51
        // nada
sl@0
    52
    };
sl@0
    53
sl@0
    54
    LEUnicode32 mapChar(LEUnicode32 ch) const;
sl@0
    55
};
sl@0
    56
sl@0
    57
U_NAMESPACE_END
sl@0
    58
#endif