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 H5ST module 00018 */ 00019 #ifndef _H5STprivate_H 00020 #define _H5STprivate_H 00021 00022 #ifdef LATER 00023 #include "H5STpublic.h" 00024 #endif /* LATER */ 00025 00026 /* Private headers needed by this file */ 00027 #include "H5private.h" 00028 00029 /* Typedefs */ 00030 00031 /* Internal nodes for TST */ 00032 typedef struct H5ST_node *H5ST_ptr_t; 00033 typedef struct H5ST_node { 00034 char splitchar; /* Character represented at node */ 00035 H5ST_ptr_t up; /* Pointer to the node in the tree above (before) this node */ 00036 H5ST_ptr_t parent; /* Pointer to the next higher tree node in this tree */ 00037 H5ST_ptr_t lokid; /* Pointer to the lower node from this one, in this tree */ 00038 H5ST_ptr_t eqkid; /* Pointer to the parent node in the next tree down (after) this node */ 00039 H5ST_ptr_t hikid; /* Pointer to the higher node from this one, in this tree */ 00040 } H5ST_node_t; 00041 00042 /* Wrapper about TST */ 00043 typedef struct { 00044 H5ST_ptr_t root; /* Pointer to actual TST */ 00045 } H5ST_tree_t; 00046 00047 /* Macro to access "data" pointer in H5ST_node_t's returned from functions */ 00048 #define H5ST_NODE_DATA(p) ((void *)(p->eqkid)) 00049 00050 /* Private routines */ 00051 H5_DLL H5ST_tree_t *H5ST_create(void); 00052 H5_DLL herr_t H5ST_close(H5ST_tree_t *p); 00053 H5_DLL herr_t H5ST_insert(H5ST_tree_t *root, const char *s, void *obj); 00054 H5_DLL htri_t H5ST_search(H5ST_tree_t *root, const char *s); 00055 H5_DLL H5ST_ptr_t H5ST_find(H5ST_tree_t *root, const char *s); 00056 H5_DLL void *H5ST_locate(H5ST_tree_t *root, const char *s); 00057 H5_DLL H5ST_ptr_t H5ST_findfirst(H5ST_tree_t *p); 00058 H5_DLL H5ST_ptr_t H5ST_findnext(H5ST_ptr_t p); 00059 H5_DLL void *H5ST_remove(H5ST_tree_t *root, const char *s); 00060 H5_DLL herr_t H5ST_delete(H5ST_tree_t *root, H5ST_ptr_t p); 00061 H5_DLL herr_t H5ST_dump(H5ST_ptr_t p); 00062 00063 #endif /* _H5STprivate_H */ 00064