Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2025-11-11 The HDF5 Field Guide

- Main Page
- Getting started
- User Guide
- Reference Manual
- Cookbook
- Technical Notes
- RFCs
- Specifications
- Glossary
- Full-Text Search
- About

Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Functions
H5Ipublic.h File Reference
`#include "H5public.h"`

## Macros
#define | H5_SIZEOF_HID_T H5_SIZEOF_INT64_T
#define | H5I_INVALID_HID (-1)
#define | PRIdHID PRId64
#define | PRIoHID PRIo64
#define | PRIXHID PRIX64

## Typedefs
typedef herr_t(* | H5I_free_t) (void *obj, void **request)
typedef herr_t(* | H5I_iterate_func_t) (hid_t id, void *udata)
typedef int(* | H5I_search_func_t) (void *obj, hid_t id, void *key)
typedef int64_t | hid_t

## Enumerations
enum | H5I_type_t { H5I_UNINIT = (-2) , H5I_BADID = (-1) , H5I_FILE = 1 , H5I_GROUP , H5I_DATATYPE , H5I_DATASPACE , H5I_DATASET , H5I_MAP , H5I_ATTR , H5I_VFL , H5I_VOL , H5I_GENPROP_CLS , H5I_GENPROP_LST , H5I_ERROR_CLASS , H5I_ERROR_MSG , H5I_ERROR_STACK , H5I_SPACE_SEL_ITER , H5I_EVENTSET , H5I_NTYPES }

## Functions
herr_t | H5Iclear_type (H5I_type_t type, bool force)
| Deletes all identifiers of the given type.
int | H5Idec_ref (hid_t id)
| Decrements the reference count for an object.
int | H5Idec_type_ref (H5I_type_t type)
| Decrements the reference count on an identifier type.
herr_t | H5Idestroy_type (H5I_type_t type)
| Removes an identifier type and all identifiers within that type.
hid_t | H5Iget_file_id (hid_t id)
| Retrieves an identifier for the file containing the specified object.
ssize_t | H5Iget_name (hid_t id, char *name, size_t size)
| Retrieves a name of an object based on the object identifier.
int | H5Iget_ref (hid_t id)
| Retrieves the reference count for an object.
H5I_type_t | H5Iget_type (hid_t id)
| Retrieves the type of an object.
int | H5Iget_type_ref (H5I_type_t type)
| Retrieves the reference count on an ID type.
int | H5Iinc_ref (hid_t id)
| Increments the reference count for an object.
int | H5Iinc_type_ref (H5I_type_t type)
| Increments the reference count on an ID type.
htri_t | H5Iis_valid (hid_t id)
| Determines whether an identifier is valid.
herr_t | H5Iiterate (H5I_type_t type, H5I_iterate_func_t op, void *op_data)
| Calls a callback for each member of the identifier type specified.
herr_t | H5Inmembers (H5I_type_t type, hsize_t *num_members)
| Returns the number of identifiers in a given identifier type.
void * | H5Iobject_verify (hid_t id, H5I_type_t type)
| Returns the object referenced by an ID.
hid_t | H5Iregister (H5I_type_t type, const void *object)
| Registers an object under a type and returns an ID for it.
H5I_type_t | H5Iregister_type1 (size_t hash_size, unsigned reserved, H5I_free_t free_func)
| Creates and returns a new ID type.
H5I_type_t | H5Iregister_type2 (unsigned reserved, H5I_free_t free_func)
| Creates and returns a new ID type.
void * | H5Iremove_verify (hid_t id, H5I_type_t type)
| Removes an ID from its type.
void * | H5Isearch (H5I_type_t type, H5I_search_func_t func, void *key)
| Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied.
htri_t | H5Itype_exists (H5I_type_t type)
| Determines whether an identifier type is registered.

## Macro Definition Documentation

## ◆ H5_SIZEOF_HID_T

#define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T

The size of identifiers

## ◆ H5I_INVALID_HID

#define H5I_INVALID_HID (-1)

An invalid object ID. This is also negative for error return.

## ◆ PRIdHID

#define PRIdHID PRId64

## ◆ PRIoHID

#define PRIoHID PRIo64

## ◆ PRIXHID

#define PRIXHID PRIX64

## ◆ PRIxHID

#define PRIxHID PRIx64

## Typedef Documentation

## ◆ H5I_free_t

typedef herr_t(* H5I_free_t) (void *obj, void **request)

A function for freeing objects. This function will be called with a pointer to the object and a pointer to a pointer to the asynchronous request object. The function should free the object and return non-negative to indicate that the object can be removed from the ID type. If the function returns negative (failure) then the object will remain in the ID type. For asynchronous operations and handling the request parameter, see the HDF5 user guide and VOL connector author guide.

## ◆ H5I_iterate_func_t

typedef herr_t(* H5I_iterate_func_t) (hid_t id, void *udata)

The type of H5Iiterate() callback functions

## ◆ H5I_search_func_t

typedef int(* H5I_search_func_t) (void *obj, hid_t id, void *key)

The type of a function to compare objects & keys

## ◆ hid_t

typedef int64_t hid_t

Type of IDs to return to users

## Enumeration Type Documentation

## ◆ H5I_type_t

enum H5I_type_t

Library type values.

Enumerator
H5I_UNINIT | uninitialized type
H5I_BADID | invalid Type
H5I_FILE | type ID for File objects
H5I_GROUP | type ID for Group objects
H5I_DATATYPE | type ID for Datatype objects
H5I_DATASPACE | type ID for Dataspace objects
H5I_DATASET | type ID for Dataset objects
H5I_MAP | type ID for Map objects
H5I_ATTR | type ID for Attribute objects
H5I_VFL | type ID for virtual file layer
H5I_VOL | type ID for virtual object layer
H5I_GENPROP_CLS | type ID for generic property list classes
H5I_GENPROP_LST | type ID for generic property lists
H5I_ERROR_CLASS | type ID for error classes
H5I_ERROR_MSG | type ID for error messages
H5I_ERROR_STACK | type ID for error stacks
H5I_SPACE_SEL_ITER | type ID for dataspace selection iterator
H5I_EVENTSET | type ID for event sets
H5I_NTYPES | number of library types, MUST BE LAST!