Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

HDF5Portable.H

Go to the documentation of this file.
00001 
00002 /* _______              __
00003   / ___/ /  ___  __ _  / /  ___
00004  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00005  \___/_//_/\___/_/_/_/_.__/\___/ 
00006 */
00007 //
00008 // This software is copyright (C) by the Lawrence Berkeley
00009 // National Laboratory.  Permission is granted to reproduce
00010 // this software for non-commercial purposes provided that
00011 // this notice is left intact.
00012 // 
00013 // It is acknowledged that the U.S. Government has rights to
00014 // this software under Contract DE-AC03-765F00098 between
00015 // the U.S.  Department of Energy and the University of
00016 // California.
00017 //
00018 // This software is provided as a professional and academic
00019 // contribution for joint exchange. Thus it is experimental,
00020 // is provided ``as is'', with no warranties of any kind
00021 // whatsoever, no support, no promise of updates, or printed
00022 // documentation. By using this software, you acknowledge
00023 // that the Lawrence Berkeley National Laboratory and
00024 // Regents of the University of California shall have no
00025 // liability with respect to the infringement of other
00026 // copyrights by any part of this software.
00027 //
00028 //  ANAG, LBNL
00029 
00030 
00031 #ifndef HDF5PORTABLE_H
00032 #define HDF5PORTABLE_H
00033 
00034 #include "Vector.H"
00035 extern "C"
00036 {
00037 #ifdef HDF5
00038 #include <hdf5.h>
00039 #else
00040   typedef long hid_t ;
00041 #endif
00042 }
00043 #include "Box.H"
00044 #include "Interval.H"
00045 
00046 template <class T>
00047 void dataTypes(Vector<hid_t>& a_types, const T& a_dummySpecializationArg);
00048 
00049 template <class T>
00050 void dataSize(const T& item, Vector<int>& a_sizes, 
00051               const Box& box, const Interval& comps);
00052 
00053 template <class T>
00054 void write(const T& item, Vector<void*>& a_allocatedBuffers, 
00055            const Box& box, const Interval& comps);
00056 
00057 template <class T>
00058 void read(T& item, Vector<void*>& a_allocatedBuffers, const Box& box, 
00059           const Interval& comps);
00060 
00061 template <class T>
00062 const char* name(const T& a_dummySpecializationArg);
00063 
00064 // These are the default template declarations for the HDF5 I/O
00065 // template functions needed by T objects for binary IO.  The default
00066 // implementations use the linearOut/linearIn/size functions of the
00067 // T template classes to provide non-portable binary IO.
00068 //     A user can add their own template specializations for
00069 // portable binary IO abilities. 
00070 //
00071 //  To use this header, a user includes this file first, then
00072 //  decalres their template specializations, then includes the CH_HDF5.H
00073 //  header file.
00074 // 
00075 //
00076 //
00077 //  http://hdf.ncsa.uiuc.edu/HDF5/
00078 //
00079 // available datatypes in HDF5 
00080 //
00081 //            Example
00082 //                                                  Corresponding C Type
00083 //            H5T_NATIVE_CHAR
00084 //                                                  char
00085 //            H5T_NATIVE_UCHAR
00086 //                                                  unsigned char
00087 //            H5T_NATIVE_SHORT
00088 //                                                  short
00089 //            H5T_NATIVE_USHORT
00090 //                                                  unsigned short
00091 //            H5T_NATIVE_INT
00092 //                                                  int
00093 //            H5T_NATIVE_UINT
00094 //                                                  unsigned
00095 //            H5T_NATIVE_LONG
00096 //                                                  long
00097 //            H5T_NATIVE_ULONG
00098 //                                                  unsigned long
00099 //            H5T_NATIVE_FLOAT
00100 //                                                  float
00101 //            H5T_NATIVE_DOUBLE
00102 //                                                  double
00103 //
00104 // and some special ones defined for Chombo:
00105 //
00106 //            H5T_NATIVE_REAL                       Real
00107 //
00108 //            box_id                                Box
00109 //
00110 //            intvext_id                            IntVect
00111 #endif
00112 
00113 
00114 
00115 
00116 
00117 
00118 

Generated on Wed Jun 2 13:53:33 2004 for Chombo&INSwithParticles by doxygen 1.3.2