Merge branch 'master' of git+ssh://repo.or.cz/srv/git/jben
[jben.git] / src / kdict_classes.h
blobf1ba5812b02fccc772d8552ea820c17d2ac5cf36
1 /*
2 Project: J-Ben
3 Author: Paul Goins
4 Website: http://www.vultaire.net/software/jben/
5 License: GNU General Public License (GPL) version 2
6 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
8 File: kdict_classes.h
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>
24 #ifndef kdict_classes_h
25 #define kdict_classes_h
27 #include <string>
28 #include <list>
29 using namespace std;
31 class SkipCode {
32 public:
33 SkipCode();
34 SkipCode(const string& skipStr);
35 string str() const;
36 bool is_set() const;
38 int i1, i2, i3;
41 /* New KInfo. Structure is less flexible but should be faster, especially on
42 load time. Lists remain but maps have been flattened into the class. */
43 class KInfo {
44 public:
45 KInfo();
47 string literal;
48 string cp_j208, cp_j212, cp_j213, cp_ucs;
49 unsigned char radical, radicalNelson;
50 unsigned char grade;
51 unsigned char jlpt;
52 unsigned char strokeCount;
53 list<unsigned char> misstrokes;
54 string var_j208, var_j212, var_j213, var_ucs,
55 var_deroo, var_nelson_c, var_njecd, var_oneill, var_s_h;
56 int freq;
57 string radicalName;
58 string dc_busy_people, dc_crowley, dc_gakken, dc_halpern_kkld,
59 dc_halpern_njecd, dc_heisig, dc_henshall, dc_henshall3, dc_jf_cards,
60 dc_kanji_in_context, dc_kodansha_compact, dc_moro, dc_nelson_c,
61 dc_nelson_n, dc_oneill_kk, dc_oneill_names, dc_sakade, dc_sh_kk,
62 dc_tutt_cards;
63 string qc_deroo, qc_four_corner, qc_sh_desc;
64 SkipCode qc_skip;
65 list< pair<string, SkipCode> > skipMisclass; /* Maybe this should be a
66 std::multimap instead? */
67 list<string> pinyin, korean_r, korean_h,
68 onyomi, kunyomi, nanori;
69 /* FOR NOW: I am ignoring onyomi and kunyomi r_status and on_type flags.
70 In the KANJIDIC2 dated 2008-02-12, there was only one entry, "行く",
71 which had any of these flags. Not worth the effort. */
72 list<string> meaning, meaning_es, meaning_pt;
73 wstring kradData;
76 #endif