summaryrefslogtreecommitdiffstats
path: root/src/H5HPprivate.h
blob: 2c16ffeae8ef5873a14819eec98435470681cde0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have     *
 * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*
 * This file contains private information about the H5HP module
 */
#ifndef _H5HPprivate_H
#define _H5HPprivate_H

/**************************************/
/* Public headers needed by this file */
/**************************************/
#ifdef LATER
#include "H5HPpublic.h"
#endif /* LATER */

/***************************************/
/* Private headers needed by this file */
/***************************************/
#include "H5private.h"

/************/
/* Typedefs */
/************/

/* Typedef for heap struct (defined in H5HP.c) */
typedef struct H5HP_t H5HP_t;

/* Typedef for objects which can be inserted into heaps */
/* This _must_ be the first field in objects which can be inserted into heaps */
typedef struct H5HP_info_t {
    size_t heap_loc;                    /* Location of object in heap */
}H5HP_info_t;

/* Typedef for type of heap to create */
typedef enum {
    H5HP_MIN_HEAP,      /* Minimum values in heap are at the "top" */
    H5HP_MAX_HEAP       /* Maximum values in heap are at the "top" */
} H5HP_type_t;

/**********/
/* Macros */
/**********/

/********************/
/* Private routines */
/********************/
H5_DLL H5HP_t *H5HP_create(H5HP_type_t heap_type);
H5_DLL herr_t H5HP_insert(H5HP_t *heap, int val, void *obj);
H5_DLL ssize_t H5HP_count(const H5HP_t *heap);
H5_DLL herr_t H5HP_top(const H5HP_t *heap, int *val);
H5_DLL herr_t H5HP_remove(H5HP_t *heap, int *val, void **ptr);
H5_DLL herr_t H5HP_change(H5HP_t *heap, int val, void *obj);
H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj);
H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj);
H5_DLL herr_t H5HP_close(H5HP_t *heap);

#endif /* _H5HPprivate_H */