HDF5 C++ API Reference Manual

 

 

 

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

H5CompType.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 hdfhelp@ncsa.uiuc.edu. * 00014 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00015 00016 // Class CompType inherits from DataType and provides accesses to a compound 00017 // datatype. 00018 00019 #ifndef _H5CompType_H 00020 #define _H5CompType_H 00021 00022 #ifndef H5_NO_NAMESPACE 00023 namespace H5 { 00024 #endif 00025 00026 class H5_DLLCPP CompType : public DataType { 00027 public: 00028 // Creates a new compound datatype, given the type's size 00029 CompType( size_t size ); // H5Tcreate 00030 00031 // Gets the compound datatype of the specified dataset 00032 CompType( const DataSet& dataset ); // H5Dget_type 00033 00034 // Returns the type class of the specified member of this compound 00035 // datatype. It provides to the user a way of knowing what type 00036 // to create another datatype of the same class 00037 H5T_class_t getMemberClass( int member_num ) const; 00038 00039 // Returns the dimensionality of the specified member. 00040 int getMemberDims( int member_num, size_t* dims, int* perm ) const; 00041 00042 // Returns the index of a member in this compound data type. 00043 int getMemberIndex(const char* name) const; 00044 int getMemberIndex(const string& name) const; 00045 00046 // Returns the offset of a member of this compound datatype. 00047 size_t getMemberOffset( int memb_no ) const; 00048 00049 // Returns the name of a member of this compound datatype. 00050 string getMemberName( int member_num ) const; 00051 00052 // Returns the compound datatype of the specified member in 00053 // this compound datatype. 00054 CompType getMemberCompType( int member_num ) const; 00055 00056 // Returns the generic datatype of the specified member in 00057 // this compound datatype. 00058 DataType getMemberDataType( int member_num ) const; 00059 00060 // Returns the enumeration datatype of the specified member in 00061 // this compound datatype. 00062 EnumType getMemberEnumType( int member_num ) const; 00063 00064 // Returns the integer datatype of the specified member in 00065 // this compound datatype. 00066 IntType getMemberIntType( int member_num ) const; 00067 00068 // Returns the floating-point datatype of the specified member in 00069 // this compound datatype. 00070 FloatType getMemberFloatType( int member_num ) const; 00071 00072 // Returns the string datatype of the specified member in 00073 // this compound datatype. 00074 StrType getMemberStrType( int member_num ) const; 00075 00076 // Returns the number of members in this compound datatype. 00077 int getNmembers() const; 00078 00079 // Adds a new member to this compound datatype. 00080 void insertMember( const string& name, size_t offset, const DataType& new_member ) const; 00081 00082 // Recursively removes padding from within this compound datatype. 00083 void pack() const; 00084 00085 // Default constructor 00086 CompType(); 00087 00088 // Creates a compound datatype using an existing id 00089 CompType( const hid_t existing_id ); 00090 00091 // Copy constructor - makes a copy of original object 00092 CompType( const CompType& original ); 00093 00094 // Noop destructor. 00095 virtual ~CompType(); 00096 00097 private: 00098 // Contains common code that is used by the member functions 00099 // getMemberXxxType 00100 hid_t p_get_member_type(int member_num) const; 00101 }; 00102 #ifndef H5_NO_NAMESPACE 00103 } 00104 #endif 00105 #endif

Generated on Thu Aug 5 00:22:37 2004 by doxygen 1.3.7-20040718