diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
commit | 35c9af8371c4da7f5327c76ddab097b442128f59 (patch) | |
tree | d51be51c385a9b463388ba154efc3fa37cad49e8 /c++/src/H5LcreatProp.cpp | |
parent | c752332bfd0e9c3090f3a0c02d0253cd45c2e2ce (diff) | |
parent | 1d8f7bf297100ec11204442708a7f670a89f3f02 (diff) | |
download | hdf5-inactive/parallel_vds_develop.zip hdf5-inactive/parallel_vds_develop.tar.gz hdf5-inactive/parallel_vds_develop.tar.bz2 |
Merge branch 'develop' into parallel_vds_developinactive/parallel_vds_develop
Diffstat (limited to 'c++/src/H5LcreatProp.cpp')
-rw-r--r-- | c++/src/H5LcreatProp.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp index 695c1fe..bde9339 100644 --- a/c++/src/H5LcreatProp.cpp +++ b/c++/src/H5LcreatProp.cpp @@ -103,6 +103,46 @@ 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. +///\param crt_intmd_group - IN: Flag specifying whether to create +/// intermediate groups upon the creation of an object +///\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. +///\return true if creating intermediate groups is enabled, and false, otherwise +///\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. /// |