00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00002 * Copyright by The HDF Group. * 00003 * Copyright by the Board of Trustees of the University of Illinois. * 00004 * All rights reserved. * 00005 * * 00006 * This file is part of HDF5. The full HDF5 copyright notice, including * 00007 * terms governing use, modification, and redistribution, is contained in * 00008 * the files COPYING and Copyright.html. COPYING can be found at the root * 00009 * of the source code distribution tree; Copyright.html can be found at the * 00010 * root level of an installed copy of the electronic HDF5 document set and * 00011 * is linked from the top-level documents page. It can also be found at * 00012 * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * 00013 * access to either file, you may request a copy from help@hdfgroup.org. * 00014 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00015 00016 /* 00017 * This file contains public declarations for the H5S module. 00018 */ 00019 #ifndef _H5Rpublic_H 00020 #define _H5Rpublic_H 00021 00022 /* Public headers needed by this file */ 00023 #include "H5public.h" 00024 #include "H5Gpublic.h" 00025 #include "H5Ipublic.h" 00026 00027 /* 00028 * Reference types allowed. 00029 */ 00030 typedef enum { 00031 H5R_BADTYPE = (-1), /*invalid Reference Type */ 00032 H5R_OBJECT, /*Object reference */ 00033 H5R_DATASET_REGION, /*Dataset Region Reference */ 00034 H5R_MAXTYPE /*highest type (Invalid as true type) */ 00035 } H5R_type_t; 00036 00037 /* Note! Be careful with the sizes of the references because they should really 00038 * depend on the run-time values in the file. Unfortunately, the arrays need 00039 * to be defined at compile-time, so we have to go with the worst case sizes for 00040 * them. -QAK 00041 */ 00042 #define H5R_OBJ_REF_BUF_SIZE sizeof(haddr_t) 00043 /* Object reference structure for user's code */ 00044 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) */ 00045 00046 #define H5R_DSET_REG_REF_BUF_SIZE (sizeof(haddr_t)+4) 00047 /* 4 is used instead of sizeof(int) to permit portability between 00048 the Crays and other machines (the heap ID is always encoded as an int32 anyway) 00049 */ 00050 /* Dataset Region reference structure for user's code */ 00051 typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE];/* Buffer to store heap ID and index */ 00052 /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */ 00053 00054 /* Publicly visible data structures */ 00055 00056 #ifdef __cplusplus 00057 extern "C" { 00058 #endif 00059 00060 /* Functions in H5R.c */ 00061 H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, 00062 H5R_type_t ref_type, hid_t space_id); 00063 H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref); 00064 H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); 00065 H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, 00066 H5O_type_t *obj_type); 00067 H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, 00068 char *name/*out*/, size_t size); 00069 00070 /* Symbols defined for compatibility with previous versions of the HDF5 API. 00071 * 00072 * Use of these symbols is deprecated. 00073 */ 00074 #ifndef H5_NO_DEPRECATED_SYMBOLS 00075 00076 /* Macros */ 00077 00078 00079 /* Typedefs */ 00080 00081 00082 /* Function prototypes */ 00083 H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref); 00084 00085 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 00086 00087 #ifdef __cplusplus 00088 } 00089 #endif 00090 00091 #endif /* _H5Rpublic_H */ 00092