summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-08-12 06:55:43 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-08-12 06:55:43 (GMT)
commitae0b7490126e45e312b63a27b499e5a25e402f40 (patch)
tree454c94b39a5cbc46a4ff2cd02279803aac8f477d
parent7ee176d29bf33f11139b757d8555645cdf314335 (diff)
downloadhdf5-ae0b7490126e45e312b63a27b499e5a25e402f40.zip
hdf5-ae0b7490126e45e312b63a27b499e5a25e402f40.tar.gz
hdf5-ae0b7490126e45e312b63a27b499e5a25e402f40.tar.bz2
[svn-r30279] Purpose: Code improvement (HDFFR-9725)
Description: Removed deprecated functions in previous releases due to missing const. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
-rw-r--r--c++/src/H5ArrayType.cpp40
-rw-r--r--c++/src/H5ArrayType.h4
-rw-r--r--c++/src/H5Attribute.cpp11
-rw-r--r--c++/src/H5CommonFG.cpp22
-rw-r--r--c++/src/H5CommonFG.h4
-rw-r--r--c++/src/H5DataSet.cpp36
-rw-r--r--c++/src/H5DataSet.h6
-rw-r--r--c++/src/H5DataSpace.cpp11
-rw-r--r--c++/src/H5DataSpace.h4
-rw-r--r--c++/src/H5DataType.cpp22
-rw-r--r--c++/src/H5DataType.h6
-rw-r--r--c++/src/H5File.cpp11
-rw-r--r--c++/src/H5File.h2
13 files changed, 78 insertions, 101 deletions
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index e11227a..02596a2 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -80,10 +80,9 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
///\param rhs - IN: Reference to the existing array datatype
///\return Reference to ArrayType instance
///\exception H5::DataTypeIException
-/// std::bad_alloc
// Description
// Closes the id on the lhs object first with setId, then copies
-// each data member from the rhs object.
+// each data member from the rhs object. (Issue HDFFV-9562)
// Programmer Binh-Minh Ribler - Mar 2016
// Modification
//--------------------------------------------------------------------------
@@ -120,24 +119,7 @@ int ArrayType::getArrayNDims() const
int ndims = H5Tget_array_ndims(id);
if (ndims < 0)
{
- throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
- }
-
- return(ndims);
-}
-//---------------------------- Deprecated ----------------------------------
-// Function: ArrayType::getArrayNDims
-// This non-const version of the above method is here for compatibility
-// purposes and may be removed in the future.
-// -BMR, Apr 2016
-//--------------------------------------------------------------------------
-int ArrayType::getArrayNDims()
-{
- // Get the rank of the array type specified by id from the C API
- int ndims = H5Tget_array_ndims(id);
- if (ndims < 0)
- {
- throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
+ throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
}
return(ndims);
@@ -159,23 +141,7 @@ int ArrayType::getArrayDims(hsize_t* dims) const
// Get the dimensions
int ndims = H5Tget_array_dims2(id, dims);
if (ndims < 0)
- throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
-
- // Return the number of dimensions
- return(ndims);
-}
-//---------------------------- Deprecated ----------------------------------
-// Function: ArrayType::getArrayDims
-// This non-const version of the above method is here for compatibility
-// purposes and may be removed in the future.
-// -BMR, Apr 2016
-//--------------------------------------------------------------------------
-int ArrayType::getArrayDims(hsize_t* dims)
-{
- // Get the dimensions
- int ndims = H5Tget_array_dims2(id, dims);
- if (ndims < 0)
- throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
+ throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// Return the number of dimensions
return(ndims);
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index eee430e..fb6c711 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -36,11 +36,11 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
- int getArrayNDims(); // deprecated
+ //int getArrayNDims(); // removed 1.8.18 and 1.10.1
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims) const;
- int getArrayDims(hsize_t* dims); // deprecated
+ //int getArrayDims(hsize_t* dims); // removed 1.8.18 and 1.10.1
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("ArrayType"); }
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 301aaf1..9d5bd38 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -462,12 +462,13 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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
//--------------------------------------------------------------------------
-ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
-{
- return (getName(attr_name, len));
-}
+//ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
+//{
+// return (getName(attr_name, len));
+//}
//--------------------------------------------------------------------------
// Function: Attribute::getStorageSize
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 339af54..22cff8b 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -509,12 +509,13 @@ void CommonFG::mount(const char* name, const H5File& child, const PropList& plis
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 CommonFG::mount(const char* name, H5File& child, PropList& plist) const
-{
- mount(name, child, plist);
-}
+//void CommonFG::mount(const char* name, H5File& child, PropList& plist) const
+//{
+// mount(name, child, plist);
+//}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
@@ -535,12 +536,13 @@ void CommonFG::mount(const H5std_string& name, const H5File& child, const PropLi
// Programmer Binh-Minh Ribler - 2014
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
-{
- mount(name.c_str(), child, plist);
-}
+//void CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
+//{
+// mount(name.c_str(), child, plist);
+//}
//--------------------------------------------------------------------------
// Function: CommonFG::unmount
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index d36d78c..9fee802 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -107,9 +107,9 @@ class H5_DLLCPP CommonFG {
// Mounts the file 'child' onto this location.
void mount(const char* name, const H5File& child, const PropList& plist) const;
- void mount(const char* name, H5File& child, PropList& plist) const; // backward compatibility
+ //void mount(const char* name, H5File& child, PropList& plist) const; // removed from 1.8.18 and 1.10.1
void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
- void mount(const H5std_string& name, H5File& child, PropList& plist) const; // backward compatibility
+ //void mount(const H5std_string& name, H5File& child, PropList& plist) const; // removed from 1.8.18 and 1.10.1
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 8f5ad6f..c64d7df 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -301,6 +301,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
@@ -331,12 +333,13 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) c
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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));
-}
+//hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
+//{
+// return(getVlenBufSize(type, space));
+//}
//--------------------------------------------------------------------------
// Function: DataSet::vlenReclaim
@@ -605,7 +608,6 @@ void DataSet::extend( const hsize_t* size ) const
///\exception H5::DataSetIException
// 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) const
{
@@ -633,12 +635,13 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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);
-}
+//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
@@ -672,12 +675,13 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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);
-}
+//void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
+//{
+// fillMemBuf(buf, (const DataType)buf_type, (const DataSpace)space);
+//}
//--------------------------------------------------------------------------
// Function: DataSet::getId
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index b2544a2..c97e5b0 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -39,11 +39,11 @@ 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
+ //void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
// 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
+ //void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space); // removed from 1.8.18 and 1.10.1
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
@@ -65,7 +65,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
- hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // kept for backward compatibility
+ //hsize_t getVlenBufSize(DataType& type, DataSpace& space) const; // removed from 1.8.18 and 1.10.1
// Reclaims VL datatype memory buffers.
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 7b6289c..b24e94f 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -348,12 +348,13 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 DataSpace::extentCopy( DataSpace& dest_space ) const
-{
- extentCopy(dest_space);
-}
+//void DataSpace::extentCopy( DataSpace& dest_space ) const
+//{
+// extentCopy(dest_space);
+//}
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 4cbe62c..384f1a3 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -50,8 +50,8 @@ 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;
+ // removed from 1.8.18 and 1.10.1
+ //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/H5DataType.cpp b/c++/src/H5DataType.cpp
index b7d787d..c10622c 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -313,12 +313,13 @@ void DataType::commit(const H5Location& loc, const char* name)
// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 DataType::commit(H5Location& loc, const char* name)
-{
- p_commit(loc.getId(), name);
-}
+//void DataType::commit(H5Location& loc, const char* name)
+//{
+// p_commit(loc.getId(), name);
+//}
//--------------------------------------------------------------------------
// Function: DataType::commit
@@ -343,12 +344,13 @@ void DataType::commit(const H5Location& loc, const H5std_string& name)
// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 DataType::commit(H5Location& loc, const H5std_string& name)
-{
- p_commit(loc.getId(), name.c_str());
-}
+//void DataType::commit(H5Location& loc, const H5std_string& name)
+//{
+// p_commit(loc.getId(), name.c_str());
+//}
//--------------------------------------------------------------------------
// Function: DataType::committed
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 5705b83..7584cff 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -63,9 +63,9 @@ class H5_DLLCPP DataType : public H5Object {
void commit(const H5Location& loc, const char* name);
void commit(const H5Location& loc, const H5std_string& name);
// These two overloaded functions are kept for backward compatibility
- // only; they missed the const.
- void commit(H5Location& loc, const char* name);
- void commit(H5Location& loc, const H5std_string& name);
+ // only; they missed the const - removed from 1.8.18 and 1.10.1
+ //void commit(H5Location& loc, const char* name);
+ //void commit(H5Location& loc, const H5std_string& name);
// Determines whether this datatype is a named datatype or
// a transient datatype.
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 4602c6f..6905b46 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -477,12 +477,13 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
// Programmer Binh-Minh Ribler - May 2004
// Modification
// Planned for removal. -BMR, 2014/04/16
-// Removed from documentation. -BMR, 2016/03/07
+// 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 H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
-{
- getVFDHandle((const FileAccPropList)fapl, file_handle);
-}
+//void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
+//{
+// getVFDHandle((const FileAccPropList)fapl, file_handle);
+//}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 939ac8e..7f271da 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -68,7 +68,7 @@ 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
+ //void getVFDHandle(FileAccPropList& fapl, void **file_handle) const; // removed from 1.8.18 and 1.10.1
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );