Lines Matching full:array

2 Generic Associative Array Implementation
8 This associative array implementation is an object container with the following
18 2. Objects do not need to contain linkage blocks for use by the array. This
20 Rather, the array is made up of metadata blocks that point to objects.
22 3. Objects require index keys to locate them within the array.
25 already in the array will replace the old object.
32 7. Index keys can include a hash to scatter objects throughout the array.
34 8. The array can iterated over. The objects will not necessarily come out in
37 9. The array can be iterated over while it is being modified, provided the
43 10. Objects in the array can be looked up by means of their index key.
45 11. Objects can be looked up while the array is being modified, provided the
60 array is rooted on the following structure::
136 As the previous function, but gets its data from an object in the array
168 There are a number of functions for manipulating an associative array:
170 1. Initialise an associative array::
172 void assoc_array_init(struct assoc_array *array);
174 This initialises the base structure for an associative array. It can't fail.
177 2. Insert/replace an object in an associative array::
180 assoc_array_insert(struct assoc_array *array,
185 This inserts the given object into the array. Note that the least
195 This function makes no alteration to the array itself, but rather returns
199 The caller should lock exclusively against other modifiers of the array.
202 3. Delete an object from an associative array::
205 assoc_array_delete(struct assoc_array *array,
209 This deletes an object that matches the specified data from the array.
214 This function makes no alteration to the array itself, but rather returns
217 not found within the array.
219 The caller should lock exclusively against other modifiers of the array.
222 4. Delete all objects from an associative array::
225 assoc_array_clear(struct assoc_array *array,
228 This deletes all the objects from an associative array and leaves it
231 This function makes no alteration to the array itself, but rather returns
235 The caller should lock exclusively against other modifiers of the array.
238 5. Destroy an associative array, deleting all objects::
240 void assoc_array_destroy(struct assoc_array *array,
243 This destroys the contents of the associative array and leaves it
245 the array under the RCU read lock at the same time as this function is
250 of the array.
253 6. Garbage collect an associative array::
255 int assoc_array_gc(struct assoc_array *array,
260 This iterates over the objects in an associative array and passes each one to
275 It is possible for other threads to iterate over or search the array under
277 lock exclusively against other modifiers of the array.
283 There are two functions for accessing an associative array:
285 1. Iterate over all the objects in an associative array::
287 int assoc_array_iterate(const struct assoc_array *array,
292 This passes each object in the array to the iterator callback function.
295 This may be used on an array at the same time as the array is being
301 The function will return ``0`` if no objects were in the array or else it will
307 2. Find an object in an associative array::
309 void *assoc_array_find(const struct assoc_array *array,
313 This walks through the array's internal tree directly to the object
316 This may be used on an array at the same time as the array is being
352 The associative array data structure has an internal tree. This tree is
355 A node is an array of slots. Each slot can contain one of four things: