diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2018-12-12 19:39:14 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2018-12-12 23:26:08 (GMT) |
commit | ea7332525010ef75e27ce5800cf65dd91ba43576 (patch) | |
tree | 19f440d677555c016dacc4a2cd28aaa80961e350 /src/H5Opkg.h | |
parent | 496de6922fb13aa11a5c5efe56a3f8de157a77ad (diff) | |
parent | 6f52793adcd5a14aa63731e3c33c9737b5a04d16 (diff) | |
download | hdf5-ea7332525010ef75e27ce5800cf65dd91ba43576.zip hdf5-ea7332525010ef75e27ce5800cf65dd91ba43576.tar.gz hdf5-ea7332525010ef75e27ce5800cf65dd91ba43576.tar.bz2 |
Merge branch 'develop' into dset_ohdr_minimize
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r-- | src/H5Opkg.h | 76 |
1 files changed, 28 insertions, 48 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 616f96b..dbc8089 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -63,7 +63,7 @@ ) #define H5O_ALIGN_OH(O, X) \ H5O_ALIGN_VERS((O)->version, X) -#define H5O_ALIGN_F(F, X) \ +#define H5O_ALIGN_F(F, X) \ H5O_ALIGN_VERS(MAX(H5O_VERSION_1, (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(F)]), X) /* Size of checksum (on disk) */ @@ -339,7 +339,7 @@ typedef struct H5O_obj_class_t { void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */ void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */ htri_t (*isa)(const H5O_t *); /*if a header matches an object class */ - hid_t (*open)(const H5G_loc_t *, hbool_t ); /*open an object of this class */ + void *(*open)(const H5G_loc_t *, H5I_type_t *); /*open an object of this class */ void *(*create)(H5F_t *, void *, H5G_loc_t *); /*create an object of this class */ H5O_loc_t *(*get_oloc)(hid_t ); /*get the object header location for an object */ herr_t (*bh_info)(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info); /*get the index & heap info for an object */ @@ -414,7 +414,6 @@ typedef struct H5O_chk_cache_ud_t { H5O_common_cache_ud_t common; /* Common object header cache callback info */ } H5O_chk_cache_ud_t; - /* Header message ID to class mapping */ H5_DLLVAR const H5O_msg_class_t *const H5O_msg_class_g[H5O_MSG_TYPES]; @@ -555,26 +554,11 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1]; H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1]; /* Package-local function prototypes */ -H5_DLL hid_t H5O__open_name(const H5G_loc_t *loc, const char *name); -H5_DLL hid_t H5O__open_by_idx(const H5G_loc_t *loc, const char *name, - H5_index_t idx_type, H5_iter_order_t order, hsize_t n); -H5_DLL hid_t H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr); -H5_DLL hid_t H5O__open_by_loc(const H5G_loc_t *obj_loc, hbool_t app_ref); -H5_DLL herr_t H5O__create_link(const H5G_loc_t *new_loc, const char *new_name, - H5G_loc_t *obj_loc, hid_t lcpl_id); H5_DLL const H5O_obj_class_t *H5O__obj_class(const H5O_loc_t *loc); H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted); -H5_DLL herr_t H5O__link(const H5O_loc_t *loc, int adjust); -H5_DLL htri_t H5O__exists_by_name(const H5G_loc_t *loc, const char *name); -H5_DLL herr_t H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, - H5O_info_t *oinfo, unsigned fields); H5_DLL herr_t H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields); -H5_DLL herr_t H5O__set_comment_by_name(const H5G_loc_t *loc, const char *name, - const char *comment); -H5_DLL ssize_t H5O__get_comment_by_name(const H5G_loc_t *loc, const char *name, - char *comment, size_t bufsize); -H5_DLL herr_t H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type, +H5_DLL herr_t H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields); H5_DLL herr_t H5O__inc_rc(H5O_t *oh); H5_DLL herr_t H5O__dec_rc(H5O_t *oh); @@ -587,9 +571,8 @@ H5_DLL herr_t H5O__msg_append_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *t unsigned mesg_flags, unsigned update_flags, void *mesg); H5_DLL herr_t H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags, void *mesg); -H5_DLL void *H5O__msg_free_real(const H5O_msg_class_t *type, void *mesg); H5_DLL herr_t H5O__msg_free_mesg(H5O_mesg_t *mesg); -H5_DLL unsigned H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type); +H5_DLL unsigned H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type); H5_DLL herr_t H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence, H5O_operator_t op, void *op_data, hbool_t adj_link); H5_DLL void *H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, @@ -597,17 +580,15 @@ H5_DLL void *H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata); H5_DLL herr_t H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5O_mesg_operator_t *op, void *op_data); -H5_DLL herr_t H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg); -H5_DLL herr_t H5O_flush_msgs(H5F_t *f, H5O_t *oh); +H5_DLL herr_t H5O__flush_msgs(H5F_t *f, H5O_t *oh); H5_DLL herr_t H5O__delete_mesg(H5F_t *f, H5O_t *open_oh, H5O_mesg_t *mesg); /* Object header chunk routines */ H5_DLL herr_t H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno); H5_DLL H5O_chunk_proxy_t *H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx); -H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, - hbool_t chk_dirtied); +H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t chk_dirtied); H5_DLL herr_t H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx); -H5_DLL herr_t H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy); +H5_DLL herr_t H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy); H5_DLL herr_t H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx); H5_DLL herr_t H5O__chunk_dest(H5O_chunk_proxy_t *chunk_proxy); @@ -615,20 +596,20 @@ H5_DLL herr_t H5O__chunk_dest(H5O_chunk_proxy_t *chunk_proxy); H5_DLL herr_t H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info); /* Object header allocation routines */ -H5_DLL herr_t H5O_alloc_msgs(H5O_t *oh, size_t min_alloc); +H5_DLL herr_t H5O__alloc_msgs(H5O_t *oh, size_t min_alloc); H5_DLL herr_t H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_msg_alloc_info_t *found_msg, size_t *new_idx); H5_DLL herr_t H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, size_t *mesg_idx); -H5_DLL herr_t H5O_condense_header(H5F_t *f, H5O_t *oh); -H5_DLL herr_t H5O_release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, +H5_DLL herr_t H5O__condense_header(H5F_t *f, H5O_t *oh); +H5_DLL herr_t H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link); /* Shared object operators */ -H5_DLL void * H5O_shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, +H5_DLL void * H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *buf, const H5O_msg_class_t *type); -H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg); -H5_DLL size_t H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg); +H5_DLL herr_t H5O__shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg); +H5_DLL size_t H5O__shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg); H5_DLL herr_t H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *mesg_type, H5O_shared_t *sh_mesg); H5_DLL herr_t H5O__shared_link(H5F_t *f, H5O_t *open_oh, @@ -640,17 +621,18 @@ H5_DLL herr_t H5O__shared_copy_file(H5F_t *file_src, H5F_t *file_dst, H5_DLL herr_t H5O__shared_post_copy_file (H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O_shared_t *shared_src, H5O_shared_t *shared_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info); -H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, +H5_DLL herr_t H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth); /* Attribute message operators */ H5_DLL herr_t H5O__attr_reset(void *_mesg); H5_DLL herr_t H5O__attr_delete(H5F_t *f, H5O_t *open_oh, void *_mesg); H5_DLL herr_t H5O__attr_link(H5F_t *f, H5O_t *open_oh, void *_mesg); -H5_DLL herr_t H5O_attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs); +H5_DLL herr_t H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs); /* Arrays of versions for: - Object header, Attribute/Fill value/Filter pipeline messages */ + * Object header, Attribute/Fill value/Filter pipeline messages + */ /* Layout/Datatype/Dataspace arrays of versions are in H5Dpkg.h, H5Tpkg.h and H5Spkg.h */ H5_DLLVAR const unsigned H5O_obj_ver_bounds[H5F_LIBVER_NBOUNDS]; H5_DLLVAR const unsigned H5O_attr_ver_bounds[H5F_LIBVER_NBOUNDS]; @@ -659,24 +641,22 @@ H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS]; /* Testing functions */ #ifdef H5O_TESTING -H5_DLL htri_t H5O_is_attr_empty_test(hid_t oid); -H5_DLL htri_t H5O_is_attr_dense_test(hid_t oid); -H5_DLL herr_t H5O_num_attrs_test(hid_t oid, hsize_t *nattrs); -H5_DLL herr_t H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count); -H5_DLL herr_t H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val); -H5_DLL herr_t H5O_expunge_chunks_test(const H5O_loc_t *oloc); -H5_DLL herr_t H5O_get_rc(const H5O_loc_t *oloc, unsigned *rc); -H5_DLL herr_t H5O_msg_get_chunkno_test(hid_t oid, unsigned msg_type, - unsigned *chunk_num); -H5_DLL herr_t H5O_msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type); +H5_DLL htri_t H5O__is_attr_empty_test(hid_t oid); +H5_DLL htri_t H5O__is_attr_dense_test(hid_t oid); +H5_DLL herr_t H5O__num_attrs_test(hid_t oid, hsize_t *nattrs); +H5_DLL herr_t H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count); +H5_DLL herr_t H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val); +H5_DLL herr_t H5O__expunge_chunks_test(const H5O_loc_t *oloc); +H5_DLL herr_t H5O__get_rc_test(const H5O_loc_t *oloc, unsigned *rc); +H5_DLL herr_t H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num); +H5_DLL herr_t H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type); #endif /* H5O_TESTING */ /* Object header debugging routines */ #ifdef H5O_DEBUG -H5_DLL herr_t H5O_assert(const H5O_t *oh); +H5_DLL herr_t H5O__assert(const H5O_t *oh); #endif /* H5O_DEBUG */ -H5_DLL herr_t H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, - int indent, int fwidth); +H5_DLL herr_t H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth); #endif /* _H5Opkg_H */ |