00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _H5DataSet_H
00020 #define _H5DataSet_H
00021
00022 #ifndef H5_NO_NAMESPACE
00023 namespace H5 {
00024 #endif
00025
00026 class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
00027 public:
00028
00029 virtual void close();
00030
00031
00032 void extend( const hsize_t* size ) const;
00033
00034
00035 void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
00036
00037 void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
00038
00039
00040 DSetCreatPropList getCreatePlist() const;
00041
00042
00043 haddr_t getOffset() const;
00044
00045
00046 virtual DataSpace getSpace() const;
00047
00048
00049 void getSpaceStatus(H5D_space_status_t& status) const;
00050
00051
00052 virtual hsize_t getStorageSize() const;
00053
00054
00055 virtual size_t getInMemDataSize() const;
00056
00057
00058 hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
00059
00060
00061 static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
00062 static void vlenReclaim(void *buf, const DataType& type, const DataSpace& space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT);
00063
00064
00065
00066
00067 void read( void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00068 void read( H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00069
00070
00071
00072
00073 void write( const void* buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00074 void write( const H5std_string& buf, const DataType& mem_type, const DataSpace& mem_space = DataSpace::ALL, const DataSpace& file_space = DataSpace::ALL, const DSetMemXferPropList& xfer_plist = DSetMemXferPropList::DEFAULT ) const;
00075
00076
00077 int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
00078
00079 #ifndef H5_NO_DEPRECATED_SYMBOLS
00080
00081 H5G_obj_t getObjType(void *ref, H5R_type_t ref_type = H5R_OBJECT) const;
00082 #endif
00083
00084
00085 DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
00086
00088 virtual H5std_string fromClass () const { return("DataSet"); }
00089
00090
00091 DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00092 DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00093 DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
00094
00095
00096 DataSet();
00097
00098
00099 DataSet( const DataSet& original );
00100
00101
00102 DataSet(const hid_t existing_id);
00103
00104
00105 virtual hid_t getId() const;
00106
00107
00108 virtual ~DataSet();
00109
00110 private:
00111 hid_t id;
00112
00113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00114
00115
00116
00117
00118 virtual hid_t p_get_type() const;
00119
00120
00121 void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
00122 void p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id, const hid_t xfer_plist_id, H5std_string& strg) const;
00123
00124 protected:
00125
00126 virtual void p_setId(const hid_t new_id);
00127 #endif // DOXYGEN_SHOULD_SKIP_THIS
00128 };
00129 #ifndef H5_NO_NAMESPACE
00130 }
00131 #endif
00132 #endif