diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2019-10-29 19:38:50 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2019-11-08 21:14:33 (GMT) |
commit | 1dbec40d465072540f8507c524ae7b909a6b1cf0 (patch) | |
tree | 111dd9bb4925da3be08a4a5ae63f7bffb16d6ee0 /src/H5Tpkg.h | |
parent | afd4b291315e39e3966eadaf8ae9894b30e9504e (diff) | |
download | hdf5-1dbec40d465072540f8507c524ae7b909a6b1cf0.zip hdf5-1dbec40d465072540f8507c524ae7b909a6b1cf0.tar.gz hdf5-1dbec40d465072540f8507c524ae7b909a6b1cf0.tar.bz2 |
Implement H5VLget_file_type() to return a copy of a datatype with the
location set to be in a file. Only meant to be used by VOL connectors.
Implement H5VLpeek_connector_id() to support connectors querying their
own IDs. Fix app_ref with connector IDs in a couple places (external
VOLs registered as default through ENV should be visible to the
application). Modify vlen and reference interfaces to work with
arbitrary VOL connectors. Implement file "post open" specific
callback, to enable connectors to update their file structs after a
wrap context has been set.
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r-- | src/H5Tpkg.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 9784abd..1dbc229 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -40,6 +40,7 @@ #include "H5Fprivate.h" /* Files */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Oprivate.h" /* Object headers */ +#include "H5VLprivate.h" /* Virtual Object Layer */ /* Other public headers needed by this file */ #include "H5Spublic.h" /* Dataspace functions */ @@ -181,9 +182,9 @@ struct H5T_path_t { }; /* Reference function pointers */ -typedef size_t (*H5T_ref_getsizefunc_t)(H5F_t *src_f, const void *src_buf, size_t src_size, H5F_t *dst_f, hbool_t *dst_copy); -typedef herr_t (*H5T_ref_readfunc_t)(H5F_t *src_f, const void *src_buf, size_t src_size, H5F_t *dst_f, void *dst_buf, size_t dst_size); -typedef herr_t (*H5T_ref_writefunc_t)(H5F_t *src_f, const void *src_buf, size_t src_size, H5R_type_t src_type, H5F_t *dst_f, void *dst_buf, size_t dst_size, void *bg_buf); +typedef size_t (*H5T_ref_getsizefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, H5VL_object_t *dst_file, hbool_t *dst_copy); +typedef herr_t (*H5T_ref_readfunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, H5VL_object_t *dst_file, void *dst_buf, size_t dst_size); +typedef herr_t (*H5T_ref_writefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, H5R_type_t src_type, H5VL_object_t *dst_file, void *dst_buf, size_t dst_size, void *bg_buf); typedef struct H5T_ref_class_t { H5T_ref_getsizefunc_t getsize; /* get reference size (bytes) */ @@ -223,7 +224,7 @@ typedef struct H5T_atomic_t { unsigned version; /* version of encoded reference */ hbool_t opaque; /* opaque reference type */ H5T_loc_t loc; /* location of data in buffer */ - H5F_t *f; /* file pointer (if data is on disk) */ + H5VL_object_t *file; /* file VOL pointer (if data is on disk) */ const H5T_ref_class_t *cls; /* Pointer to ref class callbacks */ } r; /* reference types */ } u; @@ -272,13 +273,13 @@ typedef enum { } H5T_vlen_type_t; /* VL function pointers */ -typedef herr_t (*H5T_vlen_getlen_func_t)(H5F_t *f, const void *vl_addr, size_t *len); +typedef herr_t (*H5T_vlen_getlen_func_t)(H5VL_object_t *file, const void *vl_addr, size_t *len); typedef void * (*H5T_vlen_getptr_func_t)(void *vl_addr); -typedef herr_t (*H5T_vlen_isnull_func_t)(const H5F_t *f, void *vl_addr, hbool_t *isnull); -typedef herr_t (*H5T_vlen_setnull_func_t)(H5F_t *f, void *_vl, void *_bg); -typedef herr_t (*H5T_vlen_read_func_t)(H5F_t *f, void *_vl, void *buf, size_t len); -typedef herr_t (*H5T_vlen_write_func_t)(H5F_t *f, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void *_bg, size_t seq_len, size_t base_size); -typedef herr_t (*H5T_vlen_delete_func_t)(H5F_t *f, const void *_vl); +typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, hbool_t *isnull); +typedef herr_t (*H5T_vlen_setnull_func_t)(H5VL_object_t *file, void *_vl, void *_bg); +typedef herr_t (*H5T_vlen_read_func_t)(H5VL_object_t *file, void *_vl, void *buf, size_t len); +typedef herr_t (*H5T_vlen_write_func_t)(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void *_bg, size_t seq_len, size_t base_size); +typedef herr_t (*H5T_vlen_delete_func_t)(H5VL_object_t *file, const void *_vl); /* VL datatype callbacks */ typedef struct H5T_vlen_class_t { @@ -298,7 +299,7 @@ typedef struct H5T_vlen_t { H5T_cset_t cset; /* For VL string: character set */ H5T_str_t pad; /* For VL string: space or null padding of * extra bytes */ - H5F_t *f; /* File ID (if VL data is on disk) */ + H5VL_object_t *file; /* File object (if VL data is on disk) */ const H5T_vlen_class_t *cls; /* Pointer to VL class callbacks */ } H5T_vlen_t; @@ -331,6 +332,7 @@ typedef struct H5T_shared_t { unsigned version; /* Version of object header message to encode this object with */ hbool_t force_conv;/* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t *parent;/*parent type for derived datatypes */ + H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */ union { H5T_atomic_t atomic; /* an atomic datatype */ H5T_compnd_t compnd; /* a compound datatype (struct) */ @@ -1173,7 +1175,7 @@ H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size); /* VL functions */ H5_DLL H5T_t * H5T__vlen_create(const H5T_t *base); -H5_DLL htri_t H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc); +H5_DLL htri_t H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); /* Array functions */ H5_DLL H5T_t *H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]); @@ -1181,7 +1183,7 @@ H5_DLL int H5T__get_array_ndims(const H5T_t *dt); H5_DLL int H5T__get_array_dims(const H5T_t *dt, hsize_t dims[]); /* Reference functions */ -H5_DLL htri_t H5T__ref_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc); +H5_DLL htri_t H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); /* Compound functions */ H5_DLL herr_t H5T__insert(H5T_t *parent, const char *name, size_t offset, |