11 enum flag
{ FLAG_CHAR
, FLAG_LONG
, FLAG_NUM
, FLAG_UNI
};
13 class LIBHUNSPELL_DLL_EXPORTED HashMgr
16 struct hentry
** tableptr
;
21 unsigned short forbiddenword
;
25 struct cs_info
* csconv
;
27 unsigned short * ignorechars_utf16
;
28 int ignorechars_utf16_len
;
29 int numaliasf
; // flag vector `compression' with aliases
30 unsigned short ** aliasf
;
31 unsigned short * aliasflen
;
32 int numaliasm
; // morphological desciption `compression' with aliases
37 HashMgr(const char * tpath
, const char * apath
, const char * key
= NULL
);
40 struct hentry
* lookup(const char *) const;
41 int hash(const char *) const;
42 struct hentry
* walk_hashtable(int & col
, struct hentry
* hp
) const;
44 int add(const char * word
);
45 int add_with_affix(const char * word
, const char * pattern
);
46 int remove(const char * word
);
47 int decode_flags(unsigned short ** result
, char * flags
, FileMgr
* af
);
48 unsigned short decode_flag(const char * flag
);
49 char * encode_flag(unsigned short flag
);
51 int get_aliasf(int index
, unsigned short ** fvec
, FileMgr
* af
);
53 char * get_aliasm(int index
);
56 int get_clen_and_captype(const char * word
, int wbl
, int * captype
);
57 int load_tables(const char * tpath
, const char * key
);
58 int add_word(const char * word
, int wbl
, int wcl
, unsigned short * ap
,
59 int al
, const char * desc
, bool onlyupcase
);
60 int load_config(const char * affpath
, const char * key
);
61 int parse_aliasf(char * line
, FileMgr
* af
);
62 int add_hidden_capitalized_word(char * word
, int wbl
, int wcl
,
63 unsigned short * flags
, int al
, char * dp
, int captype
);
64 int parse_aliasm(char * line
, FileMgr
* af
);
65 int remove_forbidden_flag(const char * word
);