Lines Matching defs:dictionary

4    @file    dictionary.h
6 @brief Implements a dictionary for string variables.
8 This module implements a simple dictionary object, i.e. a list
37 in the dictionary is speeded up by the use of a (hopefully collision-free)
42 int n ; /** Number of entries in dictionary */
47 } dictionary ;
70 @brief Create a new dictionary object.
71 @param size Optional initial size of the dictionary.
72 @return 1 newly allocated dictionary objet.
74 This function allocates a new dictionary object of given size and returns
76 dictionary, give size=0.
79 dictionary * dictionary_new(int size);
83 @brief Delete a dictionary object
84 @param d dictionary object to deallocate.
87 Deallocate a dictionary object and all memory associated to it.
90 void dictionary_del(dictionary * vd);
94 @brief Get a value from a dictionary.
95 @param d dictionary object to search.
96 @param key Key to look for in the dictionary.
100 This function locates a key in a dictionary and returns a pointer to its
102 dictionary. The returned character pointer points to data internal to the
103 dictionary object, you should not try to free it or modify it.
106 char * dictionary_get(dictionary * d, const char * key, char * def);
111 @brief Set a value in a dictionary.
112 @param d dictionary object to modify.
117 If the given key is found in the dictionary, the associated value is
119 dictionary, it is added to it.
121 It is Ok to provide a NULL value for val, but NULL values for the dictionary
129 dictionary. It is not possible (in this implementation) to have a key in
130 the dictionary without value.
135 int dictionary_set(dictionary * vd, const char * key, const char * val);
139 @brief Delete a key in a dictionary
140 @param d dictionary object to modify.
144 This function deletes a key in a dictionary. Nothing is done if the
148 void dictionary_unset(dictionary * d, const char * key);
153 @brief Dump a dictionary to an opened file pointer.
158 Dumps a dictionary onto an opened file pointer. Key pairs are printed out
163 void dictionary_dump(dictionary * d, FILE * out);