summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 18:02:34 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 18:02:34 (GMT)
commit38687f3498d0878c1c28cb52b8b9e070fcb45da8 (patch)
tree61a49cc8914f551de555874826c210aec7f55d7b
parent487ccb3e59efe1365879e25e67bfa12299c93433 (diff)
downloadhdf5-38687f3498d0878c1c28cb52b8b9e070fcb45da8.zip
hdf5-38687f3498d0878c1c28cb52b8b9e070fcb45da8.tar.gz
hdf5-38687f3498d0878c1c28cb52b8b9e070fcb45da8.tar.bz2
[svn-r29764] Purpose: Code cleanup
Description: Removed obsolete overloaded functions which had parameters that should be const but were not. They have been replaced by the correct version since 2014. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
-rw-r--r--c++/src/H5DataSet.cpp63
-rw-r--r--c++/src/H5DataSet.h2
-rw-r--r--c++/src/H5DataSpace.cpp19
-rw-r--r--c++/src/H5DataSpace.h2
-rw-r--r--c++/src/H5FaccProp.cpp43
-rw-r--r--c++/src/H5FaccProp.h7
-rw-r--r--c++/src/H5File.cpp21
-rw-r--r--c++/src/H5File.h1
8 files changed, 14 insertions, 144 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 14fa9d4..a6a4a62 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -302,6 +302,8 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) const
{
@@ -320,23 +322,6 @@ 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
-//--------------------------------------------------------------------------
-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
@@ -603,6 +588,8 @@ 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
@@ -619,33 +606,14 @@ 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
-//--------------------------------------------------------------------------
-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
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const
{
@@ -659,25 +627,6 @@ 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
-//--------------------------------------------------------------------------
-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
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index a539d6b..6c483ea 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -39,11 +39,9 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Fills a selection in memory with a value
void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const;
- void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
// Fills a selection in memory with zero
void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space) const;
- void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // kept for backward compatibility
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 8ef8791..8fceca4 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -327,6 +327,8 @@ H5S_class_t DataSpace::getSimpleExtentType () const
///\param dest_space - IN: Dataspace to copy from
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
void DataSpace::extentCopy (const DataSpace& dest_space) const
{
@@ -339,23 +341,6 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
}
//--------------------------------------------------------------------------
-// Function: DataSpace::extentCopy
-// Purpose This is an overloaded member function, kept for backward
-// compatibility. It differs from the above function in that it
-// misses const. This wrapper will be removed in future release.
-// Param dest_space - IN: Dataspace to copy from
-// Exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
-// Modification
-// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
-//--------------------------------------------------------------------------
-void DataSpace::extentCopy( DataSpace& dest_space ) const
-{
- extentCopy((const DataSpace)dest_space);
-}
-
-//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
///\brief Sets or resets the size of an existing dataspace.
///\param rank - IN: Rank of the dataspace
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 4cbe62c..a0bd689 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -50,8 +50,6 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Copies the extent of this dataspace.
void extentCopy(const DataSpace& dest_space) const;
- // Kept for backward compatibility only.
- void extentCopy(DataSpace& dest_space) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index d8b06f2..52896e9 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -316,6 +316,8 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
/// Temporary - For information, please refer to:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
// Programmer: Binh-Minh Ribler - April, 2004
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
@@ -330,26 +332,6 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
-// 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 meta_plist - IN: File access plist for the metadata file
-// Param raw_plist - IN: File access plist for the raw data file
-// Param meta_ext - IN: Metadata filename extension as \c char*
-// Param raw_ext - IN: Raw data filename extension as \c char*
-// Exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
-// Modification
-// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
-//--------------------------------------------------------------------------
-void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
-{
- setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext, raw_ext);
-}
-
-//--------------------------------------------------------------------------
-// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, provided for convenience.
/// It takes character arguments as \c H5std_string.
///\param meta_plist - IN: File access plist for the metadata file
@@ -358,31 +340,14 @@ void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw
///\param raw_ext - IN: Raw data filename extension as \c H5std_string
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
-//--------------------------------------------------------------------------
-// Function: FileAccPropList::setSplit
-// 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 meta_plist - IN: File access plist for the metadata file
-// Param raw_plist - IN: File access plist for the raw data file
-// Param meta_ext - IN: Metadata filename extension as \c char*
-// Param raw_ext - IN: Raw data filename extension as \c char*
-// Exception H5::PropListIException
-// Modification
-// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
-//--------------------------------------------------------------------------
-void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
-{
- setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext.c_str(), raw_ext.c_str() );
-}
-
// Stream Virtual File Driver had been removed from the main library.
// FileAccPropList::[s,g]etStream are now removed from the C++ API.
// -BMR, March, 2012
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index b214447..ce2dc91 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -74,13 +74,6 @@ class H5_DLLCPP FileAccPropList : public PropList {
const FileAccPropList& raw_plist,
const H5std_string& meta_ext = ".meta",
const H5std_string& raw_ext = ".raw") const;
- // These two overloaded functions are kept for backward compatibility
- // only; they missed the const's and will be removed in future release.
- void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
- const char* meta_ext=".meta", const char* raw_ext=".raw") const;
- void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
- const H5std_string& meta_ext=".meta",
- const H5std_string& raw_ext=".raw") const;
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 67dda34..69eaa89 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -454,6 +454,8 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// the file remains open; it will be invalid if the file is
/// closed and reopened or opened during a subsequent session.
// Programmer Binh-Minh Ribler - May 2004
+// Modification
+// Replaced the version without const parameter - Apr, 2014
//--------------------------------------------------------------------------
void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
{
@@ -467,25 +469,6 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
-// 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 fapl - File access property list
-// Param file_handle - Pointer to the file handle being used by
-// the low-level virtual file driver
-// Exception H5::FileIException
-// Programmer Binh-Minh Ribler - May 2004
-// Modification
-// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
-//--------------------------------------------------------------------------
-void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
-{
- getVFDHandle((const FileAccPropList)fapl, file_handle);
-}
-
-//--------------------------------------------------------------------------
-// Function: H5File::getVFDHandle
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 939ac8e..49ab190 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -68,7 +68,6 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(void **file_handle) const;
void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
- void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // kept for backward compatibility
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );