summaryrefslogtreecommitdiffstats
path: root/c++/src/H5LcreatProp.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-04-22 04:18:36 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-04-22 04:18:36 (GMT)
commitc3d7708e53ae0e7dade4a99f0e43944560e4fff0 (patch)
tree455416a7632c3abe037cb497eccd20a79ab585b9 /c++/src/H5LcreatProp.cpp
parent500f6cccbd4bfe01b67f2bd02f74df58edef045f (diff)
downloadhdf5-c3d7708e53ae0e7dade4a99f0e43944560e4fff0.zip
hdf5-c3d7708e53ae0e7dade4a99f0e43944560e4fff0.tar.gz
hdf5-c3d7708e53ae0e7dade4a99f0e43944560e4fff0.tar.bz2
Added new C++ wrappers - HDFFV-10622
Description: Added wrappers for H5Pset/get_create_intermediate_group: // Specifies in property list whether to create missing // intermediate groups void setCreateIntermediateGroup(bool crt_intmd_group) const; // Determines whether property is set to enable creating missing // intermediate groups bool getCreateIntermediateGroup() const; Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1011test)
Diffstat (limited to 'c++/src/H5LcreatProp.cpp')
-rw-r--r--c++/src/H5LcreatProp.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp
index 695c1fe..5c61e68 100644
--- a/c++/src/H5LcreatProp.cpp
+++ b/c++/src/H5LcreatProp.cpp
@@ -103,6 +103,45 @@ LinkCreatPropList::LinkCreatPropList(const LinkCreatPropList& original) : PropLi
LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
//--------------------------------------------------------------------------
+// Function: LinkCreatPropList::setCreateIntermediateGroup
+///\brief Specifies in property list whether to create missing
+/// intermediate groups.
+///
+///\exception H5::PropListIException
+// April, 2019
+//--------------------------------------------------------------------------
+void LinkCreatPropList::setCreateIntermediateGroup(bool crt_intmd_group) const
+{
+ herr_t ret_value = H5Pset_create_intermediate_group(id, (unsigned)crt_intmd_group);
+ // Throw exception if H5Pset_create_intermediate_group returns failure
+ if (ret_value < 0)
+ {
+ throw PropListIException("setCreateIntermediateGroup", "H5Pset_create_intermediate_group failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: LinkCreatPropList::getCreateIntermediateGroup
+///\brief Determines whether property is set to enable creating missing
+/// intermediate groups.
+///
+///\exception H5::PropListIException
+// April, 2019
+//--------------------------------------------------------------------------
+bool LinkCreatPropList::getCreateIntermediateGroup() const
+{
+ unsigned crt_intmd_group;
+ herr_t ret_value = H5Pget_create_intermediate_group(id, &crt_intmd_group);
+ // Throw exception if H5Pget_create_intermediate_group returns failure
+ if (ret_value < 0)
+ {
+ throw PropListIException("getCreateIntermediateGroup", "H5Pget_create_intermediate_group failed");
+ }
+
+ return((bool)crt_intmd_group);
+}
+
+//--------------------------------------------------------------------------
// Function: LinkCreatPropList::setCharEncoding
///\brief Sets the character encoding of the string.
///