summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSet.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-08-12 08:06:35 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-08-12 08:06:35 (GMT)
commitb8a08e043ec8c3a37ace521314063df6f14e894a (patch)
treee3e86741e2057df18f054bf0abe2008532242daa /c++/src/H5DataSet.cpp
parent6dec81e7ac7edacf524a8f4dbb125d4fe40f3dc0 (diff)
downloadhdf5-b8a08e043ec8c3a37ace521314063df6f14e894a.zip
hdf5-b8a08e043ec8c3a37ace521314063df6f14e894a.tar.gz
hdf5-b8a08e043ec8c3a37ace521314063df6f14e894a.tar.bz2
[svn-r30280] Purpose: Code improvement (HDFFR-9725)
Description: - Added "const" to arguments that should be const - Added "const" to const functions, i.e., function that don't change the objects they operate on. - Removed deprecated functions in previous releases due to missing const. Merged from trunk: 30272 and 30279 Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r--c++/src/H5DataSet.cpp65
1 files changed, 62 insertions, 3 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index b3ad708..8a42494 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -299,6 +299,8 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief Returns the number of bytes required to store VL data.
+///\param type - IN: Datatype, which is the datatype for the buffer
+///\param space - IN: Selection for the memory buffer
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
@@ -322,6 +324,24 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) c
}
//--------------------------------------------------------------------------
+// Function: DataSet::getVlenBufSize
+// Purpose 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
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
+// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
+//--------------------------------------------------------------------------
+//hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
+//{
+// return(getVlenBufSize(type, space));
+//}
+
+//--------------------------------------------------------------------------
// Function: DataSet::vlenReclaim
///\brief Reclaims VL datatype memory buffers.
///\param type - IN: Datatype, which is the datatype stored in the buffer
@@ -588,9 +608,6 @@ void DataSet::extend( const hsize_t* size ) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2014
// Modification
-// Replaced the version without const parameter - Apr, 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) const
{
@@ -606,6 +623,28 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
+// Purpose 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
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
+// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
+//--------------------------------------------------------------------------
+//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
@@ -627,6 +666,26 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
}
//--------------------------------------------------------------------------
+// Function: DataSet::fillMemBuf
+// Purpose 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
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
+// Removed from code. -BMR, 2016/08/11 1.8.18 and 1.10.1
+//--------------------------------------------------------------------------
+//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