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 * Programmer: Robb Matzke <matzke@llnl.gov> 16 * Thursday, September 18, 1997 17 * 18 * Purpose: This file contains declarations which are visible 19 * only within the H5G package. Source files outside the 20 * H5G package should include H5Gprivate.h instead. 21 */ 22 #if !(defined H5G_FRIEND || defined H5G_MODULE) 23 #error "Do not include this file outside the H5G package!" 24 #endif 25 26 #ifndef _H5Gpkg_H 27 #define _H5Gpkg_H 28 29 /* Get package's private header */ 30 #include "H5Gprivate.h" 31 32 /* Other private headers needed by this file */ 33 #include "H5B2private.h" /* v2 B-trees */ 34 #include "H5FLprivate.h" /* Free Lists */ 35 #include "H5HFprivate.h" /* Fractal heaps */ 36 #include "H5HLprivate.h" /* Local Heaps */ 37 #include "H5Oprivate.h" /* Object headers */ 38 #include "H5SLprivate.h" /* Skip lists */ 39 40 /**************************/ 41 /* Package Private Macros */ 42 /**************************/ 43 44 /* Standard length of fractal heap ID for link */ 45 #define H5G_DENSE_FHEAP_ID_LEN 7 46 47 /* Size of a symbol table node on disk */ 48 #define H5G_NODE_SIZE(f) ( \ 49 /* General metadata fields */ \ 50 H5_SIZEOF_MAGIC \ 51 + 1 /* Version */ \ 52 + 1 /* Reserved */ \ 53 + 2 /* Number of symbols */ \ 54 \ 55 /* Entries */ \ 56 + ((2 * H5F_SYM_LEAF_K(f)) * (unsigned)H5G_SIZEOF_ENTRY_FILE(f)) \ 57 ) 58 59 60 /****************************/ 61 /* Package Private Typedefs */ 62 /****************************/ 63 64 /* 65 * Various types of object header information can be cached in a symbol 66 * table entry (it's normal home is the object header to which the entry 67 * points). This datatype determines what (if anything) is cached in the 68 * symbol table entry. 69 */ 70 typedef enum H5G_cache_type_t { 71 H5G_CACHED_ERROR = -1, /*force enum to be signed */ 72 H5G_NOTHING_CACHED = 0, /*nothing is cached, must be 0 */ 73 H5G_CACHED_STAB = 1, /*symbol table, `stab' */ 74 H5G_CACHED_SLINK = 2, /*symbolic link */ 75 76 H5G_NCACHED /*THIS MUST BE LAST */ 77 } H5G_cache_type_t; 78 79 /* 80 * A symbol table entry caches these parameters from object header 81 * messages... The values are entered into the symbol table when an object 82 * header is created (by hand) and are extracted from the symbol table with a 83 * callback function registered in H5O_init_interface(). Be sure to update 84 * H5G_ent_decode(), H5G_ent_encode(), and H5G__ent_debug() as well. 85 */ 86 typedef union H5G_cache_t { 87 struct { 88 haddr_t btree_addr; /*file address of symbol table B-tree*/ 89 haddr_t heap_addr; /*file address of stab name heap */ 90 } stab; 91 92 struct { 93 size_t lval_offset; /*link value offset */ 94 } slink; 95 } H5G_cache_t; 96 97 /* 98 * A symbol table entry. The two important fields are `name_off' and 99 * `header'. The remaining fields are used for caching information that 100 * also appears in the object header to which this symbol table entry 101 * points. 102 */ 103 struct H5G_entry_t { 104 H5G_cache_type_t type; /*type of information cached */ 105 H5G_cache_t cache; /*cached data from object header */ 106 size_t name_off; /*offset of name within name heap */ 107 haddr_t header; /*file address of object header */ 108 }; 109 110 /* 111 * A symbol table node is a collection of symbol table entries. It can 112 * be thought of as the lowest level of the B-link tree that points to 113 * a collection of symbol table entries that belong to a specific symbol 114 * table or group. 115 */ 116 typedef struct H5G_node_t { 117 H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */ 118 /* first field in structure */ 119 size_t node_size; /* Size of node on disk */ 120 unsigned nsyms; /* Number of symbols */ 121 H5G_entry_t *entry; /* Array of symbol table entries */ 122 } H5G_node_t; 123 124 /* 125 * Shared information for all open group objects 126 */ 127 struct H5G_shared_t { 128 int fo_count; /* open file object count */ 129 hbool_t mounted; /* Group is mount point */ 130 }; 131 132 /* 133 * A group handle passed around through layers of the library within and 134 * above the H5G layer. 135 */ 136 struct H5G_t { 137 H5G_shared_t *shared; /* Shared file object data */ 138 H5O_loc_t oloc; /* Object location for group */ 139 H5G_name_t path; /* Group hierarchy path */ 140 }; 141 142 /* Link iteration operator for internal library callbacks */ 143 typedef herr_t (*H5G_lib_iterate_t)(const H5O_link_t *lnk, void *op_data); 144 145 /* Data structure to hold table of links for a group */ 146 typedef struct { 147 size_t nlinks; /* # of links in table */ 148 H5O_link_t *lnks; /* Pointer to array of links */ 149 } H5G_link_table_t; 150 151 /* 152 * Common data exchange structure for symbol table nodes. This structure is 153 * passed through the B-link tree layer to the methods for the objects 154 * to which the B-link tree points. 155 * 156 * It's also used for B-tree iterators which require no additional info. 157 * 158 */ 159 typedef struct H5G_bt_common_t { 160 /* downward */ 161 const char *name; /*points to temporary memory */ 162 H5HL_t *heap; /*symbol table heap */ 163 } H5G_bt_common_t; 164 165 /* 166 * Data exchange structure for symbol table nodes. This structure is 167 * passed through the B-link tree layer to the insert method for entries. 168 */ 169 typedef struct H5G_bt_ins_t { 170 /* downward */ 171 H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */ 172 const H5O_link_t *lnk; /* Link to insert into table */ 173 H5O_type_t obj_type; /* Type of object being inserted */ 174 const void *crt_info; /* Creation info for object being inserted */ 175 } H5G_bt_ins_t; 176 177 /* 178 * Data exchange structure for symbol table nodes. This structure is 179 * passed through the B-link tree layer to the remove method for entries. 180 */ 181 typedef struct H5G_bt_rm_t { 182 /* downward */ 183 H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */ 184 H5RS_str_t *grp_full_path_r; /* Full path of group where link is removed */ 185 } H5G_bt_rm_t; 186 187 /* Typedef for B-tree 'find' operation */ 188 typedef herr_t (*H5G_bt_find_op_t)(const H5G_entry_t *ent/*in*/, void *operator_data/*in,out*/); 189 190 /* 191 * Data exchange structure for symbol table nodes. This structure is 192 * passed through the B-link tree layer to the 'find' method for entries. 193 */ 194 typedef struct H5G_bt_lkp_t { 195 /* downward */ 196 H5G_bt_common_t common; /* Common info for B-tree user data (must be first) */ 197 H5G_bt_find_op_t op; /* Operator to call when correct entry is found */ 198 void *op_data; /* Data to pass to operator */ 199 200 /* upward */ 201 } H5G_bt_lkp_t; 202 203 /* 204 * Data exchange structure to pass through the B-tree layer for the 205 * H5B_iterate function. 206 */ 207 typedef struct H5G_bt_it_it_t { 208 /* downward */ 209 H5HL_t *heap; /*symbol table heap */ 210 hsize_t skip; /*initial entries to skip */ 211 H5G_lib_iterate_t op; /*iteration operator */ 212 void *op_data; /*user-defined operator data */ 213 214 /* upward */ 215 hsize_t *final_ent; /*final entry looked at */ 216 } H5G_bt_it_it_t; 217 218 /* Data passed through B-tree iteration for copying copy symbol table content */ 219 typedef struct H5G_bt_it_cpy_t { 220 const H5O_loc_t *src_oloc; /* Source object location */ 221 haddr_t src_heap_addr; /* Heap address of the source symbol table */ 222 H5F_t *dst_file; /* File of destination group */ 223 const H5O_stab_t *dst_stab; /* Symbol table message for destination group */ 224 H5O_copy_t *cpy_info; /* Information for copy operation */ 225 } H5G_bt_it_cpy_t; 226 227 /* Common information for "by index" lookups in symbol tables */ 228 typedef struct H5G_bt_it_idx_common_t { 229 /* downward */ 230 hsize_t idx; /* Index of group member to be queried */ 231 hsize_t num_objs; /* The number of objects having been traversed */ 232 H5G_bt_find_op_t op; /* Operator to call when correct entry is found */ 233 } H5G_bt_it_idx_common_t; 234 235 /* Data passed through B-tree iteration for building a table of the links */ 236 typedef struct H5G_bt_it_bt_t { 237 /* downward */ 238 size_t alloc_nlinks; /* Number of links allocated in table */ 239 H5HL_t *heap; /* Symbol table heap */ 240 241 /* upward */ 242 H5G_link_table_t *ltable; /* Link table to add information to */ 243 } H5G_bt_it_bt_t; 244 245 /* Typedefs for "new format" groups */ 246 /* (fractal heap & v2 B-tree info) */ 247 248 /* Typedef for native 'name' field index records in the v2 B-tree */ 249 /* (Keep 'id' field first so generic record handling in callbacks works) */ 250 typedef struct H5G_dense_bt2_name_rec_t { 251 uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID for link */ 252 uint32_t hash; /* Hash of 'name' field value */ 253 } H5G_dense_bt2_name_rec_t; 254 255 /* Typedef for native 'creation order' field index records in the v2 B-tree */ 256 /* (Keep 'id' field first so generic record handling in callbacks works) */ 257 typedef struct H5G_dense_bt2_corder_rec_t { 258 uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID for link */ 259 int64_t corder; /* 'creation order' field value */ 260 } H5G_dense_bt2_corder_rec_t; 261 262 /* 263 * Common data exchange structure for dense link storage. This structure is 264 * passed through the v2 B-tree layer to the methods for the objects 265 * to which the v2 B-tree points. 266 */ 267 typedef struct H5G_bt2_ud_common_t { 268 /* downward */ 269 H5F_t *f; /* Pointer to file that fractal heap is in */ 270 hid_t dxpl_id; /* DXPL for operation */ 271 H5HF_t *fheap; /* Fractal heap handle */ 272 const char *name; /* Name of link to compare */ 273 uint32_t name_hash; /* Hash of name of link to compare */ 274 int64_t corder; /* Creation order value of link to compare */ 275 H5B2_found_t found_op; /* Callback when correct link is found */ 276 void *found_op_data; /* Callback data when correct link is found */ 277 } H5G_bt2_ud_common_t; 278 279 /* 280 * Data exchange structure for dense link storage. This structure is 281 * passed through the v2 B-tree layer when inserting links. 282 */ 283 typedef struct H5G_bt2_ud_ins_t { 284 /* downward */ 285 H5G_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */ 286 uint8_t id[H5G_DENSE_FHEAP_ID_LEN]; /* Heap ID of link to insert */ 287 } H5G_bt2_ud_ins_t; 288 289 /* Typedef for group creation operation */ 290 typedef struct H5G_obj_create_t{ 291 hid_t gcpl_id; /* Group creation property list */ 292 H5G_cache_type_t cache_type; /* Type of symbol table entry cache */ 293 H5G_cache_t cache; /* Cached data for symbol table entry */ 294 } H5G_obj_create_t; 295 296 /* Callback information for copying groups */ 297 typedef struct H5G_copy_file_ud_t { 298 H5O_copy_file_ud_common_t common; /* Shared information (must be first) */ 299 H5G_cache_type_t cache_type; /* Type of symbol table entry cache */ 300 H5G_cache_t cache; /* Cached data for symbol table entry */ 301 } H5G_copy_file_ud_t; 302 303 304 /*****************************/ 305 /* Package Private Variables */ 306 /*****************************/ 307 308 /* 309 * This is the class identifier to give to the B-tree functions. 310 */ 311 H5_DLLVAR H5B_class_t H5B_SNODE[1]; 312 313 /* The v2 B-tree class for indexing 'name' field on links */ 314 H5_DLLVAR const H5B2_class_t H5G_BT2_NAME[1]; 315 316 /* The v2 B-tree class for indexing 'creation order' field on links */ 317 H5_DLLVAR const H5B2_class_t H5G_BT2_CORDER[1]; 318 319 /* Free list for managing H5G_t structs */ 320 H5FL_EXTERN(H5G_t); 321 322 /* Free list for managing H5G_shared_t structs */ 323 H5FL_EXTERN(H5G_shared_t); 324 325 /******************************/ 326 /* Package Private Prototypes */ 327 /******************************/ 328 329 /* 330 * General group routines 331 */ 332 H5_DLL H5G_t *H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info, 333 hid_t dxpl_id); 334 H5_DLL H5G_t *H5G__create_named(const H5G_loc_t *loc, const char *name, 335 hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id); 336 H5_DLL H5G_t *H5G__open_name(const H5G_loc_t *loc, const char *name, 337 hid_t gapl_id, hid_t dxpl_id); 338 339 /* 340 * Group hierarchy traversal routines 341 */ 342 H5_DLL herr_t H5G__traverse_special(const H5G_loc_t *grp_loc, 343 const H5O_link_t *lnk, unsigned target, size_t *nlinks, hbool_t last_comp, 344 H5G_loc_t *obj_loc, hbool_t *obj_exists, hid_t lapl_id, hid_t dxpl_id); 345 346 /* 347 * Utility functions 348 */ 349 H5_DLL const char *H5G__component(const char *name, size_t *size_p); 350 351 /* 352 * Functions that understand symbol tables but not names. The 353 * functions that understand names are exported to the rest of 354 * the library and appear in H5Gprivate.h. 355 */ 356 H5_DLL herr_t H5G__stab_create(H5O_loc_t *grp_oloc, hid_t dxpl_id, 357 const H5O_ginfo_t *ginfo, H5O_stab_t *stab); 358 H5_DLL herr_t H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t dxpl_id); 359 H5_DLL herr_t H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, 360 H5O_link_t *obj_lnk, H5O_type_t obj_type, const void *crt_info, 361 hid_t dxpl_id); 362 H5_DLL herr_t H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, 363 const char *name, H5O_link_t *obj_lnk, H5O_type_t obj_type, 364 const void *crt_info, hid_t dxpl_id); 365 H5_DLL herr_t H5G__stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab); 366 H5_DLL herr_t H5G__stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order, 367 hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data); 368 H5_DLL herr_t H5G__stab_count(struct H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id); 369 H5_DLL herr_t H5G__stab_bh_size(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab, 370 H5_ih_info_t *bh_info); 371 H5_DLL ssize_t H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, 372 hsize_t n, char* name, size_t size, hid_t dxpl_id); 373 H5_DLL herr_t H5G__stab_remove(const H5O_loc_t *oloc, hid_t dxpl_id, 374 H5RS_str_t *grp_full_path_r, const char *name); 375 H5_DLL herr_t H5G__stab_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, 376 H5RS_str_t *grp_full_path_r, H5_iter_order_t order, hsize_t n); 377 H5_DLL herr_t H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, 378 H5O_link_t *lnk, hid_t dxpl_id); 379 H5_DLL herr_t H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, 380 hsize_t n, H5O_link_t *lnk, hid_t dxpl_id); 381 #ifndef H5_STRICT_FORMAT_CHECKS 382 H5_DLL herr_t H5G__stab_valid(H5O_loc_t *grp_oloc, hid_t dxpl_id, 383 H5O_stab_t *alt_stab); 384 #endif /* H5_STRICT_FORMAT_CHECKS */ 385 #ifndef H5_NO_DEPRECATED_SYMBOLS 386 H5_DLL H5G_obj_t H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, 387 hid_t dxpl_id); 388 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 389 390 391 /* 392 * Functions that understand symbol table entries. 393 */ 394 H5_DLL void H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, 395 H5_copy_depth_t depth); 396 H5_DLL void H5G__ent_reset(H5G_entry_t *ent); 397 H5_DLL herr_t H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, 398 H5G_entry_t *ent, unsigned n); 399 H5_DLL herr_t H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, 400 const H5G_entry_t *ent, unsigned n); 401 H5_DLL herr_t H5G__ent_convert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, 402 const char *name, const H5O_link_t *lnk, H5O_type_t obj_type, 403 const void *crt_info, H5G_entry_t *ent); 404 H5_DLL herr_t H5G__ent_debug(const H5G_entry_t *ent, FILE * stream, int indent, 405 int fwidth, const H5HL_t *heap); 406 407 /* Functions that understand symbol table nodes */ 408 H5_DLL herr_t H5G__node_init(H5F_t *f); 409 H5_DLL int H5G__node_iterate(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 410 const void *_rt_key, void *_udata); 411 H5_DLL int H5G__node_sumup(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 412 const void *_rt_key, void *_udata); 413 H5_DLL int H5G__node_by_idx(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 414 const void *_rt_key, void *_udata); 415 H5_DLL int H5G__node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 416 const void *_rt_key, void *_udata); 417 H5_DLL int H5G__node_build_table(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 418 const void *_rt_key, void *_udata); 419 H5_DLL herr_t H5G__node_iterate_size(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr, 420 const void *_rt_key, void *_udata); 421 H5_DLL herr_t H5G__node_free(H5G_node_t *sym); 422 423 /* Functions that understand links in groups */ 424 H5_DLL herr_t H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, 425 const H5G_entry_t *ent, const char *name); 426 H5_DLL herr_t H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, 427 H5G_loc_t *obj_loc); 428 H5_DLL herr_t H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type, 429 H5_iter_order_t order); 430 H5_DLL herr_t H5G__link_iterate_table(const H5G_link_table_t *ltable, 431 hsize_t skip, hsize_t *last_lnk, const H5G_lib_iterate_t op, void *op_data); 432 H5_DLL herr_t H5G__link_release_table(H5G_link_table_t *ltable); 433 H5_DLL herr_t H5G__link_name_replace(H5F_t *file, hid_t dxpl_id, 434 H5RS_str_t *grp_full_path_r, const H5O_link_t *lnk); 435 436 /* Functions that understand "compact" link storage */ 437 H5_DLL herr_t H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk, 438 hid_t dxpl_id); 439 H5_DLL ssize_t H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, 440 const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, 441 hsize_t idx, char *name, size_t size); 442 H5_DLL herr_t H5G__compact_remove(const H5O_loc_t *oloc, hid_t dxpl_id, 443 H5RS_str_t *grp_full_path_r, const char *name); 444 H5_DLL herr_t H5G__compact_remove_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, 445 const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type, 446 H5_iter_order_t order, hsize_t n); 447 H5_DLL herr_t H5G__compact_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, 448 const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, 449 hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data); 450 H5_DLL htri_t H5G__compact_lookup(const H5O_loc_t *grp_oloc, const char *name, 451 H5O_link_t *lnk, hid_t dxpl_id); 452 H5_DLL herr_t H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, hid_t dxpl_id, 453 const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, 454 hsize_t n, H5O_link_t *lnk); 455 #ifndef H5_NO_DEPRECATED_SYMBOLS 456 H5_DLL H5G_obj_t H5G__compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, 457 const H5O_linfo_t *linfo, hsize_t idx); 458 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 459 460 /* Functions that understand "dense" link storage */ 461 H5_DLL herr_t H5G__dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, 462 H5_index_t idx_type, H5_iter_order_t order, H5G_link_table_t *ltable); 463 H5_DLL herr_t H5G__dense_create(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, 464 const H5O_pline_t *pline); 465 H5_DLL herr_t H5G__dense_insert(H5F_t *f, hid_t dxpl_id, 466 const H5O_linfo_t *linfo, const H5O_link_t *lnk); 467 H5_DLL htri_t H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, 468 const H5O_linfo_t *linfo, const char *name, H5O_link_t *lnk); 469 H5_DLL herr_t H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, 470 const H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, 471 hsize_t n, H5O_link_t *lnk); 472 H5_DLL herr_t H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, 473 H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, 474 H5G_lib_iterate_t op, void *op_data); 475 H5_DLL ssize_t H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, 476 H5O_linfo_t *linfo, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, 477 char *name, size_t size); 478 H5_DLL herr_t H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo, 479 H5RS_str_t *grp_full_path_r, const char *name); 480 H5_DLL herr_t H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, 481 const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_r, H5_index_t idx_type, 482 H5_iter_order_t order, hsize_t n); 483 H5_DLL herr_t H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, 484 hbool_t adj_link); 485 #ifndef H5_NO_DEPRECATED_SYMBOLS 486 H5_DLL H5G_obj_t H5G__dense_get_type_by_idx(H5F_t *f, hid_t dxpl_id, 487 H5O_linfo_t *linfo, hsize_t idx); 488 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 489 490 /* Functions that understand group objects */ 491 H5_DLL herr_t H5G__obj_create(H5F_t *f, hid_t dxpl_id, 492 H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc/*out*/); 493 H5_DLL herr_t H5G__obj_create_real(H5F_t *f, hid_t dxpl_id, 494 const H5O_ginfo_t *ginfo, const H5O_linfo_t *linfo, 495 const H5O_pline_t *pline, H5G_obj_create_t *gcrt_info, 496 H5O_loc_t *oloc/*out*/); 497 H5_DLL htri_t H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, 498 hid_t dxpl_id); 499 H5_DLL herr_t H5G__obj_iterate(const H5O_loc_t *grp_oloc, 500 H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, 501 H5G_lib_iterate_t op, void *op_data, hid_t dxpl_id); 502 H5_DLL herr_t H5G__obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id); 503 H5_DLL htri_t H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, 504 H5O_link_t *lnk, hid_t dxpl_id); 505 506 /* 507 * These functions operate on group hierarchy names. 508 */ 509 H5_DLL herr_t H5G__name_init(H5G_name_t *name, const char *path); 510 511 /* 512 * These functions operate on group "locations" 513 */ 514 H5_DLL herr_t H5G__loc_insert(H5G_loc_t *grp_loc, const char *name, 515 H5G_loc_t *obj_loc, H5O_type_t obj_type, const void *crt_info, hid_t dxpl_id); 516 517 /* Testing functions */ 518 #ifdef H5G_TESTING 519 H5_DLL htri_t H5G__is_empty_test(hid_t gid); 520 H5_DLL htri_t H5G__has_links_test(hid_t gid, unsigned *nmsgs); 521 H5_DLL htri_t H5G__has_stab_test(hid_t gid); 522 H5_DLL htri_t H5G__is_new_dense_test(hid_t gid); 523 H5_DLL herr_t H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count); 524 H5_DLL herr_t H5G__lheap_size_test(hid_t gid, size_t *lheap_size); 525 H5_DLL herr_t H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *user_path_hidden); 526 H5_DLL herr_t H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent); 527 H5_DLL herr_t H5G__verify_cached_stabs_test(hid_t gid); 528 #endif /* H5G_TESTING */ 529 530 #endif /* _H5Gpkg_H */ 531 532