mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
Merge pull request #1676 in HDFFV/hdf5 from ~KOZIOL/hdf5:refactor_obj_create_params to develop
* commit '53ffbf4bf89350b5d6b90c11585f39af94209754': Cast enum to int, for strict varargs handling. Refactor group creation parameters to take them out of the group creation property list and pass them as normal function parameters. Warning cleanup Refactor link creation parameters from being passing as properties in the link creation property list to vararg function parameters. Minor cleanups Refactor attribute creation parameters to move parameters out of creation property list and into function parameters. A few minor cleanups Refactor dataset creation parameters out of the dataset creation property list and pass them as regular function parameters.
This commit is contained in:
commit
1a4b236aad
26
src/H5A.c
26
src/H5A.c
@ -254,7 +254,6 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
|
||||
{
|
||||
void *attr = NULL; /* Attribute created */
|
||||
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5VL_loc_params_t loc_params;
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
@ -277,16 +276,6 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
|
||||
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
|
||||
|
||||
/* Get the property list structure for the acpl */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
|
||||
/* Get the location object */
|
||||
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
@ -296,7 +285,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
|
||||
/* Create the attribute */
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, attr_name, acpl_id, aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, attr_name, type_id, space_id, acpl_id, aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
|
||||
|
||||
/* Register the new attribute and get an ID for it */
|
||||
@ -350,7 +339,6 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
|
||||
{
|
||||
void *attr = NULL; /* attr token from VOL connector */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5VL_loc_params_t loc_params;
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
@ -380,16 +368,6 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
|
||||
H5CX_set_lapl(lapl_id);
|
||||
}
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
|
||||
/* Set up location struct */
|
||||
loc_params.type = H5VL_OBJECT_BY_NAME;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
@ -401,7 +379,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Create the attribute */
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, attr_name, acpl_id, aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, attr_name, type_id, space_id, acpl_id, aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
|
||||
|
||||
/* Register the new attribute and get an ID for it */
|
||||
|
@ -119,7 +119,6 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
void *attr = NULL; /* attr token from VOL connector */
|
||||
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(H5I_INVALID_HID)
|
||||
@ -139,16 +138,6 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
if(H5P_DEFAULT == acpl_id)
|
||||
acpl_id = H5P_ATTRIBUTE_CREATE_DEFAULT;
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_ATTR_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
|
||||
/* Set location parameters */
|
||||
loc_params.type = H5VL_OBJECT_BY_SELF;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
@ -158,7 +147,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Create the attribute */
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, type_id, space_id, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
|
||||
|
||||
/* Register the new attribute and get an ID for it */
|
||||
|
36
src/H5D.c
36
src/H5D.c
@ -105,11 +105,10 @@ hid_t
|
||||
H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id)
|
||||
{
|
||||
void *dset = NULL; /* New dataset's info */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
void *dset = NULL; /* New dataset's info */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist = NULL; /* Property list pointer */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(H5I_INVALID_HID)
|
||||
H5TRACE7("i", "i*siiiii", loc_id, name, type_id, space_id, lcpl_id, dcpl_id,
|
||||
@ -142,28 +141,16 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
if(H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
|
||||
|
||||
/* Get the property list structure for the dcpl */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* Get the location object */
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for lcpl id")
|
||||
|
||||
/* Set location parameters */
|
||||
loc_params.type = H5VL_OBJECT_BY_SELF;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
|
||||
/* Create the dataset */
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
|
||||
|
||||
/* Get an atom for the dataset */
|
||||
@ -216,9 +203,8 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
|
||||
hid_t dapl_id)
|
||||
{
|
||||
void *dset = NULL; /* dset token from VOL connector */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(H5I_INVALID_HID)
|
||||
@ -242,22 +228,12 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
|
||||
/* Set location parameters */
|
||||
loc_params.type = H5VL_OBJECT_BY_SELF;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
|
||||
/* Create the dataset */
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, NULL, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, NULL, H5P_LINK_CREATE_DEFAULT, type_id, space_id, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
|
||||
|
||||
/* Get an atom for the dataset */
|
||||
|
@ -116,7 +116,6 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
void *dset = NULL; /* dset token from VOL connector */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
hid_t dapl_id = H5P_DEFAULT; /* DAPL used by library */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
@ -143,18 +142,6 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
if(H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for datatype id")
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for space id")
|
||||
if(H5P_set(plist, H5VL_PROP_DSET_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't set property value for lcpl id")
|
||||
|
||||
/* Set location parameters */
|
||||
loc_params.type = H5VL_OBJECT_BY_SELF;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
@ -164,7 +151,7 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Create the dataset through the VOL */
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, lcpl_id, type_id, space_id, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset")
|
||||
|
||||
/* Get an atom for the dataset */
|
||||
|
11
src/H5G.c
11
src/H5G.c
@ -320,7 +320,6 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
|
||||
void *grp = NULL; /* Structure for new group */
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(H5I_INVALID_HID)
|
||||
@ -350,12 +349,6 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
|
||||
if(H5CX_set_apl(&gapl_id, H5P_CLS_GACC, loc_id, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
|
||||
|
||||
/* Get the gcpl structure and set the link properties on it */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(gcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
if(H5P_set(plist, H5VL_PROP_GRP_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set property value for lcpl id")
|
||||
|
||||
/* Get the location object */
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
@ -365,7 +358,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
|
||||
/* Create the group */
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, lcpl_id, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
|
||||
|
||||
/* Get an atom for the group */
|
||||
@ -444,7 +437,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Create the group */
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, NULL, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, NULL, H5P_LINK_CREATE_DEFAULT, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
|
||||
|
||||
/* Get an atom for the group */
|
||||
|
@ -172,7 +172,6 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
|
||||
void *grp = NULL; /* New group created */
|
||||
H5VL_object_t *vol_obj; /* Object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t tmp_gcpl = H5I_INVALID_HID; /* Temporary group creation property list */
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
hid_t ret_value = H5I_INVALID_HID; /* Return value */
|
||||
@ -217,14 +216,6 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
|
||||
if(H5CX_set_loc(loc_id) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read info")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(tmp_gcpl)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5I_INVALID_HID, "can't find object for ID")
|
||||
|
||||
/* get creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_GRP_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get property value for lcpl id")
|
||||
|
||||
/* Set location parameters */
|
||||
loc_params.type = H5VL_OBJECT_BY_SELF;
|
||||
loc_params.obj_type = H5I_get_type(loc_id);
|
||||
@ -234,7 +225,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
|
||||
|
||||
/* Create the group */
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
if(NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, lcpl_id, tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group")
|
||||
|
||||
/* Get an atom for the group */
|
||||
@ -323,7 +314,6 @@ herr_t
|
||||
H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name)
|
||||
{
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -339,10 +329,6 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
|
||||
if(H5CX_set_loc(cur_loc_id) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* Create link */
|
||||
if(type == H5L_TYPE_HARD) {
|
||||
H5VL_object_t *vol_obj; /* Object token of loc_id */
|
||||
@ -363,18 +349,12 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(cur_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET, &vol_obj->data) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target loc params")
|
||||
|
||||
/* Construct a temporary VOL object */
|
||||
tmp_vol_obj.data = NULL;
|
||||
tmp_vol_obj.connector = vol_obj->connector;
|
||||
|
||||
/* Create the link through the VOL */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj->data, loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
} /* end if */
|
||||
else if(type == H5L_TYPE_SOFT) {
|
||||
@ -390,12 +370,8 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(cur_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_NAME, &cur_name) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for target name")
|
||||
|
||||
/* Create the link through the VOL */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
} /* end else-if */
|
||||
else
|
||||
@ -419,7 +395,6 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
|
||||
hid_t new_loc_id, const char *new_name)
|
||||
{
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -435,10 +410,6 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
|
||||
if(H5CX_set_loc(cur_loc_id) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* Create the appropriate kind of link */
|
||||
if(type == H5L_TYPE_HARD) {
|
||||
H5VL_object_t *vol_obj1; /* Object token of loc_id */
|
||||
@ -462,14 +433,8 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
|
||||
if(NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(new_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET, &vol_obj1->data) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target id")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target name")
|
||||
|
||||
/* Create the link through the VOL */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, vol_obj2, &loc_params2, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
} /* end if */
|
||||
else if(type == H5L_TYPE_SOFT) {
|
||||
@ -490,12 +455,8 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(new_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_NAME, &cur_name) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for target name")
|
||||
|
||||
/* Create the link through the VOL */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, cur_name) < 0)
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
} /* end else-if */
|
||||
else
|
||||
|
39
src/H5L.c
39
src/H5L.c
@ -449,7 +449,6 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
|
||||
{
|
||||
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist = NULL; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -483,20 +482,12 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(link_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_NAME, &link_target) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for target name")
|
||||
|
||||
/* Verify access property list and set up collective metadata if appropriate */
|
||||
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
|
||||
|
||||
/* Create the link */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_SOFT, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, link_target) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create soft link")
|
||||
|
||||
done:
|
||||
@ -529,7 +520,6 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
|
||||
H5VL_object_t tmp_vol_obj; /* Temporary object token of */
|
||||
H5VL_loc_params_t loc_params1;
|
||||
H5VL_loc_params_t loc_params2;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -583,22 +573,12 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
|
||||
if(vol_obj1->connector->cls->value != vol_obj2->connector->cls->value)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "Objects are accessed through different VOL connectors and can't be linked")
|
||||
|
||||
/* Get the link creation plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_LINK, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET, (vol_obj1 ? &(vol_obj1->data) : NULL)) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't set property value for target id")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't set property value for target name")
|
||||
|
||||
/* Construct a temporary VOL object */
|
||||
tmp_vol_obj.data = (vol_obj2 ? (vol_obj2->data) : NULL);
|
||||
tmp_vol_obj.connector = (vol_obj1 != NULL ? vol_obj1->connector : vol_obj2->connector);
|
||||
|
||||
/* Create the link */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (vol_obj1 ? vol_obj1->data : NULL), loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create hard link")
|
||||
|
||||
done:
|
||||
@ -636,7 +616,6 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
|
||||
{
|
||||
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
|
||||
H5VL_loc_params_t loc_params;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -668,20 +647,8 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(link_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TYPE, &link_type) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_UDATA, &udata) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_UDATA_SIZE, &udata_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
|
||||
/* Create external link */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_UD, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_UD, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)link_type, udata, udata_size) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
|
||||
done:
|
||||
|
@ -349,7 +349,6 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
|
||||
size_t file_name_len; /* Length of file name string */
|
||||
size_t norm_obj_name_len; /* Length of normalized object name string */
|
||||
uint8_t *p; /* Pointer into external link buffer */
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5L_type_t link_type = H5L_TYPE_EXTERNAL;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
@ -400,20 +399,8 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
|
||||
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(link_loc_id)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* Set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TYPE, &link_type) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_UDATA, &ext_link_buf) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_UDATA_SIZE, &buf_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value from plist")
|
||||
|
||||
/* Create an external link */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_UD, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_UD, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (int)link_type, ext_link_buf, buf_size) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create external link")
|
||||
|
||||
done:
|
||||
|
13
src/H5O.c
13
src/H5O.c
@ -314,7 +314,6 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
|
||||
H5VL_object_t tmp_vol_obj; /* Temporary object token of */
|
||||
H5VL_loc_params_t loc_params1;
|
||||
H5VL_loc_params_t loc_params2;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API(FAIL)
|
||||
@ -363,22 +362,12 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
|
||||
if (vol_obj1->connector->cls->value != vol_obj2->connector->cls->value)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "Objects are accessed through different VOL connectors and can't be linked")
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
|
||||
|
||||
/* set creation properties */
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET, &vol_obj1->data) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target id")
|
||||
if(H5P_set(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for target id")
|
||||
|
||||
/* Construct a temporary VOL object */
|
||||
tmp_vol_obj.data = vol_obj2->data;
|
||||
tmp_vol_obj.connector = (vol_obj1 != NULL ? vol_obj1->connector : vol_obj2->connector);
|
||||
|
||||
/* Create a link to the object */
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
|
||||
if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, loc_params1) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link")
|
||||
|
||||
done:
|
||||
|
@ -40,10 +40,6 @@
|
||||
/* Local Macros */
|
||||
/****************/
|
||||
|
||||
/* Definitions for locations parameters */
|
||||
#define H5A_CRT_LOCATION_SIZE sizeof(H5VL_loc_params_t)
|
||||
#define H5A_CRT_LOCATION_DEF H5I_BADID
|
||||
|
||||
|
||||
/******************/
|
||||
/* Local Typedefs */
|
||||
@ -59,9 +55,6 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
/* Property class callbacks */
|
||||
static herr_t H5P_acrt_reg_prop(H5P_genclass_t *pclass);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
@ -76,7 +69,7 @@ const H5P_libclass_t H5P_CLS_ACRT[1] = {{
|
||||
&H5P_CLS_ATTRIBUTE_CREATE_g, /* Pointer to class */
|
||||
&H5P_CLS_ATTRIBUTE_CREATE_ID_g, /* Pointer to class ID */
|
||||
&H5P_LST_ATTRIBUTE_CREATE_ID_g, /* Pointer to default property list ID */
|
||||
H5P_acrt_reg_prop, /* Default property registration routine */
|
||||
NULL, /* Default property registration routine */
|
||||
|
||||
NULL, /* Class creation callback */
|
||||
NULL, /* Class creation callback info */
|
||||
@ -91,44 +84,3 @@ const H5P_libclass_t H5P_CLS_ACRT[1] = {{
|
||||
/* Library Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5P_acrt_reg_prop
|
||||
*
|
||||
* Purpose: Register the attribute creation property list class's properties
|
||||
*
|
||||
* Return: SUCCEED/FAIL
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5P_acrt_reg_prop(H5P_genclass_t *pclass)
|
||||
{
|
||||
hid_t type_id = H5I_INVALID_HID;
|
||||
hid_t space_id = H5I_INVALID_HID;
|
||||
H5VL_loc_params_t loc_params;
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/* Register the type ID property*/
|
||||
if(H5P__register_real(pclass, H5VL_PROP_ATTR_TYPE_ID, sizeof(hid_t), &type_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the space ID property */
|
||||
if(H5P__register_real(pclass, H5VL_PROP_ATTR_SPACE_ID, sizeof(hid_t), &space_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the lcpl ID property */
|
||||
HDmemset(&loc_params, 0, sizeof(H5VL_loc_params_t));
|
||||
loc_params.obj_type = H5A_CRT_LOCATION_DEF;
|
||||
if(H5P__register_real(pclass, H5VL_PROP_ATTR_LOC_PARAMS, H5A_CRT_LOCATION_SIZE, &loc_params,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P_acrt_reg_prop() */
|
||||
|
||||
|
@ -246,9 +246,6 @@ static hbool_t H5P_dcrt_def_layout_init_g = FALSE;
|
||||
static herr_t
|
||||
H5P__dcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
{
|
||||
hid_t type_id = H5I_INVALID_HID;
|
||||
hid_t space_id = H5I_INVALID_HID;
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
@ -283,21 +280,6 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the type ID property*/
|
||||
if(H5P__register_real(pclass, H5VL_PROP_DSET_TYPE_ID, sizeof(hid_t), &type_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, H5P_ignore_cmp, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the space ID property */
|
||||
if(H5P__register_real(pclass, H5VL_PROP_DSET_SPACE_ID, sizeof(hid_t), &space_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, H5P_ignore_cmp, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the lcpl ID property */
|
||||
if(H5P__register_real(pclass, H5VL_PROP_DSET_LCPL_ID, sizeof(hid_t), &lcpl_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, H5P_ignore_cmp, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P__dcrt_reg_prop() */
|
||||
|
@ -36,6 +36,7 @@
|
||||
/* Headers */
|
||||
/***********/
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5CXprivate.h" /* API Contexts */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Fprivate.h" /* Files */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
|
@ -128,7 +128,6 @@ static const H5O_linfo_t H5G_def_linfo_g = H5G_CRT_LINK_INFO_DEF; /* Defaul
|
||||
static herr_t
|
||||
H5P__gcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
{
|
||||
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC
|
||||
@ -145,11 +144,6 @@ H5P__gcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
/* Register the lcpl ID property */
|
||||
if(H5P__register_real(pclass, H5VL_PROP_GRP_LCPL_ID, sizeof(hid_t), &lcpl_id,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P__gcrt_reg_prop() */
|
||||
|
@ -48,30 +48,6 @@
|
||||
#define H5L_CRT_INTERMEDIATE_GROUP_ENC H5P__encode_unsigned
|
||||
#define H5L_CRT_INTERMEDIATE_GROUP_DEC H5P__decode_unsigned
|
||||
|
||||
/* ======== VOL specific properties ========= */
|
||||
/* Definitions for target object ID */
|
||||
#define H5L_CRT_TARGET_SIZE sizeof(void *)
|
||||
#define H5L_CRT_TARGET_DEF NULL
|
||||
|
||||
/* Definitions for Location params */
|
||||
#define H5L_CRT_LOCATION_SIZE sizeof(H5VL_loc_params_t)
|
||||
#define H5L_CRT_LOCATION_DEF {H5I_BADID, H5VL_OBJECT_BY_SELF, {{HADDR_UNDEF}}}
|
||||
|
||||
/* Definitions for target object NAME */
|
||||
#define H5L_CRT_TARGET_NAME_SIZE sizeof(char *)
|
||||
#define H5L_CRT_TARGET_NAME_DEF NULL
|
||||
|
||||
/* Definitions for link type */
|
||||
#define H5L_CRT_LINK_TYPE_SIZE sizeof(link_type)
|
||||
#define H5L_CRT_LINK_TYPE_DEF H5L_TYPE_ERROR
|
||||
|
||||
/* Definitions for UDATA */
|
||||
#define H5L_CRT_UDATA_SIZE sizeof(void *)
|
||||
#define H5L_CRT_UDATA_DEF NULL
|
||||
|
||||
/* Definitions for UDATA_SIZE */
|
||||
#define H5L_CRT_UDATA_SIZE_SIZE sizeof(size_t)
|
||||
#define H5L_CRT_UDATA_SIZE_DEF 0
|
||||
|
||||
/******************/
|
||||
/* Local Typedefs */
|
||||
@ -143,12 +119,6 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF;
|
||||
herr_t
|
||||
H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
{
|
||||
void* target = H5L_CRT_TARGET_DEF;
|
||||
H5VL_loc_params_t loc_params = H5L_CRT_LOCATION_DEF;
|
||||
char *target_name = H5L_CRT_TARGET_NAME_DEF;
|
||||
H5L_type_t link_type = H5L_CRT_LINK_TYPE_DEF;
|
||||
void *udata = H5L_CRT_UDATA_DEF;
|
||||
size_t udata_size = H5L_CRT_UDATA_SIZE_DEF;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
@ -159,30 +129,6 @@ H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
|
||||
NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET, H5L_CRT_TARGET_SIZE, &target,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET_LOC_PARAMS, H5L_CRT_LOCATION_SIZE, &loc_params,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_TARGET_NAME, H5L_CRT_TARGET_NAME_SIZE, &target_name,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_TYPE, H5L_CRT_LINK_TYPE_SIZE, &link_type,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_UDATA, H5L_CRT_UDATA_SIZE, &udata,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
if(H5P__register_real(pclass, H5VL_PROP_LINK_UDATA_SIZE, H5L_CRT_UDATA_SIZE_SIZE, &udata_size,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5P_lcrt_reg_prop() */
|
||||
|
@ -23,6 +23,7 @@
|
||||
/***********/
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5ACprivate.h" /* Metadata cache */
|
||||
#include "H5CXprivate.h" /* API Contexts */
|
||||
#include "H5Dprivate.h" /* Datasets */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Gprivate.h" /* Groups */
|
||||
|
@ -57,8 +57,8 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
static void *H5VL__attr_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t acpl_id, hid_t aapl_id,
|
||||
hid_t dxpl_id, void **req);
|
||||
const H5VL_class_t *cls, const char *name, hid_t type_id, hid_t space_id,
|
||||
hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL__attr_open(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t aapl_id, hid_t dxpl_id,
|
||||
void **req);
|
||||
@ -76,8 +76,8 @@ static herr_t H5VL__attr_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl
|
||||
static herr_t H5VL__attr_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
|
||||
void **req);
|
||||
static void *H5VL__dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t dcpl_id, hid_t dapl_id,
|
||||
hid_t dxpl_id, void **req);
|
||||
const H5VL_class_t *cls, const char *name, hid_t lcpl_id, hid_t type_id,
|
||||
hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL__dataset_open(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t dapl_id, hid_t dxpl_id,
|
||||
void **req);
|
||||
@ -108,8 +108,8 @@ static herr_t H5VL__file_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl
|
||||
static herr_t H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
|
||||
void **req);
|
||||
static void *H5VL__group_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t gcpl_id, hid_t gapl_id,
|
||||
hid_t dxpl_id, void **req);
|
||||
const H5VL_class_t *cls, const char *name, hid_t lcpl_id, hid_t gcpl_id,
|
||||
hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL__group_open(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, const char *name, hid_t gapl_id, hid_t dxpl_id,
|
||||
void **req);
|
||||
@ -123,7 +123,7 @@ static herr_t H5VL__group_close(void *obj, const H5VL_class_t *cls,
|
||||
hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL__link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
const H5VL_loc_params_t *loc_params, const H5VL_class_t *cls, hid_t lcpl_id,
|
||||
hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
static herr_t H5VL__link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, const H5VL_class_t *cls,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
@ -753,7 +753,7 @@ void *
|
||||
H5VL_wrap_object(const H5VL_class_t *connector, void *wrap_ctx, void *obj,
|
||||
H5I_type_t obj_type)
|
||||
{
|
||||
void *ret_value; /* Return value */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
|
||||
@ -822,7 +822,7 @@ done:
|
||||
void *
|
||||
H5VL_unwrap_object(const H5VL_class_t *connector, void *obj)
|
||||
{
|
||||
void *ret_value; /* Return value */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
|
||||
@ -954,7 +954,8 @@ done:
|
||||
*/
|
||||
static void *
|
||||
H5VL__attr_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class_t *cls,
|
||||
const char *name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id,
|
||||
hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
@ -965,12 +966,12 @@ H5VL__attr_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cla
|
||||
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'attr create' method")
|
||||
|
||||
/* Call the corresponding VOL callback */
|
||||
if(NULL == (ret_value = (cls->attr_cls.create)(obj, loc_params, name, acpl_id, aapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = (cls->attr_cls.create)(obj, loc_params, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5VL_attr_create() */
|
||||
} /* end H5VL__attr_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -985,7 +986,8 @@ done:
|
||||
*/
|
||||
void *
|
||||
H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id,
|
||||
hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
@ -998,7 +1000,7 @@ H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_para
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__attr_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, acpl_id, aapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__attr_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed")
|
||||
|
||||
done:
|
||||
@ -1022,14 +1024,15 @@ done:
|
||||
*/
|
||||
void *
|
||||
H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
|
||||
const char *name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id,
|
||||
hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
H5VL_class_t *cls; /* VOL connector's class struct */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_API_NOINIT
|
||||
H5TRACE8("*x", "*x*xi*siii**x", obj, loc_params, connector_id, name, acpl_id,
|
||||
aapl_id, dxpl_id, req);
|
||||
H5TRACE10("*x", "*x*xi*siiiii**x", obj, loc_params, connector_id, name,
|
||||
type_id, space_id, acpl_id, aapl_id, dxpl_id, req);
|
||||
|
||||
/* Check args and get class pointer */
|
||||
if(NULL == obj)
|
||||
@ -1038,7 +1041,7 @@ H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__attr_create(obj, loc_params, cls, name, acpl_id, aapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__attr_create(obj, loc_params, cls, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create attribute")
|
||||
|
||||
done:
|
||||
@ -1794,7 +1797,8 @@ done:
|
||||
*/
|
||||
static void *
|
||||
H5VL__dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class_t *cls,
|
||||
const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
@ -1805,7 +1809,7 @@ H5VL__dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_
|
||||
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'dataset create' method")
|
||||
|
||||
/* Call the corresponding VOL callback */
|
||||
if(NULL == (ret_value = (cls->dataset_cls.create)(obj, loc_params, name, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = (cls->dataset_cls.create)(obj, loc_params, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed")
|
||||
|
||||
done:
|
||||
@ -1825,7 +1829,8 @@ done:
|
||||
*/
|
||||
void *
|
||||
H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
@ -1838,7 +1843,7 @@ H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_p
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__dataset_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__dataset_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed")
|
||||
|
||||
done:
|
||||
@ -1862,14 +1867,15 @@ done:
|
||||
*/
|
||||
void *
|
||||
H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
|
||||
const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
H5VL_class_t *cls; /* VOL connector's class struct */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_API_NOINIT
|
||||
H5TRACE8("*x", "*x*xi*siii**x", obj, loc_params, connector_id, name, dcpl_id,
|
||||
dapl_id, dxpl_id, req);
|
||||
H5TRACE11("*x", "*x*xi*siiiiii**x", obj, loc_params, connector_id, name,
|
||||
lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req);
|
||||
|
||||
/* Check args and get class pointer */
|
||||
if(NULL == obj)
|
||||
@ -1878,7 +1884,7 @@ H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connect
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__dataset_create(obj, loc_params, cls, name, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__dataset_create(obj, loc_params, cls, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create dataset")
|
||||
|
||||
done:
|
||||
@ -3348,7 +3354,8 @@ done:
|
||||
*/
|
||||
static void *
|
||||
H5VL__group_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class_t *cls,
|
||||
const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id,
|
||||
hid_t dxpl_id, void **req)
|
||||
{
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
@ -3359,7 +3366,7 @@ H5VL__group_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cl
|
||||
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'group create' method")
|
||||
|
||||
/* Call the corresponding VOL callback */
|
||||
if(NULL == (ret_value = (cls->group_cls.create)(obj, loc_params, name, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = (cls->group_cls.create)(obj, loc_params, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed")
|
||||
|
||||
done:
|
||||
@ -3379,7 +3386,8 @@ done:
|
||||
*/
|
||||
void *
|
||||
H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id,
|
||||
void **req)
|
||||
{
|
||||
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
@ -3392,7 +3400,7 @@ H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_par
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__group_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__group_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed")
|
||||
|
||||
done:
|
||||
@ -3415,15 +3423,16 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void *
|
||||
H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
|
||||
hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
|
||||
H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
|
||||
const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id,hid_t dxpl_id,
|
||||
void **req)
|
||||
{
|
||||
H5VL_class_t *cls; /* VOL connector's class struct */
|
||||
void *ret_value = NULL; /* Return value */
|
||||
|
||||
FUNC_ENTER_API_NOINIT
|
||||
H5TRACE8("*x", "*x*xi*siii**x", obj, loc_params, connector_id, name, gcpl_id,
|
||||
gapl_id, dxpl_id, req);
|
||||
H5TRACE9("*x", "*x*xi*siiii**x", obj, loc_params, connector_id, name, lcpl_id,
|
||||
gcpl_id, gapl_id, dxpl_id, req);
|
||||
|
||||
/* Check args and get class pointer */
|
||||
if(NULL == obj)
|
||||
@ -3432,7 +3441,7 @@ H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(NULL == (ret_value = H5VL__group_create(obj, loc_params, cls, name, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
if(NULL == (ret_value = H5VL__group_create(obj, loc_params, cls, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create group")
|
||||
|
||||
done:
|
||||
@ -3996,7 +4005,8 @@ done:
|
||||
*/
|
||||
static herr_t
|
||||
H5VL__link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const H5VL_class_t *cls, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req)
|
||||
const H5VL_class_t *cls, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req,
|
||||
va_list arguments)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
@ -4007,7 +4017,7 @@ H5VL__link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc
|
||||
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link create' method")
|
||||
|
||||
/* Call the corresponding VOL callback */
|
||||
if((cls->link_cls.create)(create_type, obj, loc_params, lcpl_id, lapl_id, dxpl_id, req) < 0)
|
||||
if((cls->link_cls.create)(create_type, obj, loc_params, lcpl_id, lapl_id, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed")
|
||||
|
||||
done:
|
||||
@ -4028,23 +4038,28 @@ done:
|
||||
herr_t
|
||||
H5VL_link_create(H5VL_link_create_type_t create_type, const H5VL_object_t *vol_obj,
|
||||
const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id,
|
||||
void **req)
|
||||
void **req, ...)
|
||||
{
|
||||
H5VL_object_t tmp_vol_obj; /* Temporary object token of */
|
||||
va_list arguments; /* Argument list passed from the API call */
|
||||
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
|
||||
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
|
||||
/* Start the varargs, so they can be copied */
|
||||
HDva_start(arguments, req);
|
||||
arg_started = TRUE;
|
||||
|
||||
/* Special case for hard links */
|
||||
if(H5VL_LINK_CREATE_HARD == create_type && NULL == vol_obj->data) {
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
va_list tmp_arguments; /* Copy of argument list passed in */
|
||||
|
||||
/* Get the VOL data pointer from the fapl */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
|
||||
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a file access property list")
|
||||
if(H5P_peek(plist, H5VL_PROP_LINK_TARGET, &tmp_vol_obj.data) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector info")
|
||||
/* Get the VOL data pointer from the varargs */
|
||||
HDva_copy(tmp_arguments, arguments);
|
||||
tmp_vol_obj.data = HDva_arg(tmp_arguments, void *);
|
||||
HDva_end(tmp_arguments);
|
||||
} /* end if */
|
||||
else
|
||||
/* Use the VOL object passed in */
|
||||
@ -4057,10 +4072,14 @@ H5VL_link_create(H5VL_link_create_type_t create_type, const H5VL_object_t *vol_o
|
||||
vol_wrapper_set = TRUE;
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(H5VL__link_create(create_type, vol_obj->data, loc_params, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id, req) < 0)
|
||||
if(H5VL__link_create(create_type, vol_obj->data, loc_params, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed")
|
||||
|
||||
done:
|
||||
/* End access to the va_list, if we started it */
|
||||
if(arg_started)
|
||||
HDva_end(arguments);
|
||||
|
||||
/* Reset object wrapping info in API context */
|
||||
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
|
||||
HDONE_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
|
||||
@ -4083,21 +4102,22 @@ done:
|
||||
*/
|
||||
herr_t
|
||||
H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params,
|
||||
hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req)
|
||||
hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req,
|
||||
va_list arguments)
|
||||
{
|
||||
H5VL_class_t *cls; /* VOL connector's class struct */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_API_NOINIT
|
||||
H5TRACE8("e", "Vk*x*xiiii**x", create_type, obj, loc_params, connector_id,
|
||||
lcpl_id, lapl_id, dxpl_id, req);
|
||||
H5TRACE9("e", "Vk*x*xiiii**xx", create_type, obj, loc_params, connector_id,
|
||||
lcpl_id, lapl_id, dxpl_id, req, arguments);
|
||||
|
||||
/* Get class pointer */
|
||||
if(NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID")
|
||||
|
||||
/* Call the corresponding internal VOL routine */
|
||||
if(H5VL__link_create(create_type, obj, loc_params, cls, lcpl_id, lapl_id, dxpl_id, req) < 0)
|
||||
if(H5VL__link_create(create_type, obj, loc_params, cls, lcpl_id, lapl_id, dxpl_id, req, arguments) < 0)
|
||||
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "unable to create link")
|
||||
|
||||
done:
|
||||
|
@ -44,14 +44,12 @@
|
||||
*/
|
||||
void *
|
||||
H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name,
|
||||
hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id, hid_t H5_ATTR_UNUSED dxpl_id,
|
||||
void H5_ATTR_UNUSED **req)
|
||||
hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id,
|
||||
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
|
||||
{
|
||||
H5G_loc_t loc; /* Object location */
|
||||
H5G_loc_t obj_loc; /* Location used to open group */
|
||||
hbool_t loc_found = FALSE;
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
hid_t type_id, space_id;
|
||||
H5T_t *type, *dt; /* Datatype to use for attribute */
|
||||
H5S_t *space; /* Dataspace to use for attribute */
|
||||
H5A_t *attr = NULL;
|
||||
@ -59,16 +57,6 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(acpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID")
|
||||
|
||||
/* get creation properties */
|
||||
if(H5P_get(plist, H5VL_PROP_ATTR_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for datatype id")
|
||||
if(H5P_get(plist, H5VL_PROP_ATTR_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for space id")
|
||||
|
||||
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
|
||||
if(0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
|
||||
|
@ -43,32 +43,17 @@
|
||||
*/
|
||||
void *
|
||||
H5VL__native_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t H5_ATTR_UNUSED dxpl_id,
|
||||
const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t H5_ATTR_UNUSED dxpl_id,
|
||||
void H5_ATTR_UNUSED **req)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5G_loc_t loc; /* Object location to insert dataset into */
|
||||
hid_t type_id = H5I_INVALID_HID;
|
||||
hid_t space_id = H5I_INVALID_HID;
|
||||
hid_t lcpl_id = H5I_INVALID_HID;
|
||||
H5D_t *dset = NULL; /* New dataset's info */
|
||||
const H5S_t *space; /* Dataspace for dataset */
|
||||
void *ret_value;
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Get the plist structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID")
|
||||
|
||||
/* Get creation properties */
|
||||
if(H5P_get(plist, H5VL_PROP_DSET_TYPE_ID, &type_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for datatype id")
|
||||
if(H5P_get(plist, H5VL_PROP_DSET_SPACE_ID, &space_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for space id")
|
||||
if(H5P_get(plist, H5VL_PROP_DSET_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for lcpl id")
|
||||
|
||||
/* Check arguments */
|
||||
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
|
||||
|
@ -41,25 +41,15 @@
|
||||
*/
|
||||
void *
|
||||
H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name,
|
||||
hid_t gcpl_id, hid_t H5_ATTR_UNUSED gapl_id, hid_t H5_ATTR_UNUSED dxpl_id,
|
||||
void H5_ATTR_UNUSED **req)
|
||||
hid_t lcpl_id, hid_t gcpl_id, hid_t H5_ATTR_UNUSED gapl_id,
|
||||
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
H5G_loc_t loc; /* Location to create group */
|
||||
H5G_t *grp = NULL; /* New group created */
|
||||
hid_t lcpl_id;
|
||||
void *ret_value;
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Get the property list structure */
|
||||
if(NULL == (plist = (H5P_genplist_t *)H5I_object(gcpl_id)))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID")
|
||||
|
||||
/* Get creation properties */
|
||||
if(H5P_get(plist, H5VL_PROP_GRP_LCPL_ID, &lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get property value for lcpl id")
|
||||
|
||||
/* Set up the location */
|
||||
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
|
||||
|
@ -41,7 +41,7 @@
|
||||
herr_t
|
||||
H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t H5_ATTR_UNUSED lapl_id,
|
||||
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
|
||||
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments)
|
||||
{
|
||||
H5P_genplist_t *plist; /* Property list pointer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -57,13 +57,8 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
{
|
||||
H5G_loc_t cur_loc;
|
||||
H5G_loc_t link_loc;
|
||||
void *cur_obj;
|
||||
H5VL_loc_params_t cur_params;
|
||||
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_TARGET, &cur_obj) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for current location id")
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_TARGET_LOC_PARAMS, &cur_params) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for current name")
|
||||
void *cur_obj = HDva_arg(arguments, void *);
|
||||
H5VL_loc_params_t cur_params = HDva_arg(arguments, H5VL_loc_params_t);
|
||||
|
||||
if(NULL != cur_obj && H5G_loc_real(cur_obj, cur_params.obj_type, &cur_loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
|
||||
@ -99,15 +94,12 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
|
||||
case H5VL_LINK_CREATE_SOFT:
|
||||
{
|
||||
char *target_name;
|
||||
char *target_name = HDva_arg(arguments, char *);
|
||||
H5G_loc_t link_loc; /* Group location for new link */
|
||||
|
||||
if(H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
|
||||
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_TARGET_NAME, &target_name) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for targe name")
|
||||
|
||||
/* Create the link */
|
||||
if((ret_value = H5L_create_soft(target_name, &link_loc, loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
@ -117,23 +109,15 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
case H5VL_LINK_CREATE_UD:
|
||||
{
|
||||
H5G_loc_t link_loc; /* Group location for new link */
|
||||
H5L_type_t link_type;
|
||||
void *udata;
|
||||
size_t udata_size;
|
||||
H5L_type_t link_type = (H5L_type_t)HDva_arg(arguments, int);
|
||||
void *udata = HDva_arg(arguments, void *);
|
||||
size_t udata_size = HDva_arg(arguments, size_t);
|
||||
|
||||
if(H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
|
||||
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_TYPE, &link_type) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for link type")
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_UDATA, &udata) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for udata")
|
||||
if(H5P_get(plist, H5VL_PROP_LINK_UDATA_SIZE, &udata_size) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for udata size")
|
||||
|
||||
/* Create link */
|
||||
if(H5L__create_ud(&link_loc, loc_params->loc_data.loc_by_name.name, udata, udata_size,
|
||||
link_type, lcpl_id) < 0)
|
||||
if(H5L__create_ud(&link_loc, loc_params->loc_data.loc_by_name.name, udata, udata_size, link_type, lcpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
|
||||
break;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Atrribute callbacks */
|
||||
H5_DLL void *H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
void *H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_attr_write(void *attr, hid_t dtype_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
@ -34,7 +34,7 @@ H5_DLL herr_t H5VL__native_attr_optional(void *obj, hid_t dxpl_id, void **req, v
|
||||
H5_DLL herr_t H5VL__native_attr_close(void *attr, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Dataset callbacks */
|
||||
H5_DLL void *H5VL__native_dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL__native_dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL__native_dataset_open(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
H5_DLL herr_t H5VL__native_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
|
||||
@ -52,7 +52,7 @@ H5_DLL herr_t H5VL__native_file_optional(void *file, hid_t dxpl_id, void **req,
|
||||
H5_DLL herr_t H5VL__native_file_close(void *file, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Group callbacks */
|
||||
H5_DLL void *H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL__native_group_open(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_group_get(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VL__native_group_specific(void *obj, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
@ -60,7 +60,7 @@ H5_DLL herr_t H5VL__native_group_optional(void *obj, hid_t dxpl_id, void **req,
|
||||
H5_DLL herr_t H5VL__native_group_close(void *grp, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Link callbacks */
|
||||
H5_DLL herr_t H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
|
@ -80,6 +80,9 @@ static herr_t H5VL_pass_through_file_specific_reissue(void *obj, hid_t connector
|
||||
H5VL_file_specific_t specific_type, hid_t dxpl_id, void **req, ...);
|
||||
static herr_t H5VL_pass_through_request_specific_reissue(void *obj, hid_t connector_id,
|
||||
H5VL_request_specific_t specific_type, ...);
|
||||
static herr_t H5VL_pass_through_link_create_reissue(H5VL_link_create_type_t create_type,
|
||||
void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, ...);
|
||||
static H5VL_pass_through_t *H5VL_pass_through_new_obj(void *under_obj,
|
||||
hid_t under_vol_id);
|
||||
static herr_t H5VL_pass_through_free_obj(H5VL_pass_through_t *obj);
|
||||
@ -104,7 +107,7 @@ static void *H5VL_pass_through_unwrap_object(void *obj);
|
||||
static herr_t H5VL_pass_through_free_wrap_ctx(void *obj);
|
||||
|
||||
/* Attribute callbacks */
|
||||
static void *H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_attr_read(void *attr, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_attr_write(void *attr, hid_t mem_type_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
@ -114,7 +117,7 @@ static herr_t H5VL_pass_through_attr_optional(void *obj, hid_t dxpl_id, void **r
|
||||
static herr_t H5VL_pass_through_attr_close(void *attr, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Dataset callbacks */
|
||||
static void *H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_dataset_open(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id,
|
||||
hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
@ -141,7 +144,7 @@ static herr_t H5VL_pass_through_file_optional(void *file, hid_t dxpl_id, void **
|
||||
static herr_t H5VL_pass_through_file_close(void *file, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Group callbacks */
|
||||
static void *H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
static void *H5VL_pass_through_group_open(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_group_get(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
static herr_t H5VL_pass_through_group_specific(void *obj, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
@ -149,7 +152,7 @@ static herr_t H5VL_pass_through_group_optional(void *obj, hid_t dxpl_id, void **
|
||||
static herr_t H5VL_pass_through_group_close(void *grp, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Link callbacks */
|
||||
static herr_t H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
static herr_t H5VL_pass_through_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
static herr_t H5VL_pass_through_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
@ -794,7 +797,8 @@ H5VL_pass_through_free_wrap_ctx(void *_wrap_ctx)
|
||||
*/
|
||||
static void *
|
||||
H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id,
|
||||
hid_t aapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
H5VL_pass_through_t *attr;
|
||||
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
|
||||
@ -804,7 +808,7 @@ H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
printf("------- PASS THROUGH VOL ATTRIBUTE Create\n");
|
||||
#endif
|
||||
|
||||
under = H5VLattr_create(o->under_object, loc_params, o->under_vol_id, name, acpl_id, aapl_id, dxpl_id, req);
|
||||
under = H5VLattr_create(o->under_object, loc_params, o->under_vol_id, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req);
|
||||
if(under) {
|
||||
attr = H5VL_pass_through_new_obj(under, o->under_vol_id);
|
||||
|
||||
@ -1057,7 +1061,8 @@ H5VL_pass_through_attr_close(void *attr, hid_t dxpl_id, void **req)
|
||||
*/
|
||||
static void *
|
||||
H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req)
|
||||
{
|
||||
H5VL_pass_through_t *dset;
|
||||
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
|
||||
@ -1067,7 +1072,7 @@ H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
printf("------- PASS THROUGH VOL DATASET Create\n");
|
||||
#endif
|
||||
|
||||
under = H5VLdataset_create(o->under_object, loc_params, o->under_vol_id, name, dcpl_id, dapl_id, dxpl_id, req);
|
||||
under = H5VLdataset_create(o->under_object, loc_params, o->under_vol_id, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req);
|
||||
if(under) {
|
||||
dset = H5VL_pass_through_new_obj(under, o->under_vol_id);
|
||||
|
||||
@ -1871,7 +1876,8 @@ H5VL_pass_through_file_close(void *file, hid_t dxpl_id, void **req)
|
||||
*/
|
||||
static void *
|
||||
H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req)
|
||||
const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id,
|
||||
hid_t dxpl_id, void **req)
|
||||
{
|
||||
H5VL_pass_through_t *group;
|
||||
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
|
||||
@ -1881,7 +1887,7 @@ H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params,
|
||||
printf("------- PASS THROUGH VOL GROUP Create\n");
|
||||
#endif
|
||||
|
||||
under = H5VLgroup_create(o->under_object, loc_params, o->under_vol_id, name, gcpl_id, gapl_id, dxpl_id, req);
|
||||
under = H5VLgroup_create(o->under_object, loc_params, o->under_vol_id, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req);
|
||||
if(under) {
|
||||
group = H5VL_pass_through_new_obj(under, o->under_vol_id);
|
||||
|
||||
@ -2065,6 +2071,32 @@ H5VL_pass_through_group_close(void *grp, hid_t dxpl_id, void **req)
|
||||
} /* end H5VL_pass_through_group_close() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL_pass_through_link_create_reissue
|
||||
*
|
||||
* Purpose: Re-wrap vararg arguments into a va_list and reissue the
|
||||
* link create callback to the underlying VOL connector.
|
||||
*
|
||||
* Return: Success: 0
|
||||
* Failure: -1
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5VL_pass_through_link_create_reissue(H5VL_link_create_type_t create_type,
|
||||
void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, ...)
|
||||
{
|
||||
va_list arguments;
|
||||
herr_t ret_value;
|
||||
|
||||
va_start(arguments, req);
|
||||
ret_value = H5VLlink_create(create_type, obj, loc_params, connector_id, lcpl_id, lapl_id, dxpl_id, req, arguments);
|
||||
va_end(arguments);
|
||||
|
||||
return ret_value;
|
||||
} /* end H5VL_pass_through_link_create_reissue() */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5VL_pass_through_link_create
|
||||
*
|
||||
@ -2076,7 +2108,9 @@ H5VL_pass_through_group_close(void *grp, hid_t dxpl_id, void **req)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req)
|
||||
H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj,
|
||||
const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id,
|
||||
hid_t dxpl_id, void **req, va_list arguments)
|
||||
{
|
||||
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
|
||||
hid_t under_vol_id = -1;
|
||||
@ -2093,9 +2127,11 @@ H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, co
|
||||
/* Fix up the link target object for hard link creation */
|
||||
if(H5VL_LINK_CREATE_HARD == create_type) {
|
||||
void *cur_obj;
|
||||
H5VL_loc_params_t cur_params;
|
||||
|
||||
/* Retrieve the object for the link target */
|
||||
H5Pget(lcpl_id, H5VL_PROP_LINK_TARGET, &cur_obj);
|
||||
/* Retrieve the object & loc params for the link target */
|
||||
cur_obj = va_arg(arguments, void *);
|
||||
cur_params = va_arg(arguments, H5VL_loc_params_t);
|
||||
|
||||
/* If it's a non-NULL pointer, find the 'under object' and re-set the property */
|
||||
if(cur_obj) {
|
||||
@ -2104,11 +2140,14 @@ H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, co
|
||||
under_vol_id = ((H5VL_pass_through_t *)cur_obj)->under_vol_id;
|
||||
|
||||
/* Set the object for the link target */
|
||||
H5Pset(lcpl_id, H5VL_PROP_LINK_TARGET, &(((H5VL_pass_through_t *)cur_obj)->under_object));
|
||||
cur_obj = ((H5VL_pass_through_t *)cur_obj)->under_object;
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
ret_value = H5VLlink_create(create_type, (o ? o->under_object : NULL), loc_params, under_vol_id, lcpl_id, lapl_id, dxpl_id, req);
|
||||
/* Re-issue 'link create' call, using the unwrapped pieces */
|
||||
ret_value = H5VL_pass_through_link_create_reissue(create_type, (o ? o->under_object : NULL), loc_params, under_vol_id, lcpl_id, lapl_id, dxpl_id, req, cur_obj, cur_params);
|
||||
} /* end if */
|
||||
else
|
||||
ret_value = H5VLlink_create(create_type, (o ? o->under_object : NULL), loc_params, under_vol_id, lcpl_id, lapl_id, dxpl_id, req, arguments);
|
||||
|
||||
/* Check for async request */
|
||||
if(req && *req)
|
||||
|
@ -127,7 +127,7 @@ H5_DLL herr_t H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_va
|
||||
H5_DLL herr_t H5VL_free_connector_info(hid_t connector_id, void *info);
|
||||
|
||||
/* Attribute functions */
|
||||
H5_DLL void *H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_attr_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_attr_read(const H5VL_object_t *vol_obj, hid_t dtype_id, void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_attr_write(const H5VL_object_t *vol_obj, hid_t dtype_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
@ -137,7 +137,7 @@ H5_DLL herr_t H5VL_attr_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, vo
|
||||
H5_DLL herr_t H5VL_attr_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Dataset functions */
|
||||
H5_DLL void *H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_dataset_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_dataset_read(const H5VL_object_t *vol_obj, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
H5_DLL herr_t H5VL_dataset_write(const H5VL_object_t *vol_obj, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
|
||||
@ -155,7 +155,7 @@ H5_DLL herr_t H5VL_file_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, vo
|
||||
H5_DLL herr_t H5VL_file_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Group functions */
|
||||
H5_DLL void *H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VL_group_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, ...);
|
||||
H5_DLL herr_t H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, ...);
|
||||
@ -163,7 +163,7 @@ H5_DLL herr_t H5VL_group_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, v
|
||||
H5_DLL herr_t H5VL_group_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Link functions */
|
||||
H5_DLL herr_t H5VL_link_create(H5VL_link_create_type_t create_type, const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_link_create(H5VL_link_create_type_t create_type, const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, ...);
|
||||
H5_DLL herr_t H5VL_link_copy(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_params1, const H5VL_object_t *dst_vol_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_link_move(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_params1, const H5VL_object_t *dst_vol_obj, const H5VL_loc_params_t *loc_params2, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, H5VL_link_get_t get_type, hid_t dxpl_id, void **req, ...);
|
||||
|
@ -32,27 +32,6 @@
|
||||
/* Public Macros */
|
||||
/*****************/
|
||||
|
||||
/* Dataset creation property names */
|
||||
#define H5VL_PROP_DSET_TYPE_ID "dataset_type_id"
|
||||
#define H5VL_PROP_DSET_SPACE_ID "dataset_space_id"
|
||||
#define H5VL_PROP_DSET_LCPL_ID "dataset_lcpl_id"
|
||||
|
||||
/* Attribute creation property names */
|
||||
#define H5VL_PROP_ATTR_TYPE_ID "attr_type_id"
|
||||
#define H5VL_PROP_ATTR_SPACE_ID "attr_space_id"
|
||||
#define H5VL_PROP_ATTR_LOC_PARAMS "attr_location"
|
||||
|
||||
/* Link creation property names */
|
||||
#define H5VL_PROP_LINK_TARGET "target_location_object"
|
||||
#define H5VL_PROP_LINK_TARGET_LOC_PARAMS "target_params"
|
||||
#define H5VL_PROP_LINK_TARGET_NAME "target_name"
|
||||
#define H5VL_PROP_LINK_TYPE "link type"
|
||||
#define H5VL_PROP_LINK_UDATA "udata"
|
||||
#define H5VL_PROP_LINK_UDATA_SIZE "udata size"
|
||||
|
||||
/* Group creation property names */
|
||||
#define H5VL_PROP_GRP_LCPL_ID "group_lcpl_id"
|
||||
|
||||
/* Default VOL connector value */
|
||||
#define H5VL_VOL_DEFAULT 0
|
||||
|
||||
@ -260,7 +239,8 @@ typedef struct H5VL_wrap_class_t {
|
||||
/* H5A routines */
|
||||
typedef struct H5VL_attr_class_t {
|
||||
void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name,
|
||||
hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id,
|
||||
hid_t dxpl_id, void **req);
|
||||
void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name,
|
||||
hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
herr_t (*read)(void *attr, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req);
|
||||
@ -275,7 +255,8 @@ typedef struct H5VL_attr_class_t {
|
||||
/* H5D routines */
|
||||
typedef struct H5VL_dataset_class_t {
|
||||
void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
|
||||
hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name,
|
||||
hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
herr_t (*read)(void *dset, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id,
|
||||
@ -317,7 +298,7 @@ typedef struct H5VL_file_class_t {
|
||||
/* H5G routines */
|
||||
typedef struct H5VL_group_class_t {
|
||||
void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name,
|
||||
hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name,
|
||||
hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
herr_t (*get)(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
@ -330,7 +311,7 @@ typedef struct H5VL_group_class_t {
|
||||
/* H5L routines */
|
||||
typedef struct H5VL_link_class_t {
|
||||
herr_t (*create)(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list argumenmts);
|
||||
herr_t (*copy)(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2,
|
||||
hid_t lcpl, hid_t lapl, hid_t dxpl_id, void **req);
|
||||
@ -477,7 +458,7 @@ H5_DLL void *H5VLunwrap_object(void *obj, hid_t connector_id);
|
||||
H5_DLL herr_t H5VLfree_wrap_ctx(void *wrap_ctx, hid_t connector_id);
|
||||
|
||||
/* Public wrappers for attribute callbacks */
|
||||
H5_DLL void *H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *attr_name, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t aapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_read(void *attr, hid_t connector_id, hid_t dtype_id, void *buf, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLattr_write(void *attr, hid_t connector_id, hid_t dtype_id, const void *buf, hid_t dxpl_id, void **req);
|
||||
@ -487,7 +468,7 @@ H5_DLL herr_t H5VLattr_optional(void *obj, hid_t connector_id, hid_t dxpl_id, vo
|
||||
H5_DLL herr_t H5VLattr_close(void *attr, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for dataset callbacks */
|
||||
H5_DLL void *H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLdataset_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLdataset_read(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf, void **req);
|
||||
H5_DLL herr_t H5VLdataset_write(void *dset, hid_t connector_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf, void **req);
|
||||
@ -505,7 +486,7 @@ H5_DLL herr_t H5VLfile_optional(void *obj, hid_t connector_id, hid_t dxpl_id, vo
|
||||
H5_DLL herr_t H5VLfile_close(void *file, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for group callbacks */
|
||||
H5_DLL void *H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL void *H5VLgroup_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLgroup_specific(void *obj, hid_t connector_id, H5VL_group_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
|
||||
@ -513,7 +494,7 @@ H5_DLL herr_t H5VLgroup_optional(void *obj, hid_t connector_id, hid_t dxpl_id, v
|
||||
H5_DLL herr_t H5VLgroup_close(void *grp, hid_t connector_id, hid_t dxpl_id, void **req);
|
||||
|
||||
/* Public wrappers for link callbacks */
|
||||
H5_DLL herr_t H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
H5_DLL herr_t H5VLlink_create(H5VL_link_create_type_t create_type, void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req, va_list arguments);
|
||||
H5_DLL herr_t H5VLlink_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
|
||||
void *dst_obj, const H5VL_loc_params_t *loc_params2, hid_t connector_id,
|
||||
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id, void **req);
|
||||
|
Loading…
Reference in New Issue
Block a user