HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
H5Rpublic.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 files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at the *
10  * root level of an installed copy of the electronic HDF5 document set and *
11  * is linked from the top-level documents page. It can also be found at *
12  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
13  * access to either file, you may request a copy from help@hdfgroup.org. *
14  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /*
17  * This file contains public declarations for the H5S module.
18  */
19 #ifndef _H5Rpublic_H
20 #define _H5Rpublic_H
21 
22 /* Public headers needed by this file */
23 #include "H5public.h"
24 #include "H5Gpublic.h"
25 #include "H5Ipublic.h"
26 
27 /*
28  * Reference types allowed.
29  */
30 typedef enum {
31  H5R_BADTYPE = (-1), /*invalid Reference Type */
32  H5R_OBJECT, /*Object reference */
33  H5R_DATASET_REGION, /*Dataset Region Reference */
34  H5R_MAXTYPE /*highest type (Invalid as true type) */
35 } H5R_type_t;
36 
37 /* Note! Be careful with the sizes of the references because they should really
38  * depend on the run-time values in the file. Unfortunately, the arrays need
39  * to be defined at compile-time, so we have to go with the worst case sizes for
40  * them. -QAK
41  */
42 #define H5R_OBJ_REF_BUF_SIZE sizeof(haddr_t)
43 /* Object reference structure for user's code */
44 typedef haddr_t hobj_ref_t; /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) */
45 
46 #define H5R_DSET_REG_REF_BUF_SIZE (sizeof(haddr_t)+4)
47 /* 4 is used instead of sizeof(int) to permit portability between
48  the Crays and other machines (the heap ID is always encoded as an int32 anyway)
49 */
50 /* Dataset Region reference structure for user's code */
51 typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE];/* Buffer to store heap ID and index */
52 /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */
53 
54 /* Publicly visible data structures */
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /* Functions in H5R.c */
61 H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name,
62  H5R_type_t ref_type, hid_t space_id);
63 H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref);
64 H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref);
65 H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref,
66  H5O_type_t *obj_type);
67 H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref,
68  char *name/*out*/, size_t size);
69 
70 /* Symbols defined for compatibility with previous versions of the HDF5 API.
71  *
72  * Use of these symbols is deprecated.
73  */
74 #ifndef H5_NO_DEPRECATED_SYMBOLS
75 
76 /* Macros */
77 
78 
79 /* Typedefs */
80 
81 
82 /* Function prototypes */
83 H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref);
84 
85 #endif /* H5_NO_DEPRECATED_SYMBOLS */
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* _H5Rpublic_H */
92 
H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref)
H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref)
#define H5_DLL
Definition: H5api_adpt.h:406
int herr_t
Definition: H5public.h:107
H5O_type_t
Definition: H5Opublic.h:83
GLsizeiptr size
Definition: glcorearb.h:663
H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size)
uint64_t haddr_t
Definition: H5public.h:163
GLint ref
Definition: glcorearb.h:123
H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id)
int hid_t
Definition: H5Ipublic.h:56
GLuint const GLchar * name
Definition: glcorearb.h:785
H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type)
unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE]
Definition: H5Rpublic.h:51
H5R_type_t
Definition: H5Rpublic.h:30
H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref)
H5G_obj_t
Definition: H5Gpublic.h:119
#define H5R_DSET_REG_REF_BUF_SIZE
Definition: H5Rpublic.h:46
haddr_t hobj_ref_t
Definition: H5Rpublic.h:44