From e6266dd7a1977a8328ff456c2d7451c1af9a96dc Mon Sep 17 00:00:00 2001 From: Binh-Minh Ribler Date: Sat, 7 Aug 2004 01:30:15 -0500 Subject: [svn-r9049] Purpose: Clean up code Description: Removed private functions p_close, that were left over from the removal of the reference counting mechanism. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene) Misc. update: release_docs/RELEASE will be updated soon. --- c++/src/H5Attribute.cpp | 18 ------------------ c++/src/H5Attribute.h | 3 --- c++/src/H5DataSet.cpp | 18 ------------------ c++/src/H5DataSet.h | 3 --- c++/src/H5File.cpp | 18 ------------------ c++/src/H5File.h | 3 --- c++/src/H5PropList.cpp | 20 -------------------- c++/src/H5PropList.h | 3 --- 8 files changed, 86 deletions(-) diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index bd77f22..570dbe7 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -250,24 +250,6 @@ string Attribute::getName() const } //-------------------------------------------------------------------------- -// Function: Attribute::p_close (private) -///\brief Closes this attribute. -///\exception H5::AttributeIException -///\note -/// This function will be obsolete because its functionality -/// is recently handled by the C library layer. - May, 2004 -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -void Attribute::p_close() const -{ - herr_t ret_value = H5Aclose( id ); - if( ret_value < 0 ) - { - throw AttributeIException(0, "H5Aclose failed"); - } -} - -//-------------------------------------------------------------------------- // Function: Attribute destructor ///\brief Properly terminates access to this attribute. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index a027fc3..13e29ce 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -41,9 +41,6 @@ class H5_DLLCPP Attribute : public AbstractDs { // do not inherit iterateAttrs from H5Object int iterateAttrs() { return 0; } - // Used by the API to appropriately close an attribute - virtual void p_close() const; - // Creates a copy of an existing attribute using the attribute id Attribute( const hid_t attr_id ); diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 1753c04..9e509ad 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -478,24 +478,6 @@ DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const } //-------------------------------------------------------------------------- -// Function: DataSet::p_close (private) -///\brief Closes this dataset. -///\exception H5::DataSetIException -///\note -/// This function will be obsolete because its functionality -/// is recently handled by the C library layer. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -void DataSet::p_close() const -{ - herr_t ret_value = H5Dclose( id ); - if( ret_value < 0 ) - { - throw DataSetIException(0, "H5Dclose failed"); - } -} - -//-------------------------------------------------------------------------- // Function: DataSet destructor ///\brief Properly terminates access to this dataset. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index 6960757..6730c94 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -82,9 +82,6 @@ class H5_DLLCPP DataSet : public AbstractDs { // Creates a copy of an existing DataSet using its id. DataSet(const hid_t existing_id); - // Used by the API to appropriately close a dataset. - virtual void p_close() const; - // Default constructor. DataSet(); diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index a368544..bac8499 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -504,24 +504,6 @@ hsize_t H5File::getFileSize() const } //-------------------------------------------------------------------------- -// Function: H5File::p_close (private) -///\brief Closes this H5 file. -///\exception H5::FileIException -///\note -/// This function will be obsolete because its functionality -/// is recently handled by the C library layer. -// Programmer Binh-Minh Ribler - 2000 -//-------------------------------------------------------------------------- -void H5File::p_close() const -{ - herr_t ret_value = H5Fclose( id ); - if( ret_value < 0 ) - { - throw FileIException(0, "H5Fclose failed"); - } -} - -//-------------------------------------------------------------------------- // Function: H5File::throwException ///\brief Throws file exception - initially implemented for CommonFG ///\param func_name - Name of the function where failure occurs diff --git a/c++/src/H5File.h b/c++/src/H5File.h index 900681e..3db277d 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -87,9 +87,6 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG { // Throw file exception. virtual void throwException(const string func_name, const string msg) const; - // Used by the API to appropriately close a file. - void p_close() const; - // H5File destructor. virtual ~H5File(); diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 110ce6d..d2fb66f 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -153,26 +153,6 @@ void PropList::copyProp( PropList& dest, PropList& src, const string& name ) con //-------------------------------------------------------------------------- -// Function: PropList::p_close -///\brief Closes the property list if it is not a default one -///\note -/// This function will be obsolete because its functionality is recently -/// handled by the C library layer. -///\exception H5::PropListIException -//-------------------------------------------------------------------------- -void PropList::p_close() const -{ - if( id != H5P_NO_CLASS ) // not a constant, should call H5Pclose - { - herr_t ret_value = H5Pclose( id ); - if( ret_value < 0 ) - { - throw PropListIException(0, "property list close failed" ); - } - } -} - -//-------------------------------------------------------------------------- // Function: PropList::getClass ///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE... ///\return The property list class if it is not equal to \c H5P_NO_CLASS diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 1c7d934..a8d276c 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -83,9 +83,6 @@ class H5_DLLCPP PropList : public IdComponent { PropList getClassParent() const; - // Used by the API to close the property list - void p_close() const; - virtual ~PropList(); }; -- cgit v0.12