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/H5Object.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/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 9c8f5f4..2ef3345 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -269,6 +269,35 @@ void H5Object::removeAttr( const string& name ) const } //-------------------------------------------------------------------------- +// Function: H5Object::renameAttr +///\brief Renames the named attribute from this object. +///\param oldname - IN: Name of the attribute to be renamed +///\param newname - IN: New name ame of the attribute +///\exception H5::AttributeIException +// Programmer Binh-Minh Ribler - Mar, 2005 +//-------------------------------------------------------------------------- +void H5Object::renameAttr(const char* oldname, const char* newname) const +{ + herr_t ret_value = H5Arename(id, oldname, newname); + if (ret_value < 0) + { + throw AttributeIException("H5Object::renameAttr", "H5Arename failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: H5Object::renameAttr +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes +/// a reference to an \c std::string for the names. +// Programmer Binh-Minh Ribler - Mar, 2005 +//-------------------------------------------------------------------------- +void H5Object::renameAttr(const string& oldname, const string& newname) const +{ + renameAttr (oldname.c_str(), newname.c_str()); +} + +//-------------------------------------------------------------------------- // Function: H5Object::flush ///\brief Flushes all buffers associated with a file to disk. ///\param scope - IN: Specifies the scope of the flushing action, |