- function hdf5_get_dataset_info_by_name() added

- args of function hdf5_get_npoints_of_dataset_by_name() are now const
This commit is contained in:
2011-03-11 16:11:23 +00:00
parent 745e2229e7
commit 4d348dbe0d
2 changed files with 39 additions and 4 deletions
+28 -2
View File
@@ -435,8 +435,8 @@ hdf5_get_npoints_of_dataset (
h5_ssize_t
hdf5_get_npoints_of_dataset_by_name (
hid_t loc_id,
char* name
const hid_t loc_id,
const char* const name
) {
HDF5_WRAPPER_ENTER3 (h5_ssize_t,
"loc_id=%d (%s), name=\"%s\"",
@@ -1628,6 +1628,32 @@ hdf5_get_dataset_info_by_idx (
H5_CORE_API_RETURN (H5_SUCCESS);
}
h5_err_t
hdf5_get_dataset_info_by_name (
const hid_t loc_id, /*!< [in] Group */
const hsize_t idx, /*!< [in] Index of the dataset */
const char* name, /*!< [in] Name of dataset */
h5_int64_t* const type, /*!< [out] Type of data in dataset */
hsize_t* const npoints /*!< [out] Number of elements. */
) {
HDF5_WRAPPER_ENTER4 (h5_err_t,
"loc_id=%d (%s), idx=%llu, name=\"%s\"",
loc_id, hdf5_get_objname (loc_id),
idx, name);
if (npoints) {
h5_ssize_t np;
TRY (np = hdf5_get_npoints_of_dataset_by_name (loc_id, name));
*npoints = np;
}
if (type) {
h5_int64_t t;
TRY (t = h5_get_dataset_type (loc_id, name));
*type = t;
}
H5_CORE_API_RETURN (H5_SUCCESS);
}
/****** I d e n t i f i e r **************************************************/
const char *
+11 -2
View File
@@ -97,8 +97,8 @@ hdf5_get_npoints_of_dataset (
h5_ssize_t
hdf5_get_npoints_of_dataset_by_name (
hid_t loc_id,
char* name
const hid_t loc_id,
const char* const name
);
/*** dataspace ***/
@@ -377,4 +377,13 @@ hdf5_delete_link (
hid_t lapl_id
);
/*** other ***/
h5_err_t
hdf5_get_dataset_info_by_name (
const hid_t loc_id,
const hsize_t idx,
const char* name,
h5_int64_t* const type,
hsize_t* const npoints
);
#endif