Definition in file dic.h.
Go to the source code of this file.
Defines | |
#define | DIC_LETTERS 27 |
different letters in the dictionary | |
#define | DIC_WORD_MAX 16 |
max length of words (including last ) | |
Typedefs | |
typedef _Dictionary * | Dictionary |
typedef unsigned int | dic_elt_t |
Functions | |
int | Dic_load (Dictionary *dic, const char *path) |
Dictionary creation and loading from a file. | |
int | Dic_destroy (Dictionary dic) |
Destroy a dictionary. | |
char | Dic_chr (Dictionary dic, dic_elt_t elt) |
Dic_chr returns the character associated with an element (in the range ['A'-'Z']), or the null character (''). | |
int | Dic_last (Dictionary dic, dic_elt_t elt) |
Returns a boolean to show if there is another available character in the current depth (a neighbor in the tree). | |
int | Dic_word (Dictionary dic, dic_elt_t elt) |
Returns a boolean to show if we are at the end of a word (see Dic_next). | |
dic_elt_t | Dic_root (Dictionary dic) |
Returns the root of the dictionary. | |
dic_elt_t | Dic_next (Dictionary dic, dic_elt_t elt) |
Returns the next available neighbor (see Dic_last). | |
dic_elt_t | Dic_succ (Dictionary dic, dic_elt_t elt) |
Returns the first element available at the next depth in the dictionary dic : dictionary elt : current dictionary element. | |
unsigned int | Dic_lookup (Dictionary dic, dic_elt_t root, char *pattern) |
Find the dictionary element matching the pattern starting from the given root node by walking the dictionary tree dic : valid dictionary root : starting dictionary node for the search pattern : string made of uppercase characters in the range ['A'-'Z']. |
|
different letters in the dictionary
Definition at line 37 of file dic.h. Referenced by PPlus1::compute_enter(), Dic_search_7pl1(), init_letter_lists(), Plus1Frame::refresh(), and s_automaton_NFA_to_DFA(). |
|
max length of words (including last )
Definition at line 42 of file dic.h. Referenced by PRegExp::compute_enter(), PPlus1::compute_enter(), PCross::compute_enter(), eliottxt_get_cross(), main(), RaccFrame::refresh(), BenjFrame::refresh(), and Plus1Frame::refresh(). |
|
|
|
|
|
Dic_chr returns the character associated with an element (in the range ['A'-'Z']), or the null character ('').
Definition at line 128 of file dic.c. References _Dictionary::dawg. Referenced by Board_checkout_tile(), Dic_lookup(), ExtendRight(), and LeftPart(). |
|
Destroy a dictionary.
Definition at line 84 of file dic.c. References _Dictionary::dawg. Referenced by main(), print_dic_hex(), print_dic_list(), and MainFrame::~MainFrame(). |
|
Returns a boolean to show if there is another available character in the current depth (a neighbor in the tree).
Definition at line 139 of file dic.c. References _Dictionary::dawg. Referenced by Board_checkout_tile(), Dic_lookup(), and Dic_next(). |
|
Dictionary creation and loading from a file.
Definition at line 46 of file dic.c. References check_header(), _Dict_header::edgesused, _Dict_header::nodesused, _Dict_header::nwords, _Dict_header::root, and _Dictionary::root. Referenced by GameFactory::createFromCmdLine(), dic_load(), EVT_TEXT_ENTER(), and main(). |
|
Find the dictionary element matching the pattern starting from the given root node by walking the dictionary tree dic : valid dictionary root : starting dictionary node for the search pattern : string made of uppercase characters in the range ['A'-'Z']. The pattern must be null ('') terminated
Definition at line 153 of file dic.c. References Dic_chr(), Dic_last(), Dic_next(), and Dic_succ(). Referenced by Board_checkout_tile(). |
|
Returns the next available neighbor (see Dic_last).
Definition at line 105 of file dic.c. References Dic_last(). Referenced by Board_checkout_tile(), Dic_lookup(), ExtendRight(), and LeftPart(). |
|
Returns the root of the dictionary.
Definition at line 121 of file dic.c. References _Dictionary::root. Referenced by Board_checkout_tile(), BoardSearchAux(), and Board::searchFirst(). |
|
Returns the first element available at the next depth in the dictionary dic : dictionary elt : current dictionary element.
Definition at line 114 of file dic.c. References _Dictionary::dawg. Referenced by Board_checkout_tile(), Dic_lookup(), ExtendRight(), and LeftPart(). |
|
Returns a boolean to show if we are at the end of a word (see Dic_next).
Definition at line 146 of file dic.c. References _Dictionary::dawg. Referenced by Board_checkout_tile(), and ExtendRight(). |