Home | History | Annotate | Download | only in layout
      1 /*
      2  * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
      3  *
      4  */
      5 
      6 #ifndef __DEFAULTCHARMAPPER_H
      7 #define __DEFAULTCHARMAPPER_H
      8 
      9 /**
     10  * \file
     11  * \internal
     12  */
     13 
     14 #include "LETypes.h"
     15 #include "LEFontInstance.h"
     16 
     17 U_NAMESPACE_BEGIN
     18 
     19 /**
     20  * This class is an instance of LECharMapper which
     21  * implements control character filtering and bidi
     22  * mirroring.
     23  *
     24  * @see LECharMapper
     25  */
     26 class DefaultCharMapper : public UMemory, public LECharMapper
     27 {
     28 private:
     29     le_bool fFilterControls;
     30     le_bool fMirror;
     31 
     32     static const LEUnicode32 controlChars[];
     33 
     34     static const le_int32 controlCharsCount;
     35 
     36     static const LEUnicode32 mirroredChars[];
     37     static const LEUnicode32 srahCderorrim[];
     38 
     39     static const le_int32 mirroredCharsCount;
     40 
     41 public:
     42     DefaultCharMapper(le_bool filterControls, le_bool mirror)
     43         : fFilterControls(filterControls), fMirror(mirror)
     44     {
     45         // nothing
     46     };
     47 
     48     ~DefaultCharMapper()
     49     {
     50         // nada
     51     };
     52 
     53     LEUnicode32 mapChar(LEUnicode32 ch) const;
     54 };
     55 
     56 U_NAMESPACE_END
     57 #endif
     58