summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
commita92c735c9b57049e8c4037d3490f7e10f8eef4d6 (patch)
tree74da25151de6d1e32329dfcd62e17c863e2e3de1 /c++/src
parent024f7ba09250110c19b070c9699cfbc0f9dc2b96 (diff)
downloadhdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.zip
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.gz
hdf5-a92c735c9b57049e8c4037d3490f7e10f8eef4d6.tar.bz2
Squashed commit of the token_refactoring branch:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/C2Cppfunction_map.htm4
-rw-r--r--c++/src/H5Location.cpp157
-rw-r--r--c++/src/H5Location.h35
-rw-r--r--c++/src/H5Object.cpp28
-rw-r--r--c++/src/H5Object.h4
5 files changed, 181 insertions, 47 deletions
diff --git a/c++/src/C2Cppfunction_map.htm b/c++/src/C2Cppfunction_map.htm
index 2d779a3..a9e0a27 100644
--- a/c++/src/C2Cppfunction_map.htm
+++ b/c++/src/C2Cppfunction_map.htm
@@ -11493,7 +11493,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5L_info_t getLinkInfo(const char* link_name,</p>
+ normal'>H5L_info2_t getLinkInfo(const char* link_name,</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'><span style='mso-tab-count:1'>               </span>const
LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
@@ -11526,7 +11526,7 @@ normal'><span style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0in 5.4pt 0in 5.4pt'>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
- normal'>H5L_info_t getLinkInfo(const H5std_string&amp; link_name,</p>
+ normal'>H5L_info2_t getLinkInfo(const H5std_string&amp; link_name,</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal'><span style='mso-tab-count:1'>               </span>const
LinkAccPropList&amp; lapl = LinkAccPropList::DEFAULT)</p>
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 2641960..764aa12 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -1404,6 +1404,121 @@ void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) c
}
//--------------------------------------------------------------------------
+// Function: H5Location::getNativeObjinfo
+///\brief Retrieves native information about an HDF5 object.
+///\param objinfo - OUT: Struct containing the native object info
+///\param fields - IN: Indicates the group of information to be retrieved
+///\par Description
+/// Valid values of \a fields are as follows:
+/// \li \c H5O_INFO_HDR (default)
+/// \li \c H5O_INFO_META_SIZE
+/// \li \c H5O_INFO_ALL
+// July, 2018
+//--------------------------------------------------------------------------
+void H5Location::getNativeObjinfo(H5O_native_info_t& objinfo, unsigned fields) const
+{
+
+ // Use C API to get information of the object
+ herr_t ret_value = H5Oget_native_info(getId(), &objinfo, fields);
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throwException(inMemFunc("getNativeObjinfo"), "H5Oget_native_info failed");
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::getNativeObjinfo
+///\brief Retrieves native information about an HDF5 object given its name.
+///\param name - IN: Name of the object to be queried - \c char *
+///\param objinfo - OUT: Struct containing the native object info
+///\param fields - IN: Indicates the group of information to be retrieved
+/// - default to H5O_INFO_HDR
+///\param lapl - IN: Link access property list
+///\par Description
+/// Valid values of \a fields are as follows:
+/// \li \c H5O_INFO_HDR (default)
+/// \li \c H5O_INFO_META_SIZE
+/// \li \c H5O_INFO_ALL
+// July, 2018
+//--------------------------------------------------------------------------
+void H5Location::getNativeObjinfo(const char* name, H5O_native_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
+{
+ // Use C API to get information of the object
+ herr_t ret_value = H5Oget_native_info_by_name(getId(), name, &objinfo, fields, lapl.getId());
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throwException(inMemFunc("getNativeObjinfo"), "H5Oget_native_info_by_name failed");
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::getNativeObjinfo
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function in that it takes
+/// a reference to an \c H5std_string for \a name.
+///\param name - IN: Name of the object to be queried - \c H5std_string
+///\param objinfo - OUT: Struct containing the native object info
+///\param fields - IN: Indicates the group of information to be retrieved
+/// - default to H5O_INFO_HDR
+///\param lapl - IN: Link access property list
+// July, 2018
+//--------------------------------------------------------------------------
+void H5Location::getNativeObjinfo(const H5std_string& name, H5O_native_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
+{
+ getNativeObjinfo(name.c_str(), objinfo, fields, lapl);
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::getNativeObjinfo
+///\brief Retrieves native information about an HDF5 object given its index.
+///\param grp_name - IN: Group name where the object belongs - \c char *
+///\param idx_type - IN: Type of index
+///\param order - IN: Order to traverse
+///\param idx - IN: Object position
+///\param objinfo - OUT: Struct containing the native object info
+///\param fields - IN: Indicates the group of information to be retrieved
+/// - default to H5O_INFO_HDR
+///\param lapl - IN: Link access property list
+///\par Description
+/// Valid values of \a fields are as follows:
+/// \li \c H5O_INFO_HDR (default)
+/// \li \c H5O_INFO_META_SIZE
+/// \li \c H5O_INFO_ALL
+// July, 2018
+//--------------------------------------------------------------------------
+void H5Location::getNativeObjinfo(const char* grp_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t idx, H5O_native_info_t& objinfo, unsigned fields,
+ const LinkAccPropList& lapl) const
+{
+ // Use C API to get information of the object
+ herr_t ret_value = H5Oget_native_info_by_idx(getId(), grp_name, idx_type, order,
+ idx, &objinfo, fields, lapl.getId());
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throwException(inMemFunc("getNativeObjinfo"), "H5Oget_native_info_by_idx failed");
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::getObjinfo
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function in that it takes
+/// a reference to an \c H5std_string for \a name.
+///\param name - IN: Name of the object to be queried - \c H5std_string
+///\param objinfo - OUT: Struct containing the native object info
+///\param fields - IN: Indicates a group of information to be retrieved
+/// - default to H5O_INFO_HDR
+///\param lapl - IN: Link access property list
+// July, 2018
+//--------------------------------------------------------------------------
+void H5Location::getNativeObjinfo(const H5std_string& grp_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t idx, H5O_native_info_t& objinfo, unsigned fields,
+ const LinkAccPropList& lapl) const
+{
+ getNativeObjinfo(grp_name.c_str(), idx_type, order, idx, objinfo, fields, lapl);
+}
+
+//--------------------------------------------------------------------------
// Function: H5Location::getObjinfo
///\brief Retrieves information about an HDF5 object.
///\param objinfo - OUT: Struct containing the object info
@@ -1418,15 +1533,15 @@ void H5Location::unlink(const H5std_string& name, const LinkAccPropList& lapl) c
/// \li \c H5O_INFO_ALL
// July, 2018
//--------------------------------------------------------------------------
-void H5Location::getObjinfo(H5O_info_t& objinfo, unsigned fields) const
+void H5Location::getObjinfo(H5O_info2_t& objinfo, unsigned fields) const
{
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info2(getId(), &objinfo, fields);
+ herr_t ret_value = H5Oget_info3(getId(), &objinfo, fields);
// Throw exception if C API returns failure
if (ret_value < 0)
- throwException(inMemFunc("getObjinfo"), "H5Oget_info2 failed");
+ throwException(inMemFunc("getObjinfo"), "H5Oget_info3 failed");
}
//--------------------------------------------------------------------------
@@ -1447,10 +1562,10 @@ void H5Location::getObjinfo(H5O_info_t& objinfo, unsigned fields) const
/// \li \c H5O_INFO_ALL
// July, 2018
//--------------------------------------------------------------------------
-void H5Location::getObjinfo(const char* name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
+void H5Location::getObjinfo(const char* name, H5O_info2_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
{
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_name2(getId(), name, &objinfo, fields, lapl.getId());
+ herr_t ret_value = H5Oget_info_by_name3(getId(), name, &objinfo, fields, lapl.getId());
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -1469,7 +1584,7 @@ void H5Location::getObjinfo(const char* name, H5O_info_t& objinfo, unsigned fiel
///\param lapl - IN: Link access property list
// July, 2018
//--------------------------------------------------------------------------
-void H5Location::getObjinfo(const H5std_string& name, H5O_info_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
+void H5Location::getObjinfo(const H5std_string& name, H5O_info2_t& objinfo, unsigned fields, const LinkAccPropList& lapl) const
{
getObjinfo(name.c_str(), objinfo, fields, lapl);
}
@@ -1496,11 +1611,11 @@ void H5Location::getObjinfo(const H5std_string& name, H5O_info_t& objinfo, unsig
// July, 2018
//--------------------------------------------------------------------------
void H5Location::getObjinfo(const char* grp_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields,
+ H5_iter_order_t order, hsize_t idx, H5O_info2_t& objinfo, unsigned fields,
const LinkAccPropList& lapl) const
{
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_idx2(getId(), grp_name, idx_type, order,
+ herr_t ret_value = H5Oget_info_by_idx3(getId(), grp_name, idx_type, order,
idx, &objinfo, fields, lapl.getId());
// Throw exception if C API returns failure
@@ -1521,7 +1636,7 @@ void H5Location::getObjinfo(const char* grp_name, H5_index_t idx_type,
// July, 2018
//--------------------------------------------------------------------------
void H5Location::getObjinfo(const H5std_string& grp_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo, unsigned fields,
+ H5_iter_order_t order, hsize_t idx, H5O_info2_t& objinfo, unsigned fields,
const LinkAccPropList& lapl) const
{
getObjinfo(grp_name.c_str(), idx_type, order, idx, objinfo, fields, lapl);
@@ -1596,11 +1711,11 @@ void H5Location::getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
// 2000
//--------------------------------------------------------------------------
-H5L_info_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList& lapl) const
+H5L_info2_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList& lapl) const
{
- H5L_info_t linkinfo; // link info structure
+ H5L_info2_t linkinfo; // link info structure
- herr_t ret_value = H5Lget_info(getId(), link_name, &linkinfo, lapl.getId());
+ herr_t ret_value = H5Lget_info2(getId(), link_name, &linkinfo, lapl.getId());
if (ret_value < 0)
throwException("getLinkInfo", "H5Lget_info to find buffer size failed");
@@ -1613,7 +1728,7 @@ H5L_info_t H5Location::getLinkInfo(const char* link_name, const LinkAccPropList&
/// It differs from the above function in that it takes an
/// \c H5std_string for \a link_name.
//--------------------------------------------------------------------------
-H5L_info_t H5Location::getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl) const
+H5L_info2_t H5Location::getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl) const
{
return(getLinkInfo(link_name.c_str(), lapl));
}
@@ -1629,7 +1744,7 @@ H5L_info_t H5Location::getLinkInfo(const H5std_string& link_name, const LinkAccP
//--------------------------------------------------------------------------
H5std_string H5Location::getLinkval(const char* name, size_t size) const
{
- H5L_info_t linkinfo;
+ H5L_info2_t linkinfo;
char *value_C; // value in C string
size_t val_size = size;
H5std_string value = "";
@@ -1638,7 +1753,7 @@ H5std_string H5Location::getLinkval(const char* name, size_t size) const
// if user doesn't provide buffer size, determine it
if (size == 0)
{
- ret_value = H5Lget_info(getId(), name, &linkinfo, H5P_DEFAULT);
+ ret_value = H5Lget_info2(getId(), name, &linkinfo, H5P_DEFAULT);
if (ret_value < 0)
throwException("getLinkval", "H5Lget_info to find buffer size failed");
@@ -1941,11 +2056,11 @@ ssize_t H5Location::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size
//--------------------------------------------------------------------------
H5O_type_t H5Location::childObjType(const char* objname) const
{
- H5O_info_t objinfo;
+ H5O_info2_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_name2(getId(), objname, &objinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ herr_t ret_value = H5Oget_info_by_name3(getId(), objname, &objinfo, H5O_INFO_BASIC, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -2016,11 +2131,11 @@ H5O_type_t H5Location::childObjType(const H5std_string& objname) const
H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order, const char* objname) const
{
herr_t ret_value;
- H5O_info_t objinfo;
+ H5O_info2_t objinfo;
H5O_type_t objtype = H5O_TYPE_UNKNOWN;
// Use C API to get information of the object
- ret_value = H5Oget_info_by_idx2(getId(), objname, index_type, order, index, &objinfo, H5O_INFO_BASIC, H5P_DEFAULT);
+ ret_value = H5Oget_info_by_idx3(getId(), objname, index_type, order, index, &objinfo, H5O_INFO_BASIC, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -2058,11 +2173,11 @@ H5O_type_t H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_ite
//--------------------------------------------------------------------------
unsigned H5Location::childObjVersion(const char* objname) const
{
- H5O_info_t objinfo;
+ H5O_native_info_t objinfo;
unsigned version = 0;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info_by_name2(getId(), objname, &objinfo, H5O_INFO_HDR, H5P_DEFAULT);
+ herr_t ret_value = H5Oget_native_info_by_name(getId(), objname, &objinfo, H5O_NATIVE_INFO_HDR, H5P_DEFAULT);
// Throw exception if C API returns failure
if (ret_value < 0)
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index dc3db75..3bad8bc 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -118,8 +118,8 @@ class H5_DLLCPP H5Location : public IdComponent {
DataSet openDataSet(const char* name, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT) const;
DataSet openDataSet(const H5std_string& name, const DSetAccPropList& dapl = DSetAccPropList::DEFAULT) const;
- H5L_info_t getLinkInfo(const char* link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- H5L_info_t getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ H5L_info2_t getLinkInfo(const char* link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ H5L_info2_t getLinkInfo(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
// Returns the value of a symbolic link.
H5std_string getLinkval(const char* link_name, size_t size=0) const;
@@ -147,26 +147,47 @@ class H5_DLLCPP H5Location : public IdComponent {
unsigned childObjVersion(const H5std_string& objname) const;
// Retrieves information about an HDF5 object.
- void getObjinfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC) const;
+ void getObjinfo(H5O_info2_t& objinfo, unsigned fields = H5O_INFO_BASIC) const;
// Retrieves information about an HDF5 object, given its name.
- void getObjinfo(const char* name, H5O_info_t& objinfo,
+ void getObjinfo(const char* name, H5O_info2_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- void getObjinfo(const H5std_string& name, H5O_info_t& objinfo,
+ void getObjinfo(const H5std_string& name, H5O_info2_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
// Retrieves information about an HDF5 object, given its index.
void getObjinfo(const char* grp_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo,
+ H5_iter_order_t order, hsize_t idx, H5O_info2_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
void getObjinfo(const H5std_string& grp_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t idx, H5O_info_t& objinfo,
+ H5_iter_order_t order, hsize_t idx, H5O_info2_t& objinfo,
unsigned fields = H5O_INFO_BASIC,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ // Retrieves native native information about an HDF5 object.
+ void getNativeObjinfo(H5O_native_info_t& objinfo, unsigned fields = H5O_NATIVE_INFO_HDR) const;
+
+ // Retrieves native information about an HDF5 object, given its name.
+ void getNativeObjinfo(const char* name, H5O_native_info_t& objinfo,
+ unsigned fields = H5O_NATIVE_INFO_HDR,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ void getNativeObjinfo(const H5std_string& name, H5O_native_info_t& objinfo,
+ unsigned fields = H5O_NATIVE_INFO_HDR,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+
+ // Retrieves native information about an HDF5 object, given its index.
+ void getNativeObjinfo(const char* grp_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t idx, H5O_native_info_t& objinfo,
+ unsigned fields = H5O_NATIVE_INFO_HDR,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+ void getNativeObjinfo(const H5std_string& grp_name, H5_index_t idx_type,
+ H5_iter_order_t order, hsize_t idx, H5O_native_info_t& objinfo,
+ unsigned fields = H5O_NATIVE_INFO_HDR,
+ const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
+
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Returns the type of an object in this group, given the
// object's index.
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 8d3334b..081cab7 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -52,9 +52,9 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
}
// userVisitOpWrpr interfaces between the user's function and the
-// C library function H5Ovisit2
+// C library function H5Ovisit3
extern "C" herr_t userVisitOpWrpr(hid_t obj_id, const char *attr_name,
- const H5O_info_t *obj_info, void *op_data)
+ const H5O_info2_t *obj_info, void *op_data)
{
H5std_string s_attr_name = H5std_string(attr_name);
UserData4Visit* myData = reinterpret_cast<UserData4Visit *> (op_data);
@@ -250,13 +250,11 @@ int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_dat
///\param *op_data - IN: User-defined pointer to data required by the
/// application for its processing of the object
///\param fields - IN: Flags specifying the fields to be retrieved
-/// to the callback op via the H5O_info_t argument.
+/// to the callback op via the H5O_info2_t argument.
/// \li \c H5O_INFO_BASIC fileno, addr, type, and rc fields
/// \li \c H5O_INFO_TIME atime, mtime, ctime, and btime fields
/// \li \c H5O_INFO_NUM_ATTRS num_attrs field
-/// \li \c H5O_INFO_HDR hdr field
-/// \li \c H5O_INFO_META_SIZE meta_size field
-/// \li \c H5O_INFO_ALL H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS | H5O_INFO_HDR | H5O_INFO_META_SIZE
+/// \li \c H5O_INFO_ALL H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS
///\return
/// \li On success:
/// \li the return value of the first operator that returns a positive value
@@ -266,7 +264,7 @@ int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_dat
/// wrong within the library or the operator failed
///\exception H5::Exception
///\par Description
-/// For information, please refer to the H5Ovisit2 API in the HDF5
+/// For information, please refer to the H5Ovisit3 API in the HDF5
/// C Reference Manual.
// Programmer Binh-Minh Ribler - Feb, 2019
//--------------------------------------------------------------------------
@@ -279,15 +277,15 @@ void H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_
userData->obj = this;
// Call the C API passing in op wrapper and info
- herr_t ret_value = H5Ovisit2(getId(), idx_type, order, userVisitOpWrpr, static_cast<void *>(userData), fields);
+ herr_t ret_value = H5Ovisit3(getId(), idx_type, order, userVisitOpWrpr, static_cast<void *>(userData), fields);
// Release memory
delete userData;
- // Throw exception if H5Ovisit2 failed, which could be a failure in
+ // Throw exception if H5Ovisit3 failed, which could be a failure in
// the library or in the call back operator
if (ret_value < 0)
- throw Exception(inMemFunc("visit"), "H5Ovisit2 failed");
+ throw Exception(inMemFunc("visit"), "H5Ovisit3 failed");
}
//--------------------------------------------------------------------------
@@ -304,15 +302,15 @@ void H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_
//--------------------------------------------------------------------------
unsigned H5Object::objVersion() const
{
- H5O_info_t objinfo;
+ H5O_native_info_t objinfo;
unsigned version = 0;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info2(getId(), &objinfo, H5O_INFO_HDR);
+ herr_t ret_value = H5Oget_native_info(getId(), &objinfo, H5O_NATIVE_INFO_HDR);
// Throw exception if C API returns failure
if (ret_value < 0)
- throw Exception(inMemFunc("objVersion"), "H5Oget_info failed");
+ throw Exception(inMemFunc("objVersion"), "H5Oget_native_info failed");
// Return a valid version or throw an exception for invalid value
else
{
@@ -332,9 +330,9 @@ unsigned H5Object::objVersion() const
//--------------------------------------------------------------------------
int H5Object::getNumAttrs() const
{
- H5O_info_t oinfo; /* Object info */
+ H5O_info2_t oinfo; /* Object info */
- if(H5Oget_info2(getId(), &oinfo, H5O_INFO_NUM_ATTRS) < 0)
+ if(H5Oget_info3(getId(), &oinfo, H5O_INFO_NUM_ATTRS) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return(static_cast<int>(oinfo.num_attrs));
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 4a4e909..033b1b7 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -44,10 +44,10 @@ typedef void (*attr_operator_t)(H5Object& loc,
const H5std_string attr_name,
void *operator_data);
-// Define the operator function pointer for H5Ovisit2().
+// Define the operator function pointer for H5Ovisit3().
typedef int (*visit_operator_t)(H5Object& obj,
const H5std_string attr_name,
- const H5O_info_t *oinfo,
+ const H5O_info2_t *oinfo,
void *operator_data);
// User data for attribute iteration