HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Examples

H5PredType.h

Go to the documentation of this file.
00001 // C++ informative line for the emacs editor: -*- C++ -*-
00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have     *
00013  * access to either file, you may request a copy from [email protected]. *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 // PredType holds the definition of all the HDF5 predefined datatypes.
00017 // These types can only be made copy of, not created by H5Tcreate or
00018 // closed by H5Tclose.  They are treated as constants.
00020 
00021 #ifndef _H5PredType_H
00022 #define _H5PredType_H
00023 
00024 #ifndef H5_NO_NAMESPACE
00025 namespace H5 {
00026 #endif
00027 
00028 class H5_DLLCPP PredType : public AtomType {
00029    public:
00030         // Returns this class name
00031         virtual string fromClass () const { return ("PredType"); }
00032 
00033         // Makes a copy of the predefined type and stores the new
00034         // id in the left hand side object.
00035         PredType& operator=( const PredType& rhs );
00036 
00037         // Copy constructor - makes copy of the original object
00038         PredType( const PredType& original );
00039 
00040         // Returns the HDF5 predefined type id.
00041         virtual hid_t getId() const;
00042 
00043         // Noop destructor
00044         virtual ~PredType();
00045 
00046         // Declaration of predefined types; their definition is in H5PredType.cpp
00047         static const PredType STD_I8BE;
00048         static const PredType STD_I8LE;
00049         static const PredType STD_I16BE;
00050         static const PredType STD_I16LE;
00051         static const PredType STD_I32BE;
00052         static const PredType STD_I32LE;
00053         static const PredType STD_I64BE;
00054         static const PredType STD_I64LE;
00055         static const PredType STD_U8BE;
00056         static const PredType STD_U8LE;
00057         static const PredType STD_U16BE;
00058         static const PredType STD_U16LE;
00059         static const PredType STD_U32BE;
00060         static const PredType STD_U32LE;
00061         static const PredType STD_U64BE;
00062         static const PredType STD_U64LE;
00063         static const PredType STD_B8BE;
00064         static const PredType STD_B8LE;
00065         static const PredType STD_B16BE;
00066         static const PredType STD_B16LE;
00067         static const PredType STD_B32BE;
00068         static const PredType STD_B32LE;
00069         static const PredType STD_B64BE;
00070         static const PredType STD_B64LE;
00071         static const PredType STD_REF_OBJ;
00072         static const PredType STD_REF_DSETREG;
00073 
00074         static const PredType C_S1;
00075         static const PredType FORTRAN_S1;
00076 
00077         static const PredType IEEE_F32BE;
00078         static const PredType IEEE_F32LE;
00079         static const PredType IEEE_F64BE;
00080         static const PredType IEEE_F64LE;
00081 
00082         static const PredType UNIX_D32BE;
00083         static const PredType UNIX_D32LE;
00084         static const PredType UNIX_D64BE;
00085         static const PredType UNIX_D64LE;
00086 
00087         static const PredType INTEL_I8;
00088         static const PredType INTEL_I16;
00089         static const PredType INTEL_I32;
00090         static const PredType INTEL_I64;
00091         static const PredType INTEL_U8;
00092         static const PredType INTEL_U16;
00093         static const PredType INTEL_U32;
00094         static const PredType INTEL_U64;
00095         static const PredType INTEL_B8;
00096         static const PredType INTEL_B16;
00097         static const PredType INTEL_B32;
00098         static const PredType INTEL_B64;
00099         static const PredType INTEL_F32;
00100         static const PredType INTEL_F64;
00101 
00102         static const PredType ALPHA_I8;
00103         static const PredType ALPHA_I16;
00104         static const PredType ALPHA_I32;
00105         static const PredType ALPHA_I64;
00106         static const PredType ALPHA_U8;
00107         static const PredType ALPHA_U16;
00108         static const PredType ALPHA_U32;
00109         static const PredType ALPHA_U64;
00110         static const PredType ALPHA_B8;
00111         static const PredType ALPHA_B16;
00112         static const PredType ALPHA_B32;
00113         static const PredType ALPHA_B64;
00114         static const PredType ALPHA_F32;
00115         static const PredType ALPHA_F64;
00116 
00117         static const PredType MIPS_I8;
00118         static const PredType MIPS_I16;
00119         static const PredType MIPS_I32;
00120         static const PredType MIPS_I64;
00121         static const PredType MIPS_U8;
00122         static const PredType MIPS_U16;
00123         static const PredType MIPS_U32;
00124         static const PredType MIPS_U64;
00125         static const PredType MIPS_B8;
00126         static const PredType MIPS_B16;
00127         static const PredType MIPS_B32;
00128         static const PredType MIPS_B64;
00129         static const PredType MIPS_F32;
00130         static const PredType MIPS_F64;
00131 
00132         static const PredType NATIVE_CHAR;
00133         static const PredType NATIVE_SCHAR;
00134         static const PredType NATIVE_UCHAR;
00135         static const PredType NATIVE_SHORT;
00136         static const PredType NATIVE_USHORT;
00137         static const PredType NATIVE_INT;
00138         static const PredType NATIVE_UINT;
00139         static const PredType NATIVE_LONG;
00140         static const PredType NATIVE_ULONG;
00141         static const PredType NATIVE_LLONG;
00142         static const PredType NATIVE_ULLONG;
00143         static const PredType NATIVE_FLOAT;
00144         static const PredType NATIVE_DOUBLE;
00145         static const PredType NATIVE_LDOUBLE;
00146         static const PredType NATIVE_B8;
00147         static const PredType NATIVE_B16;
00148         static const PredType NATIVE_B32;
00149         static const PredType NATIVE_B64;
00150         static const PredType NATIVE_OPAQUE;
00151         static const PredType NATIVE_HSIZE;
00152         static const PredType NATIVE_HSSIZE;
00153         static const PredType NATIVE_HERR;
00154         static const PredType NATIVE_HBOOL;
00155 
00156         static const PredType NATIVE_INT8;
00157         static const PredType NATIVE_UINT8;
00158         static const PredType NATIVE_INT_LEAST8;
00159         static const PredType NATIVE_UINT_LEAST8;
00160         static const PredType NATIVE_INT_FAST8;
00161         static const PredType NATIVE_UINT_FAST8;
00162 
00163         static const PredType NATIVE_INT16;
00164         static const PredType NATIVE_UINT16;
00165         static const PredType NATIVE_INT_LEAST16;
00166         static const PredType NATIVE_UINT_LEAST16;
00167         static const PredType NATIVE_INT_FAST16;
00168         static const PredType NATIVE_UINT_FAST16;
00169 
00170         static const PredType NATIVE_INT32;
00171         static const PredType NATIVE_UINT32;
00172         static const PredType NATIVE_INT_LEAST32;
00173         static const PredType NATIVE_UINT_LEAST32;
00174         static const PredType NATIVE_INT_FAST32;
00175         static const PredType NATIVE_UINT_FAST32;
00176 
00177         static const PredType NATIVE_INT64;
00178         static const PredType NATIVE_UINT64;
00179         static const PredType NATIVE_INT_LEAST64;
00180         static const PredType NATIVE_UINT_LEAST64;
00181         static const PredType NATIVE_INT_FAST64;
00182         static const PredType NATIVE_UINT_FAST64;
00183 
00184 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00185         // These dummy functions do not inherit from DataType - they'll
00186         // throw a DataTypeIException if invoked.
00187         void commit( H5Object& loc, const string& name );
00188         void commit( H5Object& loc, const char* name );
00189         bool committed();
00190 #endif // DOXYGEN_SHOULD_SKIP_THIS
00191 
00192    private:
00193         // added this to work around the atexit/global destructor problem
00194         // temporarily - it'll prevent the use of atexit to clean up
00195         static const PredType NotAtexit;        // not working yet
00196 
00197         // This enum type is used by this class only to handle the
00198         // global PredType objects.  These values will ensure that the
00199         // application receives an appropriate and uptodated id for an
00200         // HDF5 predefined type; particularly usefull when the application
00201         // closes and opens the library again.
00202         enum predefined_types {
00203 
00204             INVALID = 0, E_C_S1 = 1, E_FORTRAN_S1,
00205 
00206             E_STD_I8BE, E_STD_I8LE, E_STD_I16BE, E_STD_I16LE, E_STD_I32BE,
00207             E_STD_I32LE, E_STD_I64BE, E_STD_I64LE, E_STD_U8BE, E_STD_U8LE,
00208             E_STD_U16BE, E_STD_U16LE, E_STD_U32BE, E_STD_U32LE, E_STD_U64BE,
00209             E_STD_U64LE, E_STD_B8BE, E_STD_B8LE, E_STD_B16BE, E_STD_B16LE,
00210             E_STD_B32BE, E_STD_B32LE, E_STD_B64BE, E_STD_B64LE, E_STD_REF_OBJ,
00211             E_STD_REF_DSETREG,
00212 
00213             E_IEEE_F32BE, E_IEEE_F32LE, E_IEEE_F64BE, E_IEEE_F64LE,
00214 
00215             E_UNIX_D32BE, E_UNIX_D32LE, E_UNIX_D64BE, E_UNIX_D64LE,
00216 
00217             E_INTEL_I8, E_INTEL_I16, E_INTEL_I32, E_INTEL_I64, E_INTEL_U8,
00218             E_INTEL_U16, E_INTEL_U32, E_INTEL_U64, E_INTEL_B8, E_INTEL_B16,
00219             E_INTEL_B32, E_INTEL_B64, E_INTEL_F32, E_INTEL_F64,
00220 
00221             E_ALPHA_I8, E_ALPHA_I16, E_ALPHA_I32, E_ALPHA_I64, E_ALPHA_U8,
00222             E_ALPHA_U16, E_ALPHA_U32, E_ALPHA_U64, E_ALPHA_B8, E_ALPHA_B16,
00223             E_ALPHA_B32, E_ALPHA_B64, E_ALPHA_F32, E_ALPHA_F64,
00224 
00225             E_MIPS_I8, E_MIPS_I16, E_MIPS_I32, E_MIPS_I64, E_MIPS_U8,
00226             E_MIPS_U16, E_MIPS_U32, E_MIPS_U64, E_MIPS_B8, E_MIPS_B16,
00227             E_MIPS_B32, E_MIPS_B64, E_MIPS_F32, E_MIPS_F64,
00228 
00229             E_NATIVE_CHAR, E_NATIVE_INT, E_NATIVE_FLOAT, E_NATIVE_SCHAR,
00230             E_NATIVE_UCHAR, E_NATIVE_SHORT, E_NATIVE_USHORT, E_NATIVE_UINT,
00231             E_NATIVE_LONG, E_NATIVE_ULONG, E_NATIVE_LLONG, E_NATIVE_ULLONG,
00232             E_NATIVE_DOUBLE, E_NATIVE_LDOUBLE, E_NATIVE_B8, E_NATIVE_B16,
00233             E_NATIVE_B32, E_NATIVE_B64, E_NATIVE_OPAQUE, E_NATIVE_HSIZE,
00234             E_NATIVE_HSSIZE, E_NATIVE_HERR, E_NATIVE_HBOOL, E_NATIVE_INT8,
00235             E_NATIVE_UINT8, E_NATIVE_INT_LEAST8, E_NATIVE_UINT_LEAST8,
00236             E_NATIVE_INT_FAST8, E_NATIVE_UINT_FAST8, E_NATIVE_INT16,
00237             E_NATIVE_UINT16, E_NATIVE_INT_LEAST16, E_NATIVE_UINT_LEAST16,
00238             E_NATIVE_INT_FAST16, E_NATIVE_UINT_FAST16, E_NATIVE_INT32,
00239             E_NATIVE_UINT32, E_NATIVE_INT_LEAST32, E_NATIVE_UINT_LEAST32,
00240             E_NATIVE_INT_FAST32, E_NATIVE_UINT_FAST32, E_NATIVE_INT64,
00241             E_NATIVE_UINT64, E_NATIVE_INT_LEAST64, E_NATIVE_UINT_LEAST64,
00242             E_NATIVE_INT_FAST64, E_NATIVE_UINT_FAST64
00243         };
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 Mon Oct 31 04:59:47 2005 by  doxygen 1.4.2