00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 #ifndef _H5B2private_H
00028 #define _H5B2private_H
00029 
00030 
00031 #include "H5B2public.h"
00032 
00033 
00034 #include "H5Fprivate.h"         
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 typedef enum H5B2_subid_t {
00047     H5B2_TEST_ID         = 0,   
00048     H5B2_FHEAP_HUGE_INDIR_ID,   
00049     H5B2_FHEAP_HUGE_FILT_INDIR_ID, 
00050     H5B2_FHEAP_HUGE_DIR_ID,     
00051     H5B2_FHEAP_HUGE_FILT_DIR_ID, 
00052     H5B2_GRP_DENSE_NAME_ID,     
00053     H5B2_GRP_DENSE_CORDER_ID,   
00054     H5B2_SOHM_INDEX_ID,         
00055     H5B2_ATTR_DENSE_NAME_ID,    
00056     H5B2_ATTR_DENSE_CORDER_ID,  
00057     H5B2_NUM_BTREE_ID           
00058 } H5B2_subid_t;
00059 
00060 
00061 typedef int (*H5B2_operator_t)(const void *record, void *op_data);
00062 
00063 
00064 typedef herr_t (*H5B2_found_t)(const void *record, void *op_data);
00065 
00066 
00067 typedef herr_t (*H5B2_modify_t)(void *record, void *op_data, hbool_t *changed);
00068 
00069 
00070 typedef herr_t (*H5B2_remove_t)(const void *record, void *op_data);
00071 
00072 
00073 typedef enum H5B2_compare_t {
00074     H5B2_COMPARE_LESS,            
00075     H5B2_COMPARE_GREATER          
00076 } H5B2_compare_t;
00077 
00078 
00079 
00080 
00081 
00082 typedef struct H5B2_class_t H5B2_class_t;
00083 struct H5B2_class_t {
00084     H5B2_subid_t id;            
00085     size_t nrec_size;           
00086 
00087     
00088     herr_t (*store)(void *nrecord, const void *udata);                  
00089     herr_t (*retrieve)(void *udata, const void *nrecord);               
00090 
00091     
00092     herr_t (*compare)(const void *rec1, const void *rec2);              
00093 
00094     
00095     herr_t (*encode)(const H5F_t *f, uint8_t *raw, const void *record); 
00096     herr_t (*decode)(const H5F_t *f, const uint8_t *raw, void *record); 
00097 
00098     
00099     herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id,        
00100         int indent, int fwidth, const void *record,
00101         const void *udata);
00102 };
00103 
00104 
00105 typedef struct H5B2_stat_t {
00106     unsigned depth;             
00107     hsize_t nrecords;          
00108 } H5B2_stat_t;
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 H5_DLL herr_t H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00118     size_t node_size, size_t rrec_size,
00119     unsigned split_percent, unsigned merge_percent,
00120     haddr_t *addr_p);
00121 H5_DLL herr_t H5B2_insert(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00122     haddr_t addr, void *udata);
00123 H5_DLL herr_t H5B2_iterate(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00124     haddr_t addr, H5B2_operator_t op, void *op_data);
00125 H5_DLL herr_t H5B2_iterate_size(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00126     haddr_t addr, hsize_t *op_data);
00127 H5_DLL htri_t H5B2_find(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00128     haddr_t addr, void *udata, H5B2_found_t op, void *op_data);
00129 H5_DLL herr_t H5B2_index(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00130     haddr_t addr, H5_iter_order_t order, hsize_t idx, H5B2_found_t op,
00131     void *op_data);
00132 H5_DLL herr_t H5B2_neighbor(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00133     haddr_t addr, H5B2_compare_t comp, void *udata, H5B2_found_t op,
00134     void *op_data);
00135 H5_DLL herr_t H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00136     haddr_t addr, void *udata, H5B2_modify_t op, void *op_data);
00137 H5_DLL herr_t H5B2_remove(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00138     haddr_t addr, void *udata, H5B2_remove_t op, void *op_data);
00139 H5_DLL herr_t H5B2_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00140     haddr_t addr, H5_iter_order_t order, hsize_t idx, H5B2_remove_t op,
00141     void *op_data);
00142 H5_DLL herr_t H5B2_get_nrec(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00143     haddr_t addr, hsize_t *nrec);
00144 H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00145     haddr_t addr, H5B2_remove_t op, void *op_data);
00146 
00147 
00148 H5_DLL herr_t H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
00149     haddr_t addr, H5B2_stat_t *info);
00150 
00151 #endif 
00152