diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2005-03-14 19:32:26 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2005-03-14 19:32:26 (GMT) |
commit | 49fa4563ef21009a05c11da5e05d0e71d2c24366 (patch) | |
tree | 73f57a583375fef27b3616e0febaa786394c7ae5 /c++/src/H5PropList.cpp | |
parent | 7e6577fdea9f78e4b140f2b1c7684c9cec7d9a7e (diff) | |
download | hdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.zip hdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.tar.gz hdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.tar.bz2 |
[svn-r10212] Purpose: Added more wrappers
Description:
Added the following to the C++ library
+ overloaded functions:
string CommonFG::getObjnameByIdx(hsize_t idx)
H5T_order_t AtomType::getOrder()
+ wrappers for H5*close
+ wrappers for H5Arename, H5Aget_storage_size, and H5Dget_storage_size
Platforms tested:
Linux 2.4 (heping)
AIX 5.1 (copper)
SunOS 5.8 64-bit (sol)
Diffstat (limited to 'c++/src/H5PropList.cpp')
-rw-r--r-- | c++/src/H5PropList.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 8e2c12b..3c8b70c 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -160,6 +160,27 @@ void PropList::copyProp( PropList& dest, PropList& src, const string& name ) con copyProp( dest, src, name.c_str()); } +//-------------------------------------------------------------------------- +// Function: PropList::close +///\brief Closes the property list if it is not a default one. +///\exception H5::PropListIException +// Programmer Binh-Minh Ribler - Mar 9, 2005 +//-------------------------------------------------------------------------- +void PropList::close() +{ + if( id != H5P_NO_CLASS ) // not a constant, should call H5Pclose + { + herr_t ret_value = H5Pclose( id ); + if( ret_value < 0 ) + { + throw PropListIException("PropList::close", "H5Pclose failed"); + } + // reset the id because the property list that it represents is now closed + id = 0; + } + else + throw PropListIException("PropList::close", "Cannot close a constant"); +} //-------------------------------------------------------------------------- // Function: PropList::getClass |