H5HPprivate.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 H5HP module
00018  */
00019 #ifndef _H5HPprivate_H
00020 #define _H5HPprivate_H
00021 
00022 /**************************************/
00023 /* Public headers needed by this file */
00024 /**************************************/
00025 #ifdef LATER
00026 #include "H5HPpublic.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 /* Typedef for heap struct (defined in H5HP.c) */
00039 typedef struct H5HP_t H5HP_t;
00040 
00041 /* Typedef for objects which can be inserted into heaps */
00042 /* This _must_ be the first field in objects which can be inserted into heaps */
00043 typedef struct H5HP_info_t {
00044     size_t heap_loc;                    /* Location of object in heap */
00045 }H5HP_info_t;
00046 
00047 /* Typedef for type of heap to create */
00048 typedef enum {
00049     H5HP_MIN_HEAP,      /* Minimum values in heap are at the "top" */
00050     H5HP_MAX_HEAP       /* Maximum values in heap are at the "top" */
00051 } H5HP_type_t;
00052 
00053 /**********/
00054 /* Macros */
00055 /**********/
00056 
00057 /********************/
00058 /* Private routines */
00059 /********************/
00060 H5_DLL H5HP_t *H5HP_create(H5HP_type_t heap_type);
00061 H5_DLL herr_t H5HP_insert(H5HP_t *heap, int val, void *obj);
00062 H5_DLL ssize_t H5HP_count(const H5HP_t *heap);
00063 H5_DLL herr_t H5HP_top(const H5HP_t *heap, int *val);
00064 H5_DLL herr_t H5HP_remove(H5HP_t *heap, int *val, void **ptr);
00065 H5_DLL herr_t H5HP_change(H5HP_t *heap, int val, void *obj);
00066 H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj);
00067 H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj);
00068 H5_DLL herr_t H5HP_close(H5HP_t *heap);
00069 
00070 #endif /* _H5HPprivate_H */
00071