summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FcreatProp.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-02-15 15:01:05 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-02-15 15:01:05 (GMT)
commit40b13c74457cc4fbe97a746bb58bedc3e0732445 (patch)
tree4dd970cbc84e9f43ca5ab87cfe3f894b5faad64b /c++/src/H5FcreatProp.cpp
parentfc8866d41e0b585b6c6f3e2ec7fd012d543e2624 (diff)
downloadhdf5-40b13c74457cc4fbe97a746bb58bedc3e0732445.zip
hdf5-40b13c74457cc4fbe97a746bb58bedc3e0732445.tar.gz
hdf5-40b13c74457cc4fbe97a746bb58bedc3e0732445.tar.bz2
Purpose: Add new C++ wrappers
Description: Added wrappers for H5Pset_file_space and H5Pget_file_space // Sets the strategy and the threshold value that the library will // will employ in managing file space. void setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const; // Returns the strategy that the library uses in managing file space. H5F_file_space_type_t getFileSpaceStrategy() const; // Returns the threshold value that the library uses in tracking free // space sections. hsize_t getFileSpaceThreshold() const; Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5FcreatProp.cpp')
-rw-r--r--c++/src/H5FcreatProp.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index 5a99dba..1d9bfd4 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -295,6 +295,69 @@ unsigned FileCreatPropList::getIstorek() const
}
//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setFileSpace
+///\brief Sets the strategy and the threshold value that the library
+/// will employ in managing file space.
+///\param ik - IN: Symbol table tree rank
+///\param lk - IN: Symbol table node size
+///\exception H5::PropListIException
+///\par Description
+/// If the given strategy is zero, the property will not be
+/// changed and the existing strategy will be retained.
+/// If the given threshold value is zero, the property will not be
+/// changed and the existing threshold will be retained.
+// Programmer Binh-Minh Ribler - Feb, 2017
+//--------------------------------------------------------------------------
+void FileCreatPropList::setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const
+{
+ herr_t ret_value = H5Pset_file_space(id, strategy, threshold);
+ if( ret_value < 0 )
+ {
+ throw PropListIException("FileCreatPropList::setFileSpace",
+ "H5Pset_file_space failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getFileSpaceStrategy
+///\brief Returns the strategy that the library uses in managing file space.
+///\return The strategy value
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - Feb, 2017
+//--------------------------------------------------------------------------
+H5F_file_space_type_t FileCreatPropList::getFileSpaceStrategy() const
+{
+ H5F_file_space_type_t strategy = H5F_FILE_SPACE_ALL;
+ herr_t ret_value = H5Pget_file_space(id, &strategy, NULL);
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileCreatPropList::getFileSpaceStrategy",
+ "H5Pget_file_space for strategry failed");
+ }
+ return(strategy);
+}
+
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getFileSpaceThreshold
+///\brief Returns the threshold value that the library uses in tracking
+/// free space sections.
+///\return The threshold value
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - Feb, 2017
+//--------------------------------------------------------------------------
+hsize_t FileCreatPropList::getFileSpaceThreshold() const
+{
+ hsize_t threshold = 0;
+ herr_t ret_value = H5Pget_file_space(id, NULL, &threshold);
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileCreatPropList::getFileSpaceThreshold",
+ "H5Pget_file_space for threshold failed");
+ }
+ return(threshold);
+}
+
+//--------------------------------------------------------------------------
// Function: FileCreatPropList destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000