HDF5  1.12.0
H5SLprivate.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * This file contains private information about the H5SL module
16  */
17 #ifndef _H5SLprivate_H
18 #define _H5SLprivate_H
19 
20 /**************************************/
21 /* Public headers needed by this file */
22 /**************************************/
23 #ifdef LATER
24 #include "H5SLpublic.h"
25 #endif /* LATER */
26 
27 /***************************************/
28 /* Private headers needed by this file */
29 /***************************************/
30 #include "H5private.h"
31 
32 /************/
33 /* Typedefs */
34 /************/
35 
36 /* Typedefs for skip list struct (defined in H5SL.c) */
37 typedef struct H5SL_t H5SL_t;
38 typedef struct H5SL_node_t H5SL_node_t;
39 
40 /* Typedef for kinds of skip lists supported */
41 typedef enum {
42  H5SL_TYPE_INT, /* Skip list keys are 'int's */
43  H5SL_TYPE_HADDR, /* Skip list keys are 'haddr_t's */
44  H5SL_TYPE_STR, /* Skip list keys are 'char *'s (ie. strings) */
45  H5SL_TYPE_HSIZE, /* Skip list keys are 'hsize_t's */
46  H5SL_TYPE_UNSIGNED, /* Skip list keys are 'unsigned's */
47  H5SL_TYPE_SIZE, /* Skip list keys are 'size_t's */
48  H5SL_TYPE_OBJ, /* Skip list keys are 'H5_obj_t's */
49  H5SL_TYPE_HID, /* Skip list keys are 'hid_t's */
50  H5SL_TYPE_GENERIC /* Skip list keys are unknown, comparison callback supplied */
52 
53 /**********/
54 /* Macros */
55 /**********/
56 
57 /* Typedef for comparison operations */
58 typedef int (*H5SL_cmp_t)(const void *key1, const void *key2);
59 
60 /* Typedef for iteration operations */
61 typedef herr_t (*H5SL_operator_t)(void *item, void *key,
62  void *operator_data/*in,out*/);
63 
64 /* Typedef for H5SL_try_free_safe operation callback */
65 typedef htri_t (*H5SL_try_free_op_t)(void *item, void *key,
66  void *operator_data/*in,out*/);
67 
68 /********************/
69 /* Private routines */
70 /********************/
72 H5_DLL size_t H5SL_count(H5SL_t *slist);
73 H5_DLL herr_t H5SL_insert(H5SL_t *slist, void *item, const void *key);
74 H5_DLL H5SL_node_t *H5SL_add(H5SL_t *slist, void *item, const void *key);
75 H5_DLL void *H5SL_remove(H5SL_t *slist, const void *key);
76 H5_DLL void *H5SL_remove_first(H5SL_t *slist);
77 H5_DLL void *H5SL_search(H5SL_t *slist, const void *key);
78 H5_DLL void *H5SL_less(H5SL_t *slist, const void *key);
79 H5_DLL void *H5SL_greater(H5SL_t *slist, const void *key);
80 H5_DLL H5SL_node_t *H5SL_find(H5SL_t *slist, const void *key);
81 H5_DLL H5SL_node_t *H5SL_below(H5SL_t *slist, const void *key);
82 H5_DLL H5SL_node_t *H5SL_above(H5SL_t *slist, const void *key);
87 H5_DLL void *H5SL_item(H5SL_node_t *slist_node);
88 H5_DLL herr_t H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data);
90 H5_DLL herr_t H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data);
92  void *op_data);
94 H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data);
96 
97 #endif /* _H5SLprivate_H */
98 
H5SL_term_interface
H5_DLL int H5SL_term_interface(void)
H5SL_t
Definition: H5SL.c:557
H5SL_try_free_safe
H5_DLL herr_t H5SL_try_free_safe(H5SL_t *slist, H5SL_try_free_op_t op, void *op_data)
Definition: H5SL.c:2339
H5SL_greater
H5_DLL void * H5SL_greater(H5SL_t *slist, const void *key)
Definition: H5SL.c:1595
H5SL_TYPE_STR
@ H5SL_TYPE_STR
Definition: H5SLprivate.h:44
H5SL_last
H5_DLL H5SL_node_t * H5SL_last(H5SL_t *slist)
Definition: H5SL.c:2099
H5SL_remove
H5_DLL void * H5SL_remove(H5SL_t *slist, const void *key)
Definition: H5SL.c:1199
H5SL_TYPE_OBJ
@ H5SL_TYPE_OBJ
Definition: H5SLprivate.h:48
H5SL_TYPE_UNSIGNED
@ H5SL_TYPE_UNSIGNED
Definition: H5SLprivate.h:46
H5SL_destroy
H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
Definition: H5SL.c:2517
H5SL_release
H5_DLL herr_t H5SL_release(H5SL_t *slist)
Definition: H5SL.c:2242
H5SL_TYPE_HADDR
@ H5SL_TYPE_HADDR
Definition: H5SLprivate.h:43
H5SL_iterate
H5_DLL herr_t H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
Definition: H5SL.c:2187
H5SL_close
H5_DLL herr_t H5SL_close(H5SL_t *slist)
Definition: H5SL.c:2556
H5SL_TYPE_GENERIC
@ H5SL_TYPE_GENERIC
Definition: H5SLprivate.h:50
H5SL_TYPE_INT
@ H5SL_TYPE_INT
Definition: H5SLprivate.h:42
H5SL_free
H5_DLL herr_t H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
Definition: H5SL.c:2291
H5SL_first
H5_DLL H5SL_node_t * H5SL_first(H5SL_t *slist)
Definition: H5SL.c:1987
H5SL_remove_first
H5_DLL void * H5SL_remove_first(H5SL_t *slist)
Definition: H5SL.c:1285
H5SL_TYPE_HSIZE
@ H5SL_TYPE_HSIZE
Definition: H5SLprivate.h:45
htri_t
int htri_t
Definition: H5public.h:160
H5SL_type_t
H5SL_type_t
Definition: H5SLprivate.h:41
H5SL_TYPE_SIZE
@ H5SL_TYPE_SIZE
Definition: H5SLprivate.h:47
H5SL_item
H5_DLL void * H5SL_item(H5SL_node_t *slist_node)
Definition: H5SL.c:2136
H5SL_find
H5_DLL H5SL_node_t * H5SL_find(H5SL_t *slist, const void *key)
Definition: H5SL.c:1694
H5SL_prev
H5_DLL H5SL_node_t * H5SL_prev(H5SL_node_t *slist_node)
Definition: H5SL.c:2061
int
CATCH int
Definition: H5EA.c:1002
H5SL_next
H5_DLL H5SL_node_t * H5SL_next(H5SL_node_t *slist_node)
Definition: H5SL.c:2024
H5SL_node_t::key
const void * key
Definition: H5SL.c:546
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5SL_TYPE_HID
@ H5SL_TYPE_HID
Definition: H5SLprivate.h:49
H5SL_node_t
Definition: H5SL.c:545
H5SL_below
H5_DLL H5SL_node_t * H5SL_below(H5SL_t *slist, const void *key)
Definition: H5SL.c:1787
H5SL_node_t::item
void * item
Definition: H5SL.c:547
H5SL_above
H5_DLL H5SL_node_t * H5SL_above(H5SL_t *slist, const void *key)
Definition: H5SL.c:1893
H5SL_operator_t
herr_t(* H5SL_operator_t)(void *item, void *key, void *operator_data)
Definition: H5SLprivate.h:61
H5SL_count
H5_DLL size_t H5SL_count(H5SL_t *slist)
Definition: H5SL.c:1065
H5SL_less
H5_DLL void * H5SL_less(H5SL_t *slist, const void *key)
Definition: H5SL.c:1486
H5SL_add
H5_DLL H5SL_node_t * H5SL_add(H5SL_t *slist, void *item, const void *key)
Definition: H5SL.c:1154
herr_t
int herr_t
Definition: H5public.h:128
H5SL_insert
H5_DLL herr_t H5SL_insert(H5SL_t *slist, void *item, const void *key)
Definition: H5SL.c:1104
H5SL_try_free_op_t
htri_t(* H5SL_try_free_op_t)(void *item, void *key, void *operator_data)
Definition: H5SLprivate.h:65
H5SL_cmp_t
int(* H5SL_cmp_t)(const void *key1, const void *key2)
Definition: H5SLprivate.h:58
H5private.h
H5SL_search
H5_DLL void * H5SL_search(H5SL_t *slist, const void *key)
Definition: H5SL.c:1393
H5SL_create
H5_DLL H5SL_t * H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
Definition: H5SL.c:993