00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef _H5DataType_H
00018 #define _H5DataType_H
00019 
00020 #ifndef H5_NO_NAMESPACE
00021 namespace H5 {
00022 #endif
00023 
00024 class H5_DLLCPP DataType : public H5Object {
00025    public:
00026         
00027         DataType( const H5T_class_t type_class, size_t size );
00028 
00029         
00030         DataType( const DataType& original );
00031 
00032         
00033         DataType(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00034         DataType(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00035         DataType(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00036 
00037         
00038         virtual void close();
00039 
00040         
00041         void copy(const DataType& like_type);
00042 
00043         
00044         void copy(const DataSet& dset);
00045 
00046         
00047         H5T_class_t getClass() const;
00048 
00049         
00050         
00051         void commit( H5File& loc, const char* name);
00052         void commit( H5File& loc, const H5std_string& name);
00053         void commit( H5Object& loc, const char* name);
00054         void commit( H5Object& loc, const H5std_string& name);
00055 
00056         
00057         
00058         bool committed() const;
00059 
00060         
00061         
00062         H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const;
00063 
00064         
00065         void convert( const DataType& dest, size_t nelmts, void *buf, void *background, const PropList& plist=PropList::DEFAULT) const;
00066 
00067         
00068         DataType& operator=( const DataType& rhs );
00069 
00070         
00071         bool operator==(const DataType& compared_type ) const;
00072 
00073         
00074         void lock() const;
00075 
00076         
00077         size_t getSize() const;
00078 
00079         
00080         
00081         DataType getSuper() const;
00082 
00083         
00084         void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
00085         void registerFunc(H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func ) const;
00086 
00087         
00088         void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
00089         void unregister( H5T_pers_t pers, const H5std_string& name, const DataType& dest, H5T_conv_t func ) const;
00090 
00091         
00092         void setTag( const char* tag ) const;
00093         void setTag( const H5std_string& tag ) const;
00094 
00095         
00096         H5std_string getTag() const;
00097 
00098         
00099         bool detectClass(H5T_class_t cls) const;
00100 
00101         
00102         bool isVariableStr() const;
00103 
00104 #ifndef H5_NO_DEPRECATED_SYMBOLS
00105         
00106         H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
00107 #endif 
00108 
00109         
00110         DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
00111 
00113         virtual H5std_string fromClass () const { return("DataType"); }
00114 
00115         
00116         DataType( const hid_t type_id );
00117 
00118         
00119         DataType();
00120 
00121         
00122         virtual hid_t getId() const;
00123 
00124         
00125         virtual ~DataType();
00126 
00127    protected:
00128         hid_t id;       
00129 
00130         
00131         virtual void p_setId(const hid_t new_id);
00132 
00133    private:
00134         void p_commit(hid_t loc_id, const char* name);
00135 };
00136 #ifndef H5_NO_NAMESPACE
00137 }
00138 #endif
00139 #endif