summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSet.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-22 20:22:34 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-07-26 22:23:22 (GMT)
commit386b5f7bf8edaaae56e2fb44b7e9d7f0972e7cb3 (patch)
treea0c0ec82f4acd6b4327239b64bd2f3cb3372bd81 /c++/src/H5DataSet.cpp
parentdf934cd6657a3a9da386a8d878a9074897279a0c (diff)
downloadhdf5-386b5f7bf8edaaae56e2fb44b7e9d7f0972e7cb3.zip
hdf5-386b5f7bf8edaaae56e2fb44b7e9d7f0972e7cb3.tar.gz
hdf5-386b5f7bf8edaaae56e2fb44b7e9d7f0972e7cb3.tar.bz2
Added class DSetAccPropList
Description: - Added class DSetAccPropList for the dataset access property list. - Added wrapper for H5Dget_access_plist to class DataSet // Gets the access property list of this dataset. DSetAccPropList getAccessPlist() const; - Added wrappers for H5Pset_chunk_cache and H5Pget_chunk_cache to class DSetAccPropList // Sets the raw data chunk cache parameters. void setChunkCache(size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0) // Retrieves the raw data chunk cache parameters. void getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double &rdcc_w0) - Added two more arguments to H5Location::createDataSet: const DSetAccPropList& dapl = DSetAccPropList::DEFAULT const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT - Added one more argument to H5Location::openDataSet: const DSetAccPropList& dapl = DSetAccPropList::DEFAULT Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r--c++/src/H5DataSet.cpp22
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