MISR Toolkit  1.5.1
H5Ipublic.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  * This file contains function prototypes for each exported function in
16  * the H5I module.
17  */
18 #ifndef _H5Ipublic_H
19 #define _H5Ipublic_H
20 
21 /* Public headers needed by this file */
22 #include "H5public.h"
23 
24 /*
25  * Library type values. Start with `1' instead of `0' because it makes the
26  * tracing output look better when hid_t values are large numbers. Change the
27  * TYPE_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will
28  * fail otherwise).
29  *
30  * When adding types here, add a section to the 'misc19' test in test/tmisc.c
31  * to verify that the H5I{inc|dec|get}_ref() routines work correctly with in.
32  *
33  */
34 typedef enum H5I_type_t {
35  H5I_UNINIT = (-2), /*uninitialized type */
36  H5I_BADID = (-1), /*invalid Type */
37  H5I_FILE = 1, /*type ID for File objects */
38  H5I_GROUP, /*type ID for Group objects */
39  H5I_DATATYPE, /*type ID for Datatype objects */
40  H5I_DATASPACE, /*type ID for Dataspace objects */
41  H5I_DATASET, /*type ID for Dataset objects */
42  H5I_ATTR, /*type ID for Attribute objects */
43  H5I_REFERENCE, /*type ID for Reference objects */
44  H5I_VFL, /*type ID for virtual file layer */
45  H5I_GENPROP_CLS, /*type ID for generic property list classes */
46  H5I_GENPROP_LST, /*type ID for generic property lists */
47  H5I_ERROR_CLASS, /*type ID for error classes */
48  H5I_ERROR_MSG, /*type ID for error messages */
49  H5I_ERROR_STACK, /*type ID for error stacks */
50  H5I_NTYPES /*number of library types, MUST BE LAST! */
51 } H5I_type_t;
52 
53 /* Type of atoms to return to users */
54 typedef int hid_t;
55 #define H5_SIZEOF_HID_T H5_SIZEOF_INT
56 
57 /* An invalid object ID. This is also negative for error return. */
58 #define H5I_INVALID_HID (-1)
59 
60 /*
61  * Function for freeing objects. This function will be called with an object
62  * ID type number and a pointer to the object. The function should free the
63  * object and return non-negative to indicate that the object
64  * can be removed from the ID type. If the function returns negative
65  * (failure) then the object will remain in the ID type.
66  */
67 typedef herr_t (*H5I_free_t)(void*);
68 
69 /* Type of the function to compare objects & keys */
70 typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key);
71 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75 
76 /* Public API functions */
77 
78 H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object);
79 H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t id_type);
80 H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t id_type);
81 H5_DLL H5I_type_t H5Iget_type(hid_t id);
82 H5_DLL hid_t H5Iget_file_id(hid_t id);
83 H5_DLL ssize_t H5Iget_name(hid_t id, char *name/*out*/, size_t size);
84 H5_DLL int H5Iinc_ref(hid_t id);
85 H5_DLL int H5Idec_ref(hid_t id);
86 H5_DLL int H5Iget_ref(hid_t id);
87 H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func);
88 H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force);
89 H5_DLL herr_t H5Idestroy_type(H5I_type_t type);
90 H5_DLL int H5Iinc_type_ref(H5I_type_t type);
91 H5_DLL int H5Idec_type_ref(H5I_type_t type);
92 H5_DLL int H5Iget_type_ref(H5I_type_t type);
93 H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key);
94 H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members);
95 H5_DLL htri_t H5Itype_exists(H5I_type_t type);
96 H5_DLL htri_t H5Iis_valid(hid_t id);
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 #endif /* _H5Ipublic_H */
102 
herr_t(* H5I_free_t)(void *)
Definition: H5Ipublic.h:67
H5_DLL int H5Iget_type_ref(H5I_type_t type)
H5_DLL int H5Iget_ref(hid_t id)
unsigned int hbool_t
Definition: H5public.h:142
int(* H5I_search_func_t)(void *obj, hid_t id, void *key)
Definition: H5Ipublic.h:70
long long ssize_t
Definition: H5public.h:156
#define H5_DLL
Definition: H5api_adpt.h:256
H5_DLL void * H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
int herr_t
Definition: H5public.h:124
H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object)
unsigned long long hsize_t
Definition: H5public.h:169
H5_DLL void * H5Iremove_verify(hid_t id, H5I_type_t id_type)
H5_DLL herr_t H5Idestroy_type(H5I_type_t type)
H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members)
H5_DLL htri_t H5Iis_valid(hid_t id)
HDFFCLIBAPI _fcd name
H5I_type_t
Definition: H5Ipublic.h:34
HDFFCLIBAPI intf * size
H5_DLL int H5Iinc_ref(hid_t id)
int hid_t
Definition: H5Ipublic.h:54
H5_DLL void * H5Iobject_verify(hid_t id, H5I_type_t id_type)
HDFFCLIBAPI _fcd id
H5_DLL int H5Idec_type_ref(H5I_type_t type)
H5_DLL ssize_t H5Iget_name(hid_t id, char *name, size_t size)
H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force)
H5_DLL hid_t H5Iget_file_id(hid_t id)
HDFFCLIBAPI intf intf intf * type
H5_DLL int H5Idec_ref(hid_t id)
H5_DLL int H5Iinc_type_ref(H5I_type_t type)
H5_DLL htri_t H5Itype_exists(H5I_type_t type)
int htri_t
Definition: H5public.h:143
H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
H5_DLL H5I_type_t H5Iget_type(hid_t id)

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52