HDF5  1.12.0
H5STprivate.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 H5ST module
16  */
17 #ifndef _H5STprivate_H
18 #define _H5STprivate_H
19 
20 #ifdef LATER
21 #include "H5STpublic.h"
22 #endif /* LATER */
23 
24 /* Private headers needed by this file */
25 #include "H5private.h"
26 
27 /* Typedefs */
28 
29 /* Internal nodes for TST */
30 typedef struct H5ST_node *H5ST_ptr_t;
31 typedef struct H5ST_node {
32  char splitchar; /* Character represented at node */
33  H5ST_ptr_t up; /* Pointer to the node in the tree above (before) this node */
34  H5ST_ptr_t parent; /* Pointer to the next higher tree node in this tree */
35  H5ST_ptr_t lokid; /* Pointer to the lower node from this one, in this tree */
36  H5ST_ptr_t eqkid; /* Pointer to the parent node in the next tree down (after) this node */
37  H5ST_ptr_t hikid; /* Pointer to the higher node from this one, in this tree */
39 
40 /* Wrapper about TST */
41 typedef struct {
42  H5ST_ptr_t root; /* Pointer to actual TST */
43 } H5ST_tree_t;
44 
45 /* Macro to access "data" pointer in H5ST_node_t's returned from functions */
46 #define H5ST_NODE_DATA(p) ((void *)(p->eqkid))
47 
48 /* Private routines */
51 H5_DLL herr_t H5ST_insert(H5ST_tree_t *root, const char *s, void *obj);
52 H5_DLL htri_t H5ST_search(H5ST_tree_t *root, const char *s);
53 H5_DLL H5ST_ptr_t H5ST_find(H5ST_tree_t *root, const char *s);
54 H5_DLL void *H5ST_locate(H5ST_tree_t *root, const char *s);
57 H5_DLL void *H5ST_remove(H5ST_tree_t *root, const char *s);
59 #ifdef H5ST_DEBUG
60 H5_DLL herr_t H5ST_dump(H5ST_tree_t *tree);
61 #endif /* H5ST_DEBUG */
62 
63 #endif /* _H5STprivate_H */
64 
H5ST_node
Definition: H5STprivate.h:31
H5ST_insert
H5_DLL herr_t H5ST_insert(H5ST_tree_t *root, const char *s, void *obj)
Definition: H5ST.c:169
H5ST_tree_t::root
H5ST_ptr_t root
Definition: H5STprivate.h:42
H5ST_find
H5_DLL H5ST_ptr_t H5ST_find(H5ST_tree_t *root, const char *s)
Definition: H5ST.c:335
H5ST_tree_t
Definition: H5STprivate.h:41
H5ST_close
H5_DLL herr_t H5ST_close(H5ST_tree_t *p)
Definition: H5ST.c:126
H5ST_search
H5_DLL htri_t H5ST_search(H5ST_tree_t *root, const char *s)
Definition: H5ST.c:247
H5ST_node_t
struct H5ST_node H5ST_node_t
htri_t
int htri_t
Definition: H5public.h:160
H5ST_findnext
H5_DLL H5ST_ptr_t H5ST_findnext(H5ST_ptr_t p)
Definition: H5ST.c:544
H5ST_delete
H5_DLL herr_t H5ST_delete(H5ST_tree_t *root, H5ST_ptr_t p)
Definition: H5ST.c:664
H5ST_findfirst
H5_DLL H5ST_ptr_t H5ST_findfirst(H5ST_tree_t *p)
Definition: H5ST.c:453
H5ST_node::up
H5ST_ptr_t up
Definition: H5STprivate.h:33
H5ST_node::hikid
H5ST_ptr_t hikid
Definition: H5STprivate.h:37
H5ST_node::lokid
H5ST_ptr_t lokid
Definition: H5STprivate.h:35
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5ST_remove
H5_DLL void * H5ST_remove(H5ST_tree_t *root, const char *s)
Definition: H5ST.c:698
H5ST_node::eqkid
H5ST_ptr_t eqkid
Definition: H5STprivate.h:36
H5ST_node::parent
H5ST_ptr_t parent
Definition: H5STprivate.h:34
H5ST_locate
H5_DLL void * H5ST_locate(H5ST_tree_t *root, const char *s)
Definition: H5ST.c:369
H5ST_node::splitchar
char splitchar
Definition: H5STprivate.h:32
herr_t
int herr_t
Definition: H5public.h:128
H5ST_create
H5_DLL H5ST_tree_t * H5ST_create(void)
Definition: H5ST.c:53
H5private.h
H5ST_ptr_t
struct H5ST_node * H5ST_ptr_t
Definition: H5STprivate.h:30