summaryrefslogtreecommitdiffstats
path: root/c++/src/H5PredType.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2000-11-14 21:30:12 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2000-11-14 21:30:12 (GMT)
commit92041a68656c59813619ae1f26ed211b7f028e86 (patch)
treeaaa3256c9a9f0adde21570eac9254f7ce00450b1 /c++/src/H5PredType.h
parent36acd5381e3977164e0d6d666f8ce97cc53f9387 (diff)
downloadhdf5-92041a68656c59813619ae1f26ed211b7f028e86.zip
hdf5-92041a68656c59813619ae1f26ed211b7f028e86.tar.gz
hdf5-92041a68656c59813619ae1f26ed211b7f028e86.tar.bz2
[svn-r2897] Purpose:
C++ API for 1.3.x branch Description: The *.C and *.h files named different than those in 1.2.x. They are in the form: 'H5' + classname, or just classname if the classname is already prefixed with 'H5' to avoid ambiguity in documentation context. This version has several hidden bugs fixed and an improvement on the reference counting approach. The classes and their inheritance structure are listed below: --------------------------------------- H5Library Exception RefCounter IdComponent H5File DataSpace H5Object Group AbstractDs DataSet Attribute DataType PredType EnumType CompType AtomType StrType IntType FloatType PropList FileCreatPropList FileAccPropList DSetCreatPropList DSetMemXferPropList --------------------------------------- IdComponent uses RefCounter to keep track of opened objects so proper termination of HDF5 objects can be maintained. Each class has a .h file containing the class declaration and a .C file containing its definition. In addition to the classes files, the following files do not have class information: - H5Cpp.h: header file to be included in user's application - H5Idtemplates.h: contains a template function used by several classes - H5Classes.h: contains forward class declarations - H5CommonFG.*: contains common code used by classes H5File and Group - H5Include.h: contains the hdf5.h header file and the #undef RCSID to work around the problem: multiple defined RcsId - H5Alltypes.h: simply serves as a container to hold the header files of all datatypes to simplify the header file inclusion Platforms: Solaris (arabica) and Linux
Diffstat (limited to 'c++/src/H5PredType.h')
-rw-r--r--c++/src/H5PredType.h181
1 files changed, 181 insertions, 0 deletions
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
new file mode 100644
index 0000000..15168fb
--- /dev/null
+++ b/c++/src/H5PredType.h
@@ -0,0 +1,181 @@
+// PredType holds the definition of all the HDF5 predefined datatypes.
+// These types can only be made copy of, not created by H5Tcreate or
+// closed by H5Tclose. They are treated as constants.
+/////////////////////////////////////////////////////////////////////
+
+#ifndef _H5PredType_H
+#define _H5PredType_H
+
+#ifndef H5_NO_NAMESPACE
+namespace H5 {
+#endif
+
+class PredType : public AtomType {
+ public:
+ // Default destructor
+ virtual ~PredType();
+
+ // Copy constructor - makes copy of the original object
+ PredType( const PredType& original );
+
+
+ // Declaration of predefined types; their definition is in Predtype.C
+ static const PredType STD_I8BE;
+ static const PredType STD_I8LE;
+ static const PredType STD_I16BE;
+ static const PredType STD_I16LE;
+ static const PredType STD_I32BE;
+ static const PredType STD_I32LE;
+ static const PredType STD_I64BE;
+ static const PredType STD_I64LE;
+ static const PredType STD_U8BE;
+ static const PredType STD_U8LE;
+ static const PredType STD_U16BE;
+ static const PredType STD_U16LE;
+ static const PredType STD_U32BE;
+ static const PredType STD_U32LE;
+ static const PredType STD_U64BE;
+ static const PredType STD_U64LE;
+ static const PredType STD_B8BE;
+ static const PredType STD_B8LE;
+ static const PredType STD_B16BE;
+ static const PredType STD_B16LE;
+ static const PredType STD_B32BE;
+ static const PredType STD_B32LE;
+ static const PredType STD_B64BE;
+ static const PredType STD_B64LE;
+ static const PredType STD_REF_OBJ;
+ static const PredType STD_REF_DSETREG;
+
+ static const PredType C_S1;
+ static const PredType FORTRAN_S1;
+
+ static const PredType IEEE_F32BE;
+ static const PredType IEEE_F32LE;
+ static const PredType IEEE_F64BE;
+ static const PredType IEEE_F64LE;
+
+ static const PredType UNIX_D32BE;
+ static const PredType UNIX_D32LE;
+ static const PredType UNIX_D64BE;
+ static const PredType UNIX_D64LE;
+
+ static const PredType INTEL_I8;
+ static const PredType INTEL_I16;
+ static const PredType INTEL_I32;
+ static const PredType INTEL_I64;
+ static const PredType INTEL_U8;
+ static const PredType INTEL_U16;
+ static const PredType INTEL_U32;
+ static const PredType INTEL_U64;
+ static const PredType INTEL_B8;
+ static const PredType INTEL_B16;
+ static const PredType INTEL_B32;
+ static const PredType INTEL_B64;
+ static const PredType INTEL_F32;
+ static const PredType INTEL_F64;
+
+ static const PredType ALPHA_I8;
+ static const PredType ALPHA_I16;
+ static const PredType ALPHA_I32;
+ static const PredType ALPHA_I64;
+ static const PredType ALPHA_U8;
+ static const PredType ALPHA_U16;
+ static const PredType ALPHA_U32;
+ static const PredType ALPHA_U64;
+ static const PredType ALPHA_B8;
+ static const PredType ALPHA_B16;
+ static const PredType ALPHA_B32;
+ static const PredType ALPHA_B64;
+ static const PredType ALPHA_F32;
+ static const PredType ALPHA_F64;
+
+ static const PredType MIPS_I8;
+ static const PredType MIPS_I16;
+ static const PredType MIPS_I32;
+ static const PredType MIPS_I64;
+ static const PredType MIPS_U8;
+ static const PredType MIPS_U16;
+ static const PredType MIPS_U32;
+ static const PredType MIPS_U64;
+ static const PredType MIPS_B8;
+ static const PredType MIPS_B16;
+ static const PredType MIPS_B32;
+ static const PredType MIPS_B64;
+ static const PredType MIPS_F32;
+ static const PredType MIPS_F64;
+
+ static const PredType NATIVE_CHAR;
+ static const PredType NATIVE_SCHAR;
+ static const PredType NATIVE_UCHAR;
+ static const PredType NATIVE_SHORT;
+ static const PredType NATIVE_USHORT;
+ static const PredType NATIVE_INT;
+ static const PredType NATIVE_UINT;
+ static const PredType NATIVE_LONG;
+ static const PredType NATIVE_ULONG;
+ static const PredType NATIVE_LLONG;
+ static const PredType NATIVE_ULLONG;
+ static const PredType NATIVE_FLOAT;
+ static const PredType NATIVE_DOUBLE;
+ static const PredType NATIVE_LDOUBLE;
+ static const PredType NATIVE_B8;
+ static const PredType NATIVE_B16;
+ static const PredType NATIVE_B32;
+ static const PredType NATIVE_B64;
+ static const PredType NATIVE_OPAQUE;
+ static const PredType NATIVE_HSIZE;
+ static const PredType NATIVE_HSSIZE;
+ static const PredType NATIVE_HERR;
+ static const PredType NATIVE_HBOOL;
+
+ static const PredType NATIVE_INT8;
+ static const PredType NATIVE_UINT8;
+ static const PredType NATIVE_INT_LEAST8;
+ static const PredType NATIVE_UINT_LEAST8;
+ static const PredType NATIVE_INT_FAST8;
+ static const PredType NATIVE_UINT_FAST8;
+
+ static const PredType NATIVE_INT16;
+ static const PredType NATIVE_UINT16;
+ static const PredType NATIVE_INT_LEAST16;
+ static const PredType NATIVE_UINT_LEAST16;
+ static const PredType NATIVE_INT_FAST16;
+ static const PredType NATIVE_UINT_FAST16;
+
+ static const PredType NATIVE_INT32;
+ static const PredType NATIVE_UINT32;
+ static const PredType NATIVE_INT_LEAST32;
+ static const PredType NATIVE_UINT_LEAST32;
+ static const PredType NATIVE_INT_FAST32;
+ static const PredType NATIVE_UINT_FAST32;
+
+ static const PredType NATIVE_INT64;
+ static const PredType NATIVE_UINT64;
+ static const PredType NATIVE_INT_LEAST64;
+ static const PredType NATIVE_UINT_LEAST64;
+ static const PredType NATIVE_INT_FAST64;
+ static const PredType NATIVE_UINT_FAST64;
+
+ // These dummy functions do not inherit from DataType - they'll
+ // throw a DataTypeIException if invoked.
+ void commit( H5Object& loc, const string& name );
+ void commit( H5Object& loc, const char* name );
+ bool committed();
+
+ private:
+ // added this to work around the atexit/global destructor problem
+ // temporarily - it'll prevent the use of atexit to clean up
+ static const PredType NotAtexit;
+
+ protected:
+ // Default constructor
+ PredType();
+
+ // Creates a pre-defined type using an HDF5 pre-defined constant
+ PredType( const hid_t predtype_id ); // used by the library only
+};
+#ifndef H5_NO_NAMESPACE
+}
+#endif
+#endif