MISR Toolkit  1.5.1
H5Gpublic.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  *
16  * Created: H5Gpublic.h
17  * Jul 11 1997
18  * Robb Matzke <matzke@llnl.gov>
19  *
20  * Purpose: Public declarations for the H5G package
21  *
22  *-------------------------------------------------------------------------
23  */
24 #ifndef _H5Gpublic_H
25 #define _H5Gpublic_H
26 
27 /* System headers needed by this file */
28 #include <sys/types.h>
29 
30 /* Public headers needed by this file */
31 #include "H5public.h" /* Generic Functions */
32 #include "H5Lpublic.h" /* Links */
33 #include "H5Opublic.h" /* Object headers */
34 #include "H5Tpublic.h" /* Datatypes */
35 
36 /*****************/
37 /* Public Macros */
38 /*****************/
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*******************/
45 /* Public Typedefs */
46 /*******************/
47 
48 /* Types of link storage for groups */
49 typedef enum H5G_storage_type_t {
50  H5G_STORAGE_TYPE_UNKNOWN = -1, /* Unknown link storage type */
51  H5G_STORAGE_TYPE_SYMBOL_TABLE, /* Links in group are stored with a "symbol table" */
52  /* (this is sometimes called "old-style" groups) */
53  H5G_STORAGE_TYPE_COMPACT, /* Links are stored in object header */
54  H5G_STORAGE_TYPE_DENSE /* Links are stored in fractal heap & indexed with v2 B-tree */
56 
57 /* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */
58 typedef struct H5G_info_t {
59  H5G_storage_type_t storage_type; /* Type of storage for links in group */
60  hsize_t nlinks; /* Number of links in group */
61  int64_t max_corder; /* Current max. creation order value for group */
62  hbool_t mounted; /* Whether group has a file mounted on it */
63 } H5G_info_t;
64 
65 /********************/
66 /* Public Variables */
67 /********************/
68 
69 
70 /*********************/
71 /* Public Prototypes */
72 /*********************/
73 H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id,
74  hid_t gcpl_id, hid_t gapl_id);
75 H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id);
76 H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id);
78 H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo);
79 H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo,
80  hid_t lapl_id);
81 H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name,
83  hid_t lapl_id);
84 H5_DLL herr_t H5Gclose(hid_t group_id);
85 
86 /* Symbols defined for compatibility with previous versions of the HDF5 API.
87  *
88  * Use of these symbols is deprecated.
89  */
90 #ifndef H5_NO_DEPRECATED_SYMBOLS
91 
92 /* Macros */
93 
94 /* Link definitions */
95 #define H5G_SAME_LOC H5L_SAME_LOC
96 #define H5G_LINK_ERROR H5L_TYPE_ERROR
97 #define H5G_LINK_HARD H5L_TYPE_HARD
98 #define H5G_LINK_SOFT H5L_TYPE_SOFT
99 #define H5G_link_t H5L_type_t
100 
101 /* Macros for types of objects in a group (see H5G_obj_t definition) */
102 #define H5G_NTYPES 256 /* Max possible number of types */
103 #define H5G_NLIBTYPES 8 /* Number of internal types */
104 #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES)
105 #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */
106 
107 
108 /* Typedefs */
109 
110 /*
111  * An object has a certain type. The first few numbers are reserved for use
112  * internally by HDF5. Users may add their own types with higher values. The
113  * values are never stored in the file -- they only exist while an
114  * application is running. An object may satisfy the `isa' function for more
115  * than one type.
116  */
117 typedef enum H5G_obj_t {
118  H5G_UNKNOWN = -1, /* Unknown object type */
119  H5G_GROUP, /* Object is a group */
120  H5G_DATASET, /* Object is a dataset */
121  H5G_TYPE, /* Object is a named data type */
122  H5G_LINK, /* Object is a symbolic link */
123  H5G_UDLINK, /* Object is a user-defined link */
124  H5G_RESERVED_5, /* Reserved for future use */
125  H5G_RESERVED_6, /* Reserved for future use */
126  H5G_RESERVED_7 /* Reserved for future use */
127 } H5G_obj_t;
128 
129 /* Prototype for H5Giterate() operator */
130 typedef herr_t (*H5G_iterate_t)(hid_t group, const char *name, void *op_data);
131 
132 /* Information about an object */
133 typedef struct H5G_stat_t {
134  unsigned long fileno[2]; /*file number */
135  unsigned long objno[2]; /*object number */
136  unsigned nlink; /*number of hard links to object*/
137  H5G_obj_t type; /*basic object type */
138  time_t mtime; /*modification time */
139  size_t linklen; /*symbolic link value length */
140  H5O_stat_t ohdr; /* Object header information */
141 } H5G_stat_t;
142 
143 
144 /* Function prototypes */
145 H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint);
146 H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name);
147 H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name,
148  const char *new_name);
149 H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type,
150  hid_t new_loc_id, const char *new_name);
151 H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name,
152  const char *dst_name);
153 H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
154  const char *dst_name);
155 H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name);
156 H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size,
157  char *buf/*out*/);
158 H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment);
159 H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize,
160  char *buf);
161 H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx,
162  H5G_iterate_t op, void *op_data);
163 H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs);
164 H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name,
165  hbool_t follow_link, H5G_stat_t *statbuf/*out*/);
167  size_t size);
168 H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx);
169 
170 #endif /* H5_NO_DEPRECATED_SYMBOLS */
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 #endif /* _H5Gpublic_H */
176 
H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id, const char *new_name)
hsize_t nlinks
Definition: H5Gpublic.h:60
unsigned int hbool_t
Definition: H5public.h:142
HDFFCLIBAPI intf * idx
int64_t max_corder
Definition: H5Gpublic.h:61
H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name)
struct H5G_stat_t H5G_stat_t
H5_DLL hid_t H5Gget_create_plist(hid_t group_id)
H5_index_t
Definition: H5public.h:305
long long ssize_t
Definition: H5public.h:156
#define H5_DLL
Definition: H5api_adpt.h:256
int herr_t
Definition: H5public.h:124
H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
unsigned nlink
Definition: H5Gpublic.h:136
H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name)
H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name)
unsigned long long hsize_t
Definition: H5public.h:169
struct H5G_info_t H5G_info_t
hbool_t mounted
Definition: H5Gpublic.h:62
H5_DLL herr_t H5Gclose(hid_t group_id)
#define H5G_link_t
Definition: H5Gpublic.h:99
H5G_storage_type_t
Definition: H5Gpublic.h:49
H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo)
HDFFCLIBAPI _fcd name
H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
H5_iter_order_t
Definition: H5public.h:284
H5G_storage_type_t storage_type
Definition: H5Gpublic.h:59
size_t linklen
Definition: H5Gpublic.h:139
HDFFCLIBAPI _fcd intf intf * order
H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id)
HDFFCLIBAPI intf * size
int hid_t
Definition: H5Ipublic.h:54
HDFFCLIBAPI _fcd _fcd intf * n
H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id)
herr_t(* H5G_iterate_t)(hid_t group, const char *name, void *op_data)
Definition: H5Gpublic.h:130
H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name)
time_t mtime
Definition: H5Gpublic.h:138
H5G_obj_t type
Definition: H5Gpublic.h:137
H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx, H5G_iterate_t op, void *op_data)
HDFFCLIBAPI intf intf intf * type
H5G_obj_t
Definition: H5Gpublic.h:117
H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf)
H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, H5G_stat_t *statbuf)
H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name)
H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size)
H5O_stat_t ohdr
Definition: H5Gpublic.h:140
HDFFCLIBAPI intf * buf
H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id)

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