summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FaccProp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5FaccProp.cpp')
-rw-r--r--c++/src/H5FaccProp.cpp53
1 files changed, 47 insertions, 6 deletions
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index f81c1f9..a79ada3 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
using std::cerr;
@@ -80,8 +76,7 @@ FileAccPropList::getConstant()
void
FileAccPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -697,6 +692,52 @@ FileAccPropList::getGcReferences() const
}
//--------------------------------------------------------------------------
+// Function: FileAccPropList::setFileLocking
+///\brief Sets file locking flags.
+///\param use_file_locking - IN: Flag that determines if file locks should
+// be used or not.
+///\param ignore_when_disabled - IN: Flag that determines if file locks
+// should be be used when disabled on the file system or not.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please refer to the H5Pset_file_locking API in
+/// the HDF5 C Reference Manual.
+// Programmer Dana Robinson - 2020
+//--------------------------------------------------------------------------
+void
+FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const
+{
+ herr_t ret_value = H5Pset_file_locking(id, use_file_locking, ignore_when_disabled);
+
+ if (ret_value < 0) {
+ throw PropListIException("FileAccPropList::setFileLocking", "H5Pset_file_locking failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: FileAccPropList::getFileLocking
+///\brief Gets file locking flags.
+///\param use_file_locking - OUT: Flag that determines if file locks
+// should be used or not.
+///\param ignore_when_disabled - OUT: Flag that determines if file locks
+// should be be used when disabled on the file system or not.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please refer to the H5Pget_file_locking API in
+/// the HDF5 C Reference Manual.
+// Programmer Dana Robinson - 2020
+//--------------------------------------------------------------------------
+void
+FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_disabled) const
+{
+ herr_t ret_value = H5Pget_file_locking(id, &use_file_locking, &ignore_when_disabled);
+
+ if (ret_value < 0) {
+ throw PropListIException("FileAccPropList::getFileLocking", "H5Pget_file_locking failed");
+ }
+}
+
+//--------------------------------------------------------------------------
// Function: FileAccPropList::setLibverBounds
///\brief Sets bounds on versions of library format to be used when creating
/// or writing objects.