diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2007-01-02 02:11:25 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2007-01-02 02:11:25 (GMT) |
commit | e5fff45c0909d91912ee6455c0522ca5112b28a3 (patch) | |
tree | 9c86b3cf58c959f612be6aa32287e0053d4dadd6 /c++/src/H5DataSet.cpp | |
parent | 2d42a6277c8050d029af8fc306c6c2b3c0bf57be (diff) | |
download | hdf5-e5fff45c0909d91912ee6455c0522ca5112b28a3.zip hdf5-e5fff45c0909d91912ee6455c0522ca5112b28a3.tar.gz hdf5-e5fff45c0909d91912ee6455c0522ca5112b28a3.tar.bz2 |
[svn-r13092] Purpose: Maintenance
Description:
Added overloaded method DataSet::vlenReclaim, that has better prototype.
Fixed some typos.
Platforms tested
AIX 5.1 (copper)
SunOS 5.8 64-bit (sol)
Linux 2.6 (kagiso)
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r-- | c++/src/H5DataSet.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index ae60e49..f275973 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -220,7 +220,7 @@ hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const ///\exception H5::DataSetIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList& xfer_plist, void* buf ) const +void DataSet::vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf ) { // Obtain identifiers for C API hid_t type_id = type.getId(); @@ -235,6 +235,34 @@ void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList } //-------------------------------------------------------------------------- +// Function: DataSet::vlenReclaim +///\brief Reclaims VL datatype memory buffers. +///\param type - IN: Datatype, which is the datatype stored in the buffer +///\param space - IN: Selection for the memory buffer to free the +/// VL datatypes within +///\param xfer_plist - IN: Property list used to create the buffer +///\param buf - IN: Pointer to the buffer to be reclaimed +///\exception H5::DataSetIException +// Programmer Binh-Minh Ribler - 2000 +//\parDescription +// This function has better prototype for the users than the +// other, which might be removed at some point. BMR - 2006/12/20 +//-------------------------------------------------------------------------- +void DataSet::vlenReclaim(void* buf, const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist) +{ + // Obtain identifiers for C API + hid_t type_id = type.getId(); + hid_t space_id = space.getId(); + hid_t xfer_plist_id = xfer_plist.getId(); + + herr_t ret_value = H5Dvlen_reclaim(type_id, space_id, xfer_plist_id, buf); + if (ret_value < 0) + { + throw DataSetIException("DataSet::vlenReclaim", "H5Dvlen_reclaim failed"); + } +} + +//-------------------------------------------------------------------------- // Function: DataSet::read ///\brief Reads raw data from the specified dataset. ///\param buf - IN: Buffer for read data |