9 #include "tex-accent.h"
11 #include "trans_decl.h"
18 TransInterface: the interface that every translation class
20 Visitor pattern applied here
22 class TransInterface
{
25 virtual string
process(char,TransManager
&)=0;
27 virtual bool isAccentDefined(tex_accent
,KmodInfo
&)=0;
31 DefaultTrans: the default translation class. Hols info
32 on tex-accents. Monostate
34 class DefaultTrans
: public TransInterface
{
42 virtual string
process(char,TransManager
&);
47 Trans: holds a .kmap file
49 class Trans
:public TransInterface
{
57 int Load(string
const &language
);
61 const string
& GetName();
63 string
process(char,TransManager
&);
65 bool isAccentDefined(tex_accent
,KmodInfo
&);
69 typedef KmodInfo kmod_list_decl
;
71 typedef KmodException keyexc
;
74 void AddDeadkey(tex_accent
, const string
&, const string
&);
80 inline char* Match(char c
);
82 void InsertException(keyexc
&exclist
, char c
,
83 const string
& data
, bool = false,
84 tex_accent
= TEX_NOACCENT
);
86 void FreeException(keyexc
& exclist
);
93 kmod_list_decl
*kmod_list_
[TEX_MAX_ACCENT
+1];
98 char* Trans::Match(char c
)
100 return keymap_
[(unsigned char)c
];