im_recover() to recover from every possible input methods.
[vspell.git] / libvspell / keyboard.h
blob6465b1412bf1e4f10b76445e9c1456d3ca10f359
1 // -*- tab-width:2 mode:c++ -*-
2 #ifndef __SPELL_H__
3 #include "spell.h"
4 #endif
6 #ifndef __CGEN_H__
7 #include "cgen.h"
8 #endif
10 #ifndef __POSGEN_H__
11 #include "posgen.h"
12 #endif
14 #ifndef __STRING__
15 #include <string>
16 #endif
18 #ifndef __VECTOR__
19 #include <vector>
20 #endif
22 #ifndef __SET__
23 #include <set>
24 #endif
26 class KeyRecover
28 private:
29 std::string input;
30 std::vector<uint> vvv;
31 std::vector<const char*> vmap;
32 PosGen posgen;
33 CGen cgen;
34 std::vector<uint> v;
35 uint len;
36 bool inner_loop;
38 bool inner_step(std::string &output);
40 public:
41 void init(const char *input,int N = 2);
42 bool step(std::string &output);
43 void done();
46 void keyboard_recover(const char *input,std::set<std::string> &output);
47 void im_recover(const char *input,std::set<std::string> &output);
48 std::string vni_recover(const char *input);
49 std::string telex_recover(const char *input);