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 * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> 00018 * Thursday, May 15, 2003 00019 * 00020 * Purpose: This file contains declarations which are visible only within 00021 * the H5I package. Source files outside the H5I package should 00022 * include H5Iprivate.h instead. 00023 */ 00024 #ifndef H5I_PACKAGE 00025 #error "Do not include this file outside the H5I package!" 00026 #endif 00027 00028 #ifndef _H5Ipkg_H 00029 #define _H5Ipkg_H 00030 00031 /* Get package's private header */ 00032 #include "H5Iprivate.h" 00033 00034 /* Other private headers needed by this file */ 00035 00036 /**************************/ 00037 /* Package Private Macros */ 00038 /**************************/ 00039 00040 /* 00041 * Number of bits to use for ID Type in each atom. Increase if more types 00042 * are needed (though this will decrease the number of available IDs per 00043 * type). This is the only number that must be changed since all other bit 00044 * field sizes and masks are calculated from TYPE_BITS. 00045 */ 00046 #define TYPE_BITS 7 00047 #define TYPE_MASK ((1<<TYPE_BITS)-1) 00048 00049 #define MAX_NUM_TYPES TYPE_MASK 00050 00051 /* 00052 * Number of bits to use for the Atom index in each atom (assumes 8-bit 00053 * bytes). We don't use the sign bit. 00054 */ 00055 #define ID_BITS ((sizeof(hid_t)*8)-(TYPE_BITS+1)) 00056 #define ID_MASK ((1<<ID_BITS)-1) 00057 00058 /* Map an atom to an ID type number */ 00059 #define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & TYPE_MASK)) 00060 00061 00062 /****************************/ 00063 /* Package Private Typedefs */ 00064 /****************************/ 00065 00066 /******************************/ 00067 /* Package Private Prototypes */ 00068 /******************************/ 00069 00070 #endif /*_H5Ipkg_H*/