H5SLprivate.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * This file contains private information about the H5SL module
00018  */
00019 #ifndef _H5SLprivate_H
00020 #define _H5SLprivate_H
00021 
00022 /**************************************/
00023 /* Public headers needed by this file */
00024 /**************************************/
00025 #ifdef LATER
00026 #include "H5SLpublic.h"
00027 #endif /* LATER */
00028 
00029 /***************************************/
00030 /* Private headers needed by this file */
00031 /***************************************/
00032 #include "H5private.h"
00033 
00034 /************/
00035 /* Typedefs */
00036 /************/
00037 
00038 /* Typedefs for skip list struct (defined in H5SL.c) */
00039 typedef struct H5SL_t H5SL_t;
00040 typedef struct H5SL_node_t H5SL_node_t;
00041 
00042 /* Typedef for kinds of skip lists supported */
00043 typedef enum {
00044     H5SL_TYPE_INT,      /* Skip list keys are 'int's */
00045     H5SL_TYPE_HADDR,    /* Skip list keys are 'haddr_t's */
00046     H5SL_TYPE_STR,      /* Skip list keys are 'char *'s (ie. strings) */
00047     H5SL_TYPE_HSIZE,    /* Skip list keys are 'hsize_t's */
00048     H5SL_TYPE_UNSIGNED, /* Skip list keys are 'unsigned's */
00049     H5SL_TYPE_SIZE,     /* Skip list keys are 'size_t's */
00050     H5SL_TYPE_OBJ       /* Skip list keys are 'H5_obj_t's */
00051 } H5SL_type_t;
00052 
00053 /**********/
00054 /* Macros */
00055 /**********/
00056 
00057 /* Typedef for iteration operations */
00058 typedef herr_t (*H5SL_operator_t)(void *item, void *key,
00059     void *operator_data/*in,out*/);
00060 
00061 /********************/
00062 /* Private routines */
00063 /********************/
00064 H5_DLL H5SL_t *H5SL_create(H5SL_type_t type);
00065 H5_DLL size_t H5SL_count(H5SL_t *slist);
00066 H5_DLL herr_t H5SL_insert(H5SL_t *slist, void *item, const void *key);
00067 H5_DLL H5SL_node_t *H5SL_add(H5SL_t *slist, void *item, const void *key);
00068 H5_DLL void *H5SL_remove(H5SL_t *slist, const void *key);
00069 H5_DLL void *H5SL_remove_first(H5SL_t *slist);
00070 H5_DLL void *H5SL_search(H5SL_t *slist, const void *key);
00071 H5_DLL void *H5SL_less(H5SL_t *slist, const void *key);
00072 H5_DLL void *H5SL_greater(H5SL_t *slist, const void *key);
00073 H5_DLL H5SL_node_t *H5SL_find(H5SL_t *slist, const void *key);
00074 H5_DLL H5SL_node_t *H5SL_below(H5SL_t *slist, const void *key);
00075 H5_DLL H5SL_node_t *H5SL_above(H5SL_t *slist, const void *key);
00076 H5_DLL H5SL_node_t *H5SL_first(H5SL_t *slist);
00077 H5_DLL H5SL_node_t *H5SL_next(H5SL_node_t *slist_node);
00078 H5_DLL H5SL_node_t *H5SL_prev(H5SL_node_t *slist_node);
00079 H5_DLL H5SL_node_t *H5SL_last(H5SL_t *slist);
00080 H5_DLL void *H5SL_item(H5SL_node_t *slist_node);
00081 H5_DLL herr_t H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data);
00082 H5_DLL herr_t H5SL_release(H5SL_t *slist);
00083 H5_DLL herr_t H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data);
00084 H5_DLL herr_t H5SL_close(H5SL_t *slist);
00085 H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data);
00086 H5_DLL int H5SL_term_interface(void);
00087 
00088 #endif /* _H5SLprivate_H */
00089