summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSet.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-19 01:54:54 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-19 01:54:54 (GMT)
commit18b896112c1fd7db68323a9dd4a18cfa19deedc2 (patch)
treec4bc5d7cf701bc2b8cfdb012b9a664fd69f23589 /c++/src/H5DataSet.cpp
parent54a659cb99af799999fbf191d57edb1e1fbbc5df (diff)
downloadhdf5-18b896112c1fd7db68323a9dd4a18cfa19deedc2.zip
hdf5-18b896112c1fd7db68323a9dd4a18cfa19deedc2.tar.gz
hdf5-18b896112c1fd7db68323a9dd4a18cfa19deedc2.tar.bz2
[svn-r24161] Purpose: More on HDFFV-7520 and HDFFV-533
Description: - Completed the changes in revisions r22836 and r23438 with improvement on wrappers such as reference, dereference, get region, and set/getcomment. - Added more tests. Platforms tested: Linux/32 2.6 (jam) SunOS 5.11 (emu) Linux/ppc64 (ostrich)
Diffstat (limited to 'c++/src/H5DataSet.cpp')
-rw-r--r--c++/src/H5DataSet.cpp49
1 files changed, 11 insertions, 38 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 3e3893c..7f6c553 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -27,6 +27,7 @@
#include "H5Object.h"
#include "H5PropList.h"
#include "H5DxferProp.h"
+#include "H5DaccProp.h"
#include "H5DcreatProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
@@ -79,57 +80,29 @@ DataSet::DataSet(const DataSet& original) : AbstractDs(original), H5Object(origi
//--------------------------------------------------------------------------
// Function: DataSet overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 dataset, creates a
+///\brief Given a reference, ref, to an hdf5 location, creates a
/// DataSet object
-///\param obj - IN: Dataset reference object is in or location of
+///\param loc - IN: Dataset reference object is in or location of
/// object that the dataset is located within.
///\param ref - IN: Reference pointer
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\exception H5::DataSetIException
///\par Description
-/// \c obj can be DataSet, Group, H5File, or named DataType, that
+/// \c loc can be DataSet, Group, H5File, or named DataType, that
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataSet::DataSet(H5Object& obj, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
+DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object()
{
- try {
- id = p_dereference(obj.getId(), ref, ref_type);
- } catch (ReferenceException deref_error) {
- throw ReferenceException("DataSet constructor - located by object",
- deref_error.getDetailMsg());
- }
+ H5Location::dereference(loc, ref, ref_type, plist);
}
//--------------------------------------------------------------------------
// Function: DataSet overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 dataset, creates a
-/// DataSet object
-///\param h5file - IN: Location referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\exception H5::DataSetIException
-// Programmer Binh-Minh Ribler - Oct, 2006
-// Modification
-// Jul, 2008
-// Added for application convenience.
-//--------------------------------------------------------------------------
-DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
-{
- try {
- id = p_dereference(h5file.getId(), ref, ref_type);
- } catch (ReferenceException deref_error) {
- throw ReferenceException("DataSet constructor - located by HDF5 file",
- deref_error.getDetailMsg());
- }
-}
-
-//--------------------------------------------------------------------------
-// Function: DataSet overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 dataset, creates a
+///\brief Given a reference, ref, to an hdf5 attribute, creates a
/// DataSet object
///\param attr - IN: Specifying location where the referenced object is in
///\param ref - IN: Reference pointer
@@ -140,12 +113,12 @@ DataSet::DataSet(H5File& h5file, const void* ref, H5R_type_t ref_type) : Abstrac
// Jul, 2008
// Added for application convenience.
//--------------------------------------------------------------------------
-DataSet::DataSet(Attribute& attr, const void* ref, H5R_type_t ref_type) : AbstractDs(), H5Object()
+DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : AbstractDs(), H5Object()
{
- try {
- id = p_dereference(attr.getId(), ref, ref_type);
+ try {
+ id = p_dereference(attr.getId(), ref, ref_type, plist);
} catch (ReferenceException deref_error) {
- throw ReferenceException("DataSet constructor - located by attribute",
+ throw ReferenceException("DataSet constructor - by dereferenced",
deref_error.getDetailMsg());
}
}