Associative container. The dict class is built around the FTS hashtable data structure.
Typedefs | |
| typedef struct dict | dict_t |
| The dict data type. | |
Functions | |
| FTS_API void | dict_store (dict_t *dict, const fts_atom_t *key, const fts_atom_t *atom) |
| Insert/set a key with a value to a dict. | |
| FTS_API void | dict_store_atoms (dict_t *dict, const fts_atom_t *key, int ac, const fts_atom_t *at) |
| Insert/set a key with a list of values to a dict. | |
| FTS_API void | dict_store_list (dict_t *dict, int ac, const fts_atom_t *at) |
| Insert/set keys with values given as a list to a dict. | |
| FTS_API void | dict_get (dict_t *dict, const fts_atom_t *key, fts_atom_t *atom) |
| Get the value associated to a given key from a dict. | |
| FTS_API void | dict_clear (dict_t *dict) |
| Remove all keys and values from a dict. | |
Variables | |
| FTS_API fts_class_t * | dict_class |
| The dict class identifier (pointer to class instance). | |
| FTS_API void dict_clear | ( | dict_t * | dict | ) |
Remove all keys and values from a dict.
| dict | the dict |
| FTS_API void dict_get | ( | dict_t * | dict, | |
| const fts_atom_t * | key, | |||
| fts_atom_t * | atom | |||
| ) |
Get the value associated to a given key from a dict.
| dict | the dict | |
| key | the key | |
| atom | atom to store return value |
| FTS_API void dict_store | ( | dict_t * | dict, | |
| const fts_atom_t * | key, | |||
| const fts_atom_t * | atom | |||
| ) |
Insert/set a key with a value to a dict.
| dict | the dict | |
| key | the key | |
| atom | the value |
| FTS_API void dict_store_atoms | ( | dict_t * | dict, | |
| const fts_atom_t * | key, | |||
| int | ac, | |||
| const fts_atom_t * | at | |||
| ) |
Insert/set a key with a list of values to a dict.
A tuple is created if multiple values are given.
| dict | the dict | |
| key | the key | |
| ac | tuple values count | |
| at | array of values |
| FTS_API void dict_store_list | ( | dict_t * | dict, | |
| int | ac, | |||
| const fts_atom_t * | at | |||
| ) |
Insert/set keys with values given as a list to a dict.
| dict | the dict | |
| ac | values count | |
| at | array of values (key-value pairs) |
1.5.6