Defines | |
#define | trie_state_is_terminal(s) trie_state_is_walkable((s),TRIE_CHAR_TERM) |
Check for terminal state. | |
Typedefs | |
typedef _Trie | Trie |
Trie data type. | |
typedef Bool(* | TrieEnumFunc )(const TrieChar *key, TrieData key_data, void *user_data) |
Trie enumeration function. | |
typedef _TrieState | TrieState |
Trie walking state. | |
Functions | |
Trie * | trie_open (const char *path, const char *name, TrieIOMode mode) |
Open a trie. | |
int | trie_close (Trie *trie) |
Close a trie. | |
int | trie_save (Trie *trie) |
Save a trie. | |
Bool | trie_retrieve (Trie *trie, const TrieChar *key, TrieData *o_data) |
Retrieve an entry from trie. | |
Bool | trie_store (Trie *trie, const TrieChar *key, TrieData data) |
Store a value for an entry to trie. | |
Bool | trie_delete (Trie *trie, const TrieChar *key) |
Delete an entry from trie. | |
Bool | trie_enumerate (Trie *trie, TrieEnumFunc enum_func, void *user_data) |
Enumerate entries in trie. | |
TrieState * | trie_root (Trie *trie) |
Get root state of a trie. | |
TrieState * | trie_state_clone (const TrieState *s) |
Clone a trie state. | |
void | trie_state_free (TrieState *s) |
Free a trie state. | |
void | trie_state_rewind (TrieState *s) |
Rewind a trie state. | |
Bool | trie_state_walk (TrieState *s, TrieChar c) |
Walk the trie from the state. | |
Bool | trie_state_is_walkable (const TrieState *s, TrieChar c) |
Test walkability of character from state. | |
Bool | trie_state_is_leaf (const TrieState *s) |
Check for leaf state. | |
TrieData | trie_state_get_data (const TrieState *s) |
Get data from leaf state. |
|
Check for terminal state.
|
|
Trie enumeration function.
|
|
Close a trie.
|
|
Delete an entry from trie.
|
|
Enumerate entries in trie.
|
|
Open a trie.
|
|
Retrieve an entry from trie.
|
|
Get root state of a trie.
The returned state is allocated and must be freed with trie_state_free() |
|
Save a trie.
|
|
Clone a trie state.
The returned state is allocated and must be freed with trie_state_free() |
|
Free a trie state.
|
|
Get data from leaf state.
|
|
Check for leaf state.
|
|
Test walkability of character from state.
|
|
Rewind a trie state.
|
|
Walk the trie from the state.
|
|
Store a value for an entry to trie.
|