diff options
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r-- | c++/src/H5DataSet.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index fbddd8d..db14577 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -30,6 +30,7 @@ #include "H5DcreatProp.h" #include "H5LcreatProp.h" #include "H5LaccProp.h" +#include "H5DaccProp.h" #include "H5Location.h" #include "H5Object.h" #include "H5DataType.h" @@ -172,6 +173,27 @@ DSetCreatPropList DataSet::getCreatePlist() const } //-------------------------------------------------------------------------- +// Function: DataSet::getAccessPlist +///\brief Gets the dataset access property list. +///\return DSetAccPropList instance +///\exception H5::DataSetIException +// July 2018 +//-------------------------------------------------------------------------- +DSetAccPropList DataSet::getAccessPlist() const +{ + hid_t access_plist_id = H5Dget_access_plist(id); + if (access_plist_id < 0) + { + throw DataSetIException("DataSet::getAccessPlist", "H5Dget_access_plist failed"); + } + + // create and return the DSetCreatPropList object + DSetAccPropList access_plist; + f_PropList_setId(&access_plist, access_plist_id); + return(access_plist); +} + +//-------------------------------------------------------------------------- // Function: DataSet::getStorageSize ///\brief Returns the amount of storage required for a dataset. ///\return Size of the storage or 0, for no data |