HDF5 C++ API Reference Manual

 

 

H5PredType.h

Go to the documentation of this file.
00001 // C++ informative line for the emacs editor: -*- C++ -*-
00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00003  * Copyright by The HDF Group.                                               *
00004  * Copyright by the Board of Trustees of the University of Illinois.         *
00005  * All rights reserved.                                                      *
00006  *                                                                           *
00007  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00008  * terms governing use, modification, and redistribution, is contained in    *
00009  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00010  * of the source code distribution tree; Copyright.html can be found at the  *
00011  * root level of an installed copy of the electronic HDF5 document set and   *
00012  * is linked from the top-level documents page.  It can also be found at     *
00013  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00014  * access to either file, you may request a copy from help@hdfgroup.org.     *
00015  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00016 
00017 // PredType holds the definition of all the HDF5 predefined datatypes.
00018 // These types can only be made copy of, not created by H5Tcreate or
00019 // closed by H5Tclose.  They are treated as constants.
00021 
00022 #ifndef _H5PredType_H
00023 #define _H5PredType_H
00024 
00025 #ifndef H5_NO_NAMESPACE
00026 namespace H5 {
00027 #endif
00028 
00029 /* This constant is defined for a workaround to eliminate memory leaks due to
00030    the library being re-initiated when PredType destructors are invoked.  A
00031    PredType instant with H5CPP_EXITED as the value of its "id" is constructed
00032    before the other PredType objects are created.  At exit, when this special
00033    PredType object is to be destructed, no HDF5 library function will be called
00034    and the library will be terminated.  -BMR, Mar 30, 2012 */
00035 #define H5CPP_EXITED    -3  // -3 is less likely to be used elsewhere
00036 
00037 class H5_DLLCPP PredType : public AtomType {
00038    public:
00040         virtual H5std_string fromClass () const { return("PredType"); }
00041 
00042         // Makes a copy of the predefined type and stores the new
00043         // id in the left hand side object.
00044         PredType& operator=( const PredType& rhs );
00045 
00046         // Copy constructor - makes copy of the original object
00047         PredType( const PredType& original );
00048 
00049         // Noop destructor
00050         virtual ~PredType();
00051 
00052         // Declaration of predefined types; their definition is in H5PredType.cpp
00053         static const PredType STD_I8BE;
00054         static const PredType STD_I8LE;
00055         static const PredType STD_I16BE;
00056         static const PredType STD_I16LE;
00057         static const PredType STD_I32BE;
00058         static const PredType STD_I32LE;
00059         static const PredType STD_I64BE;
00060         static const PredType STD_I64LE;
00061         static const PredType STD_U8BE;
00062         static const PredType STD_U8LE;
00063         static const PredType STD_U16BE;
00064         static const PredType STD_U16LE;
00065         static const PredType STD_U32BE;
00066         static const PredType STD_U32LE;
00067         static const PredType STD_U64BE;
00068         static const PredType STD_U64LE;
00069         static const PredType STD_B8BE;
00070         static const PredType STD_B8LE;
00071         static const PredType STD_B16BE;
00072         static const PredType STD_B16LE;
00073         static const PredType STD_B32BE;
00074         static const PredType STD_B32LE;
00075         static const PredType STD_B64BE;
00076         static const PredType STD_B64LE;
00077         static const PredType STD_REF_OBJ;
00078         static const PredType STD_REF_DSETREG;
00079 
00080         static const PredType C_S1;
00081         static const PredType FORTRAN_S1;
00082 
00083         static const PredType IEEE_F32BE;
00084         static const PredType IEEE_F32LE;
00085         static const PredType IEEE_F64BE;
00086         static const PredType IEEE_F64LE;
00087 
00088         static const PredType UNIX_D32BE;
00089         static const PredType UNIX_D32LE;
00090         static const PredType UNIX_D64BE;
00091         static const PredType UNIX_D64LE;
00092 
00093         static const PredType INTEL_I8;
00094         static const PredType INTEL_I16;
00095         static const PredType INTEL_I32;
00096         static const PredType INTEL_I64;
00097         static const PredType INTEL_U8;
00098         static const PredType INTEL_U16;
00099         static const PredType INTEL_U32;
00100         static const PredType INTEL_U64;
00101         static const PredType INTEL_B8;
00102         static const PredType INTEL_B16;
00103         static const PredType INTEL_B32;
00104         static const PredType INTEL_B64;
00105         static const PredType INTEL_F32;
00106         static const PredType INTEL_F64;
00107 
00108         static const PredType ALPHA_I8;
00109         static const PredType ALPHA_I16;
00110         static const PredType ALPHA_I32;
00111         static const PredType ALPHA_I64;
00112         static const PredType ALPHA_U8;
00113         static const PredType ALPHA_U16;
00114         static const PredType ALPHA_U32;
00115         static const PredType ALPHA_U64;
00116         static const PredType ALPHA_B8;
00117         static const PredType ALPHA_B16;
00118         static const PredType ALPHA_B32;
00119         static const PredType ALPHA_B64;
00120         static const PredType ALPHA_F32;
00121         static const PredType ALPHA_F64;
00122 
00123         static const PredType MIPS_I8;
00124         static const PredType MIPS_I16;
00125         static const PredType MIPS_I32;
00126         static const PredType MIPS_I64;
00127         static const PredType MIPS_U8;
00128         static const PredType MIPS_U16;
00129         static const PredType MIPS_U32;
00130         static const PredType MIPS_U64;
00131         static const PredType MIPS_B8;
00132         static const PredType MIPS_B16;
00133         static const PredType MIPS_B32;
00134         static const PredType MIPS_B64;
00135         static const PredType MIPS_F32;
00136         static const PredType MIPS_F64;
00137 
00138         static const PredType NATIVE_CHAR;
00139         static const PredType NATIVE_SCHAR;
00140         static const PredType NATIVE_UCHAR;
00141         static const PredType NATIVE_SHORT;
00142         static const PredType NATIVE_USHORT;
00143         static const PredType NATIVE_INT;
00144         static const PredType NATIVE_UINT;
00145         static const PredType NATIVE_LONG;
00146         static const PredType NATIVE_ULONG;
00147         static const PredType NATIVE_LLONG;
00148         static const PredType NATIVE_ULLONG;
00149         static const PredType NATIVE_FLOAT;
00150         static const PredType NATIVE_DOUBLE;
00151         static const PredType NATIVE_LDOUBLE;
00152         static const PredType NATIVE_B8;
00153         static const PredType NATIVE_B16;
00154         static const PredType NATIVE_B32;
00155         static const PredType NATIVE_B64;
00156         static const PredType NATIVE_OPAQUE;
00157         static const PredType NATIVE_HSIZE;
00158         static const PredType NATIVE_HSSIZE;
00159         static const PredType NATIVE_HERR;
00160         static const PredType NATIVE_HBOOL;
00161 
00162         static const PredType NATIVE_INT8;
00163         static const PredType NATIVE_UINT8;
00164         static const PredType NATIVE_INT16;
00165         static const PredType NATIVE_UINT16;
00166         static const PredType NATIVE_INT32;
00167         static const PredType NATIVE_UINT32;
00168         static const PredType NATIVE_INT64;
00169         static const PredType NATIVE_UINT64;
00170 
00171 // LEAST types
00172 #if H5_SIZEOF_INT_LEAST8_T != 0
00173         static const PredType NATIVE_INT_LEAST8;
00174 #endif /* H5_SIZEOF_INT_LEAST8_T */
00175 #if H5_SIZEOF_UINT_LEAST8_T != 0
00176         static const PredType NATIVE_UINT_LEAST8;
00177 #endif /* H5_SIZEOF_UINT_LEAST8_T */
00178 
00179 #if H5_SIZEOF_INT_LEAST16_T != 0
00180         static const PredType NATIVE_INT_LEAST16;
00181 #endif /* H5_SIZEOF_INT_LEAST16_T */
00182 #if H5_SIZEOF_UINT_LEAST16_T != 0
00183         static const PredType NATIVE_UINT_LEAST16;
00184 #endif /* H5_SIZEOF_UINT_LEAST16_T */
00185 
00186 #if H5_SIZEOF_INT_LEAST32_T != 0
00187         static const PredType NATIVE_INT_LEAST32;
00188 #endif /* H5_SIZEOF_INT_LEAST32_T */
00189 #if H5_SIZEOF_UINT_LEAST32_T != 0
00190         static const PredType NATIVE_UINT_LEAST32;
00191 #endif /* H5_SIZEOF_UINT_LEAST32_T */
00192 
00193 #if H5_SIZEOF_INT_LEAST64_T != 0
00194         static const PredType NATIVE_INT_LEAST64;
00195 #endif /* H5_SIZEOF_INT_LEAST64_T */
00196 #if H5_SIZEOF_UINT_LEAST64_T != 0
00197         static const PredType NATIVE_UINT_LEAST64;
00198 #endif /* H5_SIZEOF_UINT_LEAST64_T */
00199 
00200 // FAST types
00201 #if H5_SIZEOF_INT_FAST8_T != 0
00202         static const PredType NATIVE_INT_FAST8;
00203 #endif /* H5_SIZEOF_INT_FAST8_T */
00204 #if H5_SIZEOF_UINT_FAST8_T != 0
00205         static const PredType NATIVE_UINT_FAST8;
00206 #endif /* H5_SIZEOF_UINT_FAST8_T */
00207 
00208 #if H5_SIZEOF_INT_FAST16_T != 0
00209         static const PredType NATIVE_INT_FAST16;
00210 #endif /* H5_SIZEOF_INT_FAST16_T */
00211 #if H5_SIZEOF_UINT_FAST16_T != 0
00212         static const PredType NATIVE_UINT_FAST16;
00213 #endif /* H5_SIZEOF_UINT_FAST16_T */
00214 
00215 #if H5_SIZEOF_INT_FAST32_T != 0
00216         static const PredType NATIVE_INT_FAST32;
00217 #endif /* H5_SIZEOF_INT_FAST32_T */
00218 #if H5_SIZEOF_UINT_FAST32_T != 0
00219         static const PredType NATIVE_UINT_FAST32;
00220 #endif /* H5_SIZEOF_UINT_FAST32_T */
00221 
00222 #if H5_SIZEOF_INT_FAST64_T != 0
00223         static const PredType NATIVE_INT_FAST64;
00224 #endif /* H5_SIZEOF_INT_FAST64_T */
00225 #if H5_SIZEOF_UINT_FAST64_T != 0
00226         static const PredType NATIVE_UINT_FAST64;
00227 #endif /* H5_SIZEOF_UINT_FAST64_T */
00228 
00229 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00230         // These dummy functions do not inherit from DataType - they'll
00231         // throw a DataTypeIException if invoked.
00232         void commit( H5File& loc, const H5std_string& name );
00233         void commit( H5File& loc, const char* name );
00234         void commit( H5Object& loc, const H5std_string& name );
00235         void commit( H5Object& loc, const char* name );
00236         bool committed();
00237 #endif // DOXYGEN_SHOULD_SKIP_THIS
00238 
00239    private:
00240         // Added this to work around the atexit/global destructor problem.
00241         // It'll help to terminate the library after other PredType instances
00242         // are closed.  -BMR, Mar 30, 2012
00243         static const PredType AtExit;
00244 
00245    protected:
00246 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00247         // Default constructor
00248         PredType();
00249 
00250         // Creates a pre-defined type using an HDF5 pre-defined constant
00251         PredType( const hid_t predtype_id );  // used by the library only
00252 
00253 #endif // DOXYGEN_SHOULD_SKIP_THIS
00254 
00255 };
00256 #ifndef H5_NO_NAMESPACE
00257 }
00258 #endif
00259 #endif

Generated on 11 Apr 2013 by  doxygen 1.4.7