diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-07-22 20:22:34 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-07-22 20:22:34 (GMT) |
commit | 09913e2f8e0264dd6f312689d530d0bb5d3c431e (patch) | |
tree | 291d118718d53cb83bddc9b0c6c7384ef43db1b7 /c++/src/H5DataSet.cpp | |
parent | c983fc3c5bc3cab152ce80990536c2faf4642392 (diff) | |
download | hdf5-09913e2f8e0264dd6f312689d530d0bb5d3c431e.zip hdf5-09913e2f8e0264dd6f312689d530d0bb5d3c431e.tar.gz hdf5-09913e2f8e0264dd6f312689d530d0bb5d3c431e.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.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 |