HDF5  1.12.0
H5Iprivate.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*-----------------------------------------------------------------------------
15  * File: H5Iprivate.h
16  * Purpose: header file for ID API
17  *---------------------------------------------------------------------------*/
18 
19 /* avoid re-inclusion */
20 #ifndef _H5Iprivate_H
21 #define _H5Iprivate_H
22 
23 /* Include package's public header */
24 #include "H5Ipublic.h"
25 
26 /* Private headers needed by this file */
27 #include "H5private.h"
28 #include "H5VLprivate.h"
29 
30 /**************************/
31 /* Library Private Macros */
32 /**************************/
33 
34 /* Macro to determine if a H5I_type_t is a "library type" */
35 #define H5I_IS_LIB_TYPE( type ) (type > 0 && type < H5I_NTYPES)
36 
37 /* Flags for ID class */
38 #define H5I_CLASS_IS_APPLICATION 0x01
39 
40 
41 /****************************/
42 /* Library Private Typedefs */
43 /****************************/
44 
45 typedef struct H5I_class_t {
46  H5I_type_t type_id; /* Class ID for the type */
47  unsigned flags; /* Class behavior flags */
48  unsigned reserved; /* Number of reserved IDs for this type */
49  /* [A specific number of type entries may be
50  * reserved to enable "constant" values to be
51  * handed out which are valid IDs in the type,
52  * but which do not map to any data structures
53  * and are not allocated dynamically later.]
54  */
55  H5I_free_t free_func; /* Free function for object's of this type */
57 
58 
59 /*****************************/
60 /* Library-private Variables */
61 /*****************************/
62 
63 
64 /***************************************/
65 /* Library-private Function Prototypes */
66 /***************************************/
71 H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref);
72 H5_DLL int H5I_get_ref(hid_t id, hbool_t app_ref);
73 H5_DLL int H5I_inc_ref(hid_t id, hbool_t app_ref);
74 H5_DLL int H5I_dec_ref(hid_t id);
78 H5_DLL herr_t H5I_find_id(const void *object, H5I_type_t type, hid_t *id /*out*/);
79 
80 /* NOTE: The object and ID functions below deal in non-VOL objects (i.e.;
81  * H5S_t, etc.). Similar VOL calls exist in H5VLprivate.h. Use
82  * the H5VL calls with objects that go through the VOL, such as
83  * datasets and groups, and the H5I calls with objects
84  * that do not, such as property lists and dataspaces. Datatypes
85  * are can be either named, where they will use the VOL, or not,
86  * and thus require special treatment. See the datatype docs for
87  * how to handle this.
88  */
89 
90 /* Functions that manipulate objects */
91 H5_DLL void *H5I_object(hid_t id);
92 H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type);
93 H5_DLL void *H5I_remove(hid_t id);
94 H5_DLL void *H5I_subst(hid_t id, const void *new_object);
96 
97 /* ID registration functions */
98 H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref);
99 H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, hid_t existing_id);
100 
101 /* Debugging functions */
103 
104 #endif /* _H5Iprivate_H */
105 
H5Ipublic.h
H5I_dec_type_ref
H5_DLL int H5I_dec_type_ref(H5I_type_t type)
Definition: H5I.c:1747
H5I_is_file_object
H5_DLL htri_t H5I_is_file_object(hid_t id)
Definition: H5I.c:1104
H5I_class_t
Definition: H5Iprivate.h:45
H5I_type_t
H5I_type_t
Definition: H5Ipublic.h:33
H5I_class_t::free_func
H5I_free_t free_func
Definition: H5Iprivate.h:55
H5I_remove
H5_DLL void * H5I_remove(hid_t id)
Definition: H5I.c:1264
H5VLprivate.h
H5I_find_id
H5_DLL herr_t H5I_find_id(const void *object, H5I_type_t type, hid_t *id)
Definition: H5I.c:2340
H5I_dump_ids_for_type
H5_DLL herr_t H5I_dump_ids_for_type(H5I_type_t type)
Definition: H5I.c:2475
H5I_dec_app_ref_always_close
H5_DLL int H5I_dec_app_ref_always_close(hid_t id)
Definition: H5I.c:1455
H5I_free_t
herr_t(* H5I_free_t)(void *)
Definition: H5Ipublic.h:68
H5I_get_ref
H5_DLL int H5I_get_ref(hid_t id, hbool_t app_ref)
Definition: H5I.c:1596
H5I_class_t
struct H5I_class_t H5I_class_t
int64_t
int64_t
Definition: H5overflow.txt:35
H5I_dec_app_ref
H5_DLL int H5I_dec_app_ref(hid_t id)
Definition: H5I.c:1410
H5I_search_func_t
int(* H5I_search_func_t)(void *obj, hid_t id, void *key)
Definition: H5Ipublic.h:71
htri_t
int htri_t
Definition: H5public.h:160
hid_t
int64_t hid_t
Definition: H5Ipublic.h:55
H5I_clear_type
H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref)
Definition: H5I.c:550
H5I_subst
H5_DLL void * H5I_subst(hid_t id, const void *new_object)
Definition: H5I.c:900
H5I_object
H5_DLL void * H5I_object(hid_t id)
Definition: H5I.c:935
H5I_register_type
H5_DLL herr_t H5I_register_type(const H5I_class_t *cls)
Definition: H5I.c:292
H5I_dec_ref
H5_DLL int H5I_dec_ref(hid_t id)
Definition: H5I.c:1341
H5I_object_verify
H5_DLL void * H5I_object_verify(hid_t id, H5I_type_t id_type)
Definition: H5I.c:1002
H5I_class_t::reserved
unsigned reserved
Definition: H5Iprivate.h:48
H5I_class_t::flags
unsigned flags
Definition: H5Iprivate.h:47
H5I_inc_ref
H5_DLL int H5I_inc_ref(hid_t id, hbool_t app_ref)
Definition: H5I.c:1527
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
H5I_register_using_existing_id
H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, hid_t existing_id)
Definition: H5I.c:836
H5I_register
H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
Definition: H5I.c:775
H5I_nmembers
H5_DLL int64_t H5I_nmembers(H5I_type_t type)
Definition: H5I.c:438
herr_t
int herr_t
Definition: H5public.h:128
H5I_iterate
H5_DLL herr_t H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_ref)
Definition: H5I.c:2125
hbool_t
bool hbool_t
Definition: H5public.h:159
H5I_class_t::type_id
H5I_type_t type_id
Definition: H5Iprivate.h:46
H5I_get_type
H5_DLL H5I_type_t H5I_get_type(hid_t id)
Definition: H5I.c:1040
H5private.h