diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-17 23:25:01 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-04-17 23:25:01 (GMT) |
commit | a75e8dd654268ba1dd35abf3a78da2f115802029 (patch) | |
tree | 55ce2f23d860187f021d11c3611fa43c314eff6b /c++/src/H5DataSet.cpp | |
parent | ca6e13d3dff9c188d80cb84876cf3ccfeb6b6203 (diff) | |
download | hdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.zip hdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.tar.gz hdf5-a75e8dd654268ba1dd35abf3a78da2f115802029.tar.bz2 |
[svn-r25061] Description:
Put back overloaded functions for backward compatibility:
- were replaced by better prototyped versions, such as Attribute::getName.
- were modified to add const to constant arguments.
Added notes for future removal in documentation.
Platforms tested:
Linux/ppc64 (ostrich)
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r-- | c++/src/H5DataSet.cpp | 60 |
1 files changed, 54 insertions, 6 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 7e4fa4f..c34769e 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -313,6 +313,20 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) c } //-------------------------------------------------------------------------- +// Function: DataSet::getVlenBufSize +///\brief This is an overloaded member function, kept for backward +/// compatibility. It differs from the above function in that it +/// misses const's. This wrapper will be removed in future release. +///\return Amount of storage +///\exception H5::DataSetIException +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const +{ + return(getVlenBufSize((const DataType)type, (const DataSpace)space)); +} + +//-------------------------------------------------------------------------- // Function: DataSet::vlenReclaim ///\brief Reclaims VL datatype memory buffers. ///\param type - IN: Datatype, which is the datatype stored in the buffer @@ -577,9 +591,11 @@ void DataSet::extend( const hsize_t* size ) const ///\param buf_type - IN: Datatype of the elements in buffer ///\param space - IN: Dataspace describing memory buffer & containing selection to use ///\exception H5::DataSetIException -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2014 +// Modification +// Used the non-const version. //-------------------------------------------------------------------------- -void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) +void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const { hid_t fill_type_id = fill_type.getId(); hid_t buf_type_id = buf_type.getId(); @@ -593,16 +609,32 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, //-------------------------------------------------------------------------- // Function: DataSet::fillMemBuf -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function in that it only takes the -/// the last three arguments. +///\brief This is an overloaded member function, kept for backward +/// compatibility. It differs from the above function in that it +/// misses const's. This wrapper will be removed in future release. +///\param fill - IN: Pointer to fill value to use - default NULL +///\param fill_type - IN: Datatype of the fill value ///\param buf - IN/OUT: Memory buffer to fill selection within ///\param buf_type - IN: Datatype of the elements in buffer ///\param space - IN: Dataspace describing memory buffer & containing selection to use ///\exception H5::DataSetIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) +void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space) +{ + fillMemBuf(fill, (const DataType)fill_type, buf, (const DataType)buf_type, (const DataSpace)space); +} + +//-------------------------------------------------------------------------- +// Function: DataSet::fillMemBuf +///\brief Fills a selection in memory with 0. +///\param buf - IN/OUT: Memory buffer to fill selection within +///\param buf_type - IN: Datatype of the elements in buffer +///\param space - IN: Dataspace describing memory buffer & containing selection to use +///\exception H5::DataSetIException +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const { hid_t buf_type_id = buf_type.getId(); hid_t space_id = space.getId(); @@ -614,6 +646,22 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s } //-------------------------------------------------------------------------- +// Function: DataSet::fillMemBuf +///\brief This is an overloaded member function, kept for backward +/// compatibility. It differs from the above function in that it +/// misses const's. This wrapper will be removed in future release. +///\param buf - IN/OUT: Memory buffer to fill selection within +///\param buf_type - IN: Datatype of the elements in buffer +///\param space - IN: Dataspace describing memory buffer & containing selection to use +///\exception H5::DataSetIException +// Programmer Binh-Minh Ribler - 2000 +//-------------------------------------------------------------------------- +void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space) +{ + fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space); +} + +//-------------------------------------------------------------------------- // Function: DataSet::getId ///\brief Get the id of this dataset. ///\return DataSet identifier |