Apache2
apr_skiplist.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef APR_SKIPLIST_H
18 #define APR_SKIPLIST_H
24 #include "apr.h"
25 #include "apr_portable.h"
26 #include <stdlib.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
45 typedef int (*apr_skiplist_compare) (void *, void *);
46 
51 typedef void (*apr_skiplist_freefunc) (void *);
52 
54 struct apr_skiplist;
56 typedef struct apr_skiplist apr_skiplist;
57 
63 struct apr_skiplistnode;
65 typedef struct apr_skiplistnode apr_skiplistnode;
66 
77 
89 
98 
110  apr_skiplist_compare XXX2);
111 
123  apr_skiplist_compare XXX2);
124 
130 
141  void *data,
142  apr_skiplistnode **iter,
143  apr_skiplist_compare func);
144 
154 
165  apr_skiplistnode **iter,
166  apr_skiplist_compare comp);
167 
177  apr_skiplistnode **iter);
178 
187 
196 
202 
211  void *data, apr_skiplist_compare comp);
212 
222 
231  void *data, apr_skiplist_compare comp);
232 
242 
254  void *data, apr_skiplist_freefunc myfree,
255  apr_skiplist_compare comp);
256 
267  void *data, apr_skiplist_freefunc myfree);
268 
276  apr_skiplistnode *iter,
277  apr_skiplist_freefunc myfree);
278 
291 
304 
311 
318 
326 
333 
339 
345 
351 
367 
374 
377 #ifdef __cplusplus
378 }
379 #endif
380 
381 #endif /* ! APR_SKIPLIST_H */
APR Platform Definitions.
APR Portability Routines.
dav_buffer apr_size_t size
Definition: mod_dav.h:461
dav_buffer const void * mem
Definition: mod_dav.h:481
int
Definition: mod_proxy.h:674
int apr_status_t
Definition: apr_errno.h:44
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
apr_skiplistnode * apr_skiplist_insert_compare(apr_skiplist *sl, void *data, apr_skiplist_compare comp)
void * apr_skiplist_previous(apr_skiplist *sl, apr_skiplistnode **iter)
void * apr_skiplist_element(apr_skiplistnode *iter)
void * apr_skiplist_last(apr_skiplist *sl, void *data, apr_skiplistnode **iter)
apr_skiplistnode * apr_skiplist_insert(apr_skiplist *sl, void *data)
void * apr_skiplist_pop(apr_skiplist *sl, apr_skiplist_freefunc myfree)
int apr_skiplist_remove_node(apr_skiplist *sl, apr_skiplistnode *iter, apr_skiplist_freefunc myfree)
apr_skiplistnode * apr_skiplist_getlist(apr_skiplist *sl)
apr_skiplistnode * apr_skiplist_add(apr_skiplist *sl, void *data)
void(* apr_skiplist_freefunc)(void *)
Definition: apr_skiplist.h:51
int apr_skiplist_height(const apr_skiplist *sl)
void * apr_skiplist_alloc(apr_skiplist *sl, size_t size)
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_remove_all(apr_skiplist *sl, apr_skiplist_freefunc myfree)
int apr_skiplist_remove(apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree)
void apr_skiplist_destroy(apr_skiplist *sl, apr_skiplist_freefunc myfree)
size_t apr_skiplist_size(const apr_skiplist *sl)
void apr_skiplist_add_index(apr_skiplist *sl, apr_skiplist_compare XXX1, apr_skiplist_compare XXX2)
apr_skiplistnode * apr_skiplist_replace(apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree)
int(* apr_skiplist_compare)(void *, void *)
Definition: apr_skiplist.h:45
void * apr_skiplist_peek(apr_skiplist *sl)
int apr_skiplist_remove_compare(apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree, apr_skiplist_compare comp)
apr_skiplistnode * apr_skiplist_add_compare(apr_skiplist *sl, void *data, apr_skiplist_compare comp)
void apr_skiplist_free(apr_skiplist *sl, void *mem)
apr_skiplistnode * apr_skiplist_replace_compare(apr_skiplist *sl, void *data, apr_skiplist_freefunc myfree, apr_skiplist_compare comp)
void apr_skiplist_set_preheight(apr_skiplist *sl, int to)
void * apr_skiplist_last_compare(apr_skiplist *sl, void *data, apr_skiplistnode **iter, apr_skiplist_compare comp)
void * apr_skiplist_find(apr_skiplist *sl, void *data, apr_skiplistnode **iter)
apr_skiplist * apr_skiplist_merge(apr_skiplist *sl1, apr_skiplist *sl2)
void * apr_skiplist_find_compare(apr_skiplist *sl, void *data, apr_skiplistnode **iter, apr_skiplist_compare func)
struct apr_skiplist apr_skiplist
Definition: apr_skiplist.h:56
void * apr_skiplist_next(apr_skiplist *sl, apr_skiplistnode **iter)
int apr_skiplist_preheight(const apr_skiplist *sl)
struct apr_skiplistnode apr_skiplistnode
Definition: apr_skiplist.h:65
#define APR_DECLARE(x)
Definition: macros.h:6
apr_pool_t * p