2001-09-20 00:37:55 +00:00
|
|
|
/*
|
|
|
|
* %W% %W%
|
|
|
|
*
|
2003-06-03 20:58:22 +00:00
|
|
|
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
|
2001-09-20 00:37:55 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DEFAULTCHARMAPPER_H
|
|
|
|
#define __DEFAULTCHARMAPPER_H
|
|
|
|
|
2003-01-13 23:15:11 +00:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* \internal
|
|
|
|
*/
|
|
|
|
|
2001-09-20 00:37:55 +00:00
|
|
|
#include "LETypes.h"
|
|
|
|
#include "LEFontInstance.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2001-09-20 00:37:55 +00:00
|
|
|
/**
|
|
|
|
* This class is an instance of LECharMapper which
|
|
|
|
* implements control character filtering and bidi
|
|
|
|
* mirroring.
|
|
|
|
*
|
|
|
|
* @see LECharMapper
|
|
|
|
*/
|
2003-12-23 18:10:11 +00:00
|
|
|
class DefaultCharMapper : public UMemory, public LECharMapper
|
2001-09-20 00:37:55 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
le_bool fFilterControls;
|
|
|
|
le_bool fMirror;
|
|
|
|
|
2002-03-27 00:34:56 +00:00
|
|
|
static const LEUnicode32 controlChars[];
|
2001-09-20 00:37:55 +00:00
|
|
|
|
|
|
|
static const le_int32 controlCharsCount;
|
|
|
|
|
2002-03-27 00:34:56 +00:00
|
|
|
static const LEUnicode32 mirroredChars[];
|
2001-09-20 00:37:55 +00:00
|
|
|
|
|
|
|
static const le_int32 mirroredCharsCount;
|
|
|
|
|
|
|
|
public:
|
|
|
|
DefaultCharMapper(le_bool filterControls, le_bool mirror)
|
|
|
|
: fFilterControls(filterControls), fMirror(mirror)
|
|
|
|
{
|
|
|
|
// nothing
|
|
|
|
};
|
|
|
|
|
|
|
|
~DefaultCharMapper()
|
|
|
|
{
|
|
|
|
// nada
|
|
|
|
};
|
|
|
|
|
|
|
|
LEUnicode32 mapChar(LEUnicode32 ch) const;
|
|
|
|
};
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_END
|
2001-09-20 00:37:55 +00:00
|
|
|
#endif
|