Given the identifier of an open file, file_id , and the desired object types, types , H5Fget H5F_obj_count returns GET_OBJ_COUNT returns the number of open object identifiers for the file. To retrieve a count of open identifiers for open objects in all HDF5 application files that are currently open, pass the value (hid_t)H5F_OBJ_ALL (Fortran: INT(H5F_OBJ_ALL_F,HID_T) ) in file_id . The types of objects to be counted are specified in types as follows: H5F_OBJ_FILE | Files only | H5F_OBJ_DATASET | Datasets only | H5F_OBJ_GROUP | Groups only | H5F_OBJ_DATATYPE | Named datatypes only | H5F_OBJ_ATTR | Attributes only | H5F_OBJ_ALL | All of the above (That is, H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR ) | H5F_OBJ_LOCAL | Restrict search to objects opened through current file identifier. Note: H5F_OBJ_LOCAL does not stand alone; it is effective only when used in combination with one or more of the preceding types. For example,
H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_LOCAL would count all datasets and groups opened through the current file identifier. |
Multiple object types can be combined with the logical OR operator (| ). For example, the expression (H5F_OBJ_DATASET|H5F_OBJ_GROUP) would call for datasets and groups. |