1 module hdf5.H5Rpublic; 2 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 * Copyright by The HDF Group. * 5 * Copyright by the Board of Trustees of the University of Illinois. * 6 * All rights reserved. * 7 * * 8 * This file is part of HDF5. The full HDF5 copyright notice, including * 9 * terms governing use, modification, and redistribution, is contained in * 10 * the files COPYING and Copyright.html. COPYING can be found at the root * 11 * of the source code distribution tree; Copyright.html can be found at the * 12 * root level of an installed copy of the electronic HDF5 document set and * 13 * is linked from the top-level documents page. It can also be found at * 14 * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * 15 * access to either file, you may request a copy from help@hdfgroup.org. * 16 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 17 18 /* 19 * This file contains public declarations for the H5S module. 20 */ 21 22 23 /* Public headers needed by this file */ 24 import hdf5.H5public: haddr_t, herr_t; 25 import hdf5.H5Ipublic: hid_t; 26 import hdf5.H5Gpublic: H5O_type_t; 27 28 /* 29 * Reference types allowed. 30 */ 31 enum H5R_type_t { 32 H5R_BADTYPE = (-1), /*invalid Reference Type */ 33 H5R_OBJECT, /*Object reference */ 34 H5R_DATASET_REGION, /*Dataset Region Reference */ 35 H5R_MAXTYPE /*highest type (Invalid as true type) */ 36 }; 37 38 /* Note! Be careful with the sizes of the references because they should really 39 * depend on the run-time values in the file. Unfortunately, the arrays need 40 * to be defined at compile-time, so we have to go with the worst case sizes for 41 * them. -QAK 42 */ 43 enum H5R_OBJ_REF_BUF_SIZE = haddr_t.sizeof; 44 /* Object reference structure for user's code */ 45 alias hobj_ref_t = haddr_t; /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) */ 46 47 enum H5R_DSET_REG_REF_BUF_SIZE = (haddr_t.sizeof+4); 48 /* 4 is used instead of sizeof(int) to permit portability between 49 the Crays and other machines (the heap ID is always encoded as an int32 anyway) 50 */ 51 /* Dataset Region reference structure for user's code */ 52 alias hdset_reg_ref_t = ubyte[H5R_DSET_REG_REF_BUF_SIZE];/* Buffer to store heap ID and index */ 53 54 /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */ 55 56 /* Publicly visible data structures */ 57 58 extern(C) { 59 60 /* Functions in H5R.c */ 61 herr_t H5Rcreate(void *reference, hid_t loc_id, const char *name, 62 H5R_type_t ref_type, hid_t space_id); 63 hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *reference); 64 hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *reference); 65 herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *reference, 66 H5O_type_t *obj_type); 67 ptrdiff_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *reference, 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 version(H5_NO_DEPRECATED_SYMBOLS) 75 { 76 /* Macros */ 77 78 79 /* Typedefs */ 80 81 82 /* Function prototypes */ 83 H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *reference); 84 } 85 86 }