|
void * | apr_skiplist_alloc (apr_skiplist *sl, size_t size) |
|
void | apr_skiplist_free (apr_skiplist *sl, void *mem) |
|
apr_status_t | apr_skiplist_init (apr_skiplist **sl, apr_pool_t *p) |
|
void | apr_skiplist_set_compare (apr_skiplist *sl, apr_skiplist_compare XXX1, apr_skiplist_compare XXX2) |
|
void | apr_skiplist_add_index (apr_skiplist *sl, apr_skiplist_compare XXX1, apr_skiplist_compare XXX2) |
|
apr_skiplistnode * | apr_skiplist_getlist (apr_skiplist *sl) |
|
void * | apr_skiplist_find_compare (apr_skiplist *sl, void *data, apr_skiplistnode **iter, apr_skiplist_compare func) |
|
void * | apr_skiplist_find (apr_skiplist *sl, void *data, apr_skiplistnode **iter) |
|
void * | apr_skiplist_next (apr_skiplist *sl, apr_skiplistnode **iter) |
|
void * | apr_skiplist_previous (apr_skiplist *sl, apr_skiplistnode **iter) |
|
apr_skiplistnode * | apr_skiplist_insert_compare (apr_skiplist *sl, void *data, apr_skiplist_compare comp) |
|
apr_skiplistnode * | apr_skiplist_insert (apr_skiplist *sl, void *data) |
|
int | apr_skiplist_remove_compare (apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree, apr_skiplist_compare comp) |
|
int | apr_skiplist_remove (apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree) |
|
void | apr_skiplist_remove_all (apr_skiplist *sl, apr_skiplist_freefunc myfree) |
|
void | apr_skiplist_destroy (apr_skiplist *sl, apr_skiplist_freefunc myfree) |
|
void * | apr_skiplist_pop (apr_skiplist *sl, apr_skiplist_freefunc myfree) |
|
void * | apr_skiplist_peek (apr_skiplist *sl) |
|
apr_skiplist * | apr_skiplist_merge (apr_skiplist *sl1, apr_skiplist *sl2) |
|
Refer to http://en.wikipedia.org/wiki/Skip_list for information about the purpose of and ideas behind skip lists.
Opaque structure used to represent the skip list
typedef int(* apr_skiplist_compare) (void *, void *) |
apr_skiplist_compare is the function type that must be implemented per object type that is used in a skip list for comparisons to maintain order. A value <0 indicates placement after this node; a value of 0 indicates collision with this exact node; a value >0 indicates placement before this node.
typedef void(* apr_skiplist_freefunc) (void *) |
apr_skiplist_freefunc is the function type that must be implemented to handle elements as they are removed from a skip list.
Set the indexing functions to the specified comparison functions and rebuild the index.
- Parameters
-
sl | The skip list |
XXX1 | FIXME |
XXX2 | FIXME |
Allocate memory using the same mechanism as the skip list.
- Parameters
-
sl | The skip list |
size | The amount to allocate |
Remove each element from the skip list.
- Parameters
-
sl | The skip list |
myfree | A function to be called for each removed element |
Return the next matching element in the skip list using the current comparison function.
- Parameters
-
sl | The skip list |
data | The value to search for |
iter | A pointer to the returned skip list node representing the element found |
Return the next matching element in the skip list using the specified comparison function.
- Parameters
-
sl | The skip list |
data | The value to search for |
iter | A pointer to the returned skip list node representing the element found |
func | The comparison function to use |
Free memory using the same mechanism as the skip list.
- Parameters
-
sl | The skip list |
mem | The object to free |
Return the list maintained by the skip list abstraction.
- Parameters
-
Allocate a new skip list
- Parameters
-
sl | The pointer in which to return the newly created skip list |
p | The pool from which to allocate the skip list (optional). |
Insert an element into the skip list using the existing comparison function if it does not already exist (as determined by the comparison function)
- Parameters
-
sl | The skip list |
data | The element to insert |
Insert an element into the skip list using the specified comparison function if it does not already exist.
- Parameters
-
sl | The skip list |
data | The element to insert |
comp | The comparison function to use for placement into the skip list |
Merge two skip lists. XXX SEMANTICS
- Parameters
-
sl1 | One of two skip lists to be merged |
sl2 | The other of two skip lists to be merged |
Return the next element in the skip list.
- Parameters
-
sl | The skip list |
iter | On entry, a pointer to the skip list node to start with; on return, a pointer to the skip list node representing the element returned |
Return the first element in the skip list, leaving the element in the skip list.
- Parameters
-
Return the first element in the skip list, removing the element from the skip list.
- Parameters
-
sl | The skip list |
myfree | A function to be called for the removed element |
Return the previous element in the skip list.
- Parameters
-
sl | The skip list |
iter | On entry, a pointer to the skip list node to start with; on return, a pointer to the skip list node representing the element returned |
Remove an element from the skip list using the existing comparison function for locating the element. In the case of duplicates, the 1st entry will be removed.
- Parameters
-
sl | The skip list |
data | The element to remove |
myfree | A function to be called for each removed element |
Remove all elements from the skip list.
- Parameters
-
sl | The skip list |
myfree | A function to be called for each removed element |
Remove an element from the skip list using the specified comparison function for locating the element. In the case of duplicates, the 1st entry will be removed.
- Parameters
-
sl | The skip list |
data | The element to remove |
myfree | A function to be called for each removed element |
comp | The comparison function to use for placement into the skip list |
Set the comparison functions to be used for searching the skip list.
- Parameters
-
sl | The skip list |
XXX1 | FIXME |
XXX2 | FIXME |