dict class
[FTS Data Classes]


Detailed Description

The dict class.

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_tdict_class
 The dict class identifier (pointer to class instance).


Function Documentation

FTS_API void dict_clear ( dict_t dict  ) 

Remove all keys and values from a dict.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
dict the dict
ac values count
at array of values (key-value pairs)


Generated on Wed Aug 24 18:28:43 2011 for FTM API by  doxygen 1.5.6