Page tree









Retrieve native file format information about an object according to the order of an index


H5O_GET_NATIVE_INFO_BY_IDX ( loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id )


herr_t H5Oget_native_info_by_idx ( hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, 
           hsize_t n, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id )

hid_t loc_idIN: Location identifier of the object
const char *group_nameIN: Name of group in which object is located
H5_index_t idx_typeIN: Index or field that determines the order
H5_iter_order_t orderIN: Order within field or index
hsize_t nIN: Object for which information is to be returned
H5O_native_info_t *oinfoOUT: Buffer in which to return native object information
unsigned fieldsIN: Flags to determine which fields in oinfo are filled in
hid_t lapl_idIN: Link access property list


H5O_GET_NATIVE_INFO_BY_IDX retrieves the native file format information for an object specified by loc_id, group name, group_name, the index by which objects in the group are tracked, idx_type, the order by which the index is to be traversed, order , and an object's position n within that index. The information is retrieved into the buffer specified by oinfo, which is defined as a struct of type H5O_native_info_t:

src / H5Opublic.h [143:152]
 hdf5_1_12  HDFFV/hdf5  Copy
    hsize_t       num_attrs; /* # of attributes attached to object   */
} H5O_info2_t;

/* Native file format information struct for objects */
/* (For H5Oget_native_info / H5Oget_native_info_by_name / H5Oget_native_info_by_idx) */
typedef struct H5O_native_info_t {
    H5O_hdr_info_t hdr; /* Object header information */
    /* Extra metadata storage for obj & attributes */
    struct {
        H5_ih_info_t obj;  /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */

idx_type is of type H5_index_t, defined in H5public.h as:

src / H5public.h [311:321]
 hdf5_1_12  HDFFV/hdf5  Copy
    H5_INDEX_UNKNOWN = -1, /* Unknown index type                   */
    H5_INDEX_NAME,         /* Index on names                       */
    H5_INDEX_CRT_ORDER,    /* Index on creation order              */
    H5_INDEX_N             /* Number of indices defined            */
} H5_index_t;

 * Storage info struct used by H5O_info_t and H5F_info_t
typedef struct H5_ih_info_t {
    hsize_t index_size; /* btree and/or list */

order is of type H5_iter_order_t defined in H5public.h as:

src / H5public.h [294:301]
 hdf5_1_12  HDFFV/hdf5  Copy
    H5_ITER_N             /* Number of iteration orders */
} H5_iter_order_t;

/* Iteration callback values */
/* (Actually, any positive value will cause the iterator to stop and pass back
 *      that positive value to the function that called the iterator)
#define H5_ITER_ERROR (-1)

The fields parameter indicates which fields to fill in H5O_native_info_t. Possible values are:

src / H5Opublic.h [89:91]
 hdf5_1_12  HDFFV/hdf5  Copy
/* Flags for H5Oget_native_info.
 * Theses flags determine which fields will be filled in in the H5O_native_info_t
 * struct.


Returns a non-negative value if successful; otherwise returns a negative value.


1.12.0Function released in this version.

--- Last Modified: June 02, 2020 | 09:16 AM