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 const process(char, TransManager &) = 0;
27 virtual bool isAccentDefined(tex_accent, KmodInfo &) const = 0;
31 DefaultTrans: the default translation class. Holds info
32 on tex-accents. Monostate
34 class DefaultTrans : public TransInterface {
39 virtual string const process(char, TransManager &);
47 Trans: holds a .kmap file
49 class Trans : public TransInterface {
57 int Load(string const & language);
59 bool IsDefined() const;
61 string const & GetName() const;
63 string const process(char, TransManager &);
65 bool isAccentDefined(tex_accent, KmodInfo &) const;
69 typedef KmodInfo kmod_list_decl;
71 typedef KmodException keyexc;
74 void AddDeadkey(tex_accent, string const &, string const &);
80 inline string const & Match(unsigned char c);
82 void InsertException(keyexc & exclist, char c,
83 string const & data, bool = false,
84 tex_accent = TEX_NOACCENT);
86 void FreeException(keyexc & exclist);
93 kmod_list_decl * kmod_list_[TEX_MAX_ACCENT+1];
99 string const & Trans::Match(unsigned char c)