Lines Matching refs:dictionary

19    @file    dictionary.h
21 @brief Implements a dictionary for string variables.
23 This module implements a simple dictionary object, i.e. a list
56 in the dictionary is speeded up by the use of a (hopefully collision-free)
61 int n ; /** Number of entries in dictionary */
66 } dictionary ;
89 @brief Create a new dictionary object.
90 @param size Optional initial size of the dictionary.
91 @return 1 newly allocated dictionary objet.
93 This function allocates a new dictionary object of given size and returns
95 dictionary, give size=0.
98 dictionary * dictionary_new(size_t size);
102 @brief Delete a dictionary object
103 @param d dictionary object to deallocate.
106 Deallocate a dictionary object and all memory associated to it.
109 void dictionary_del(dictionary * vd);
113 @brief Get a value from a dictionary.
114 @param d dictionary object to search.
115 @param key Key to look for in the dictionary.
119 This function locates a key in a dictionary and returns a pointer to its
121 dictionary. The returned character pointer points to data internal to the
122 dictionary object, you should not try to free it or modify it.
125 const char * dictionary_get(const dictionary * d, const char * key, const char * def);
130 @brief Set a value in a dictionary.
131 @param d dictionary object to modify.
136 If the given key is found in the dictionary, the associated value is
138 dictionary, it is added to it.
140 It is Ok to provide a NULL value for val, but NULL values for the dictionary
148 dictionary. It is not possible (in this implementation) to have a key in
149 the dictionary without value.
154 int dictionary_set(dictionary * vd, const char * key, const char * val);
158 @brief Delete a key in a dictionary
159 @param d dictionary object to modify.
163 This function deletes a key in a dictionary. Nothing is done if the
167 void dictionary_unset(dictionary * d, const char * key);
172 @brief Dump a dictionary to an opened file pointer.
177 Dumps a dictionary onto an opened file pointer. Key pairs are printed out
182 void dictionary_dump(const dictionary * d, FILE * out);