summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-02-23 22:53:16 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-02-23 22:53:16 (GMT)
commitd7c6fa00da4ddb9de5501b27e5496045ccb98572 (patch)
treed13939c871fce92b84af5d716f23ab92cfd2faf8 /c++/src/H5File.cpp
parentb55626e0715204f56f192911f1a44e4a430b42b2 (diff)
downloadhdf5-d7c6fa00da4ddb9de5501b27e5496045ccb98572.zip
hdf5-d7c6fa00da4ddb9de5501b27e5496045ccb98572.tar.gz
hdf5-d7c6fa00da4ddb9de5501b27e5496045ccb98572.tar.bz2
Purpose: Add new C++ wrappers
Description: Added wrappers for H5Fget_info2, H5Inmembers, and H5Itype_exists // Gets general information about this file. void getFileInfo(H5F_info2_t& file_info) const; // Returns the number of members in a type. static hsize_t getNumMembers(H5I_type_t type); // Determines if an element type exists. static bool typeExists(H5I_type_t type); Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index fcf4e1c..cd97025 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -352,6 +352,25 @@ FileAccPropList H5File::getAccessPlist() const
}
//--------------------------------------------------------------------------
+// Function: H5File::getFileInfo
+///\brief Retrieves the general information of this file.
+///
+///\exception H5::FileIException
+///\par Description
+/// The retrieved information may include information about
+/// superblock extension, free space management, and shared object
+// Programmer Binh-Minh Ribler - February 2017
+//--------------------------------------------------------------------------
+void H5File::getFileInfo(H5F_info2_t& file_info) const
+{
+ herr_t ret_value = H5Fget_info2(id, &file_info);
+ if (ret_value < 0)
+ {
+ throw FileIException("H5File::getFileInfo", "H5Fget_info2 failed");
+ }
+}
+
+//--------------------------------------------------------------------------
// Function: H5File::getFreeSpace
///\brief Returns the amount of free space in the file.
///\return Amount of free space