diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/examples/h5group.cpp | 10 | ||||
-rw-r--r-- | c++/src/H5CommonFG.cpp | 6 | ||||
-rw-r--r-- | c++/src/H5CommonFG.h | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp index f7dc733..bcaf2c0 100644 --- a/c++/examples/h5group.cpp +++ b/c++/examples/h5group.cpp @@ -46,7 +46,8 @@ const H5std_string FILE_NAME( "Group.h5" ); const int RANK = 2; // Operator function -extern "C" herr_t file_info(hid_t loc_id, const char *name, void *opdata); +extern "C" herr_t file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, + void *opdata); int main(void) { @@ -166,7 +167,7 @@ int main(void) * root directory. */ cout << endl << "Iterating over elements in the file" << endl; - herr_t idx = H5Giterate(file->getId(), "/", NULL, file_info, NULL); + herr_t idx = H5Literate(file->getId(), "/", H5_INDEX_NAME, H5_ITER_INC, NULL, file_info, NULL, H5P_DEFAULT); cout << endl; /* @@ -184,7 +185,7 @@ int main(void) cout << "\"Data\" is unlinked" << endl; cout << endl << "Iterating over elements in the file again" << endl; - idx = H5Giterate(file->getId(), "/", NULL, file_info, NULL); + idx = H5Literate(file->getId(), "/", H5_INDEX_NAME, H5_ITER_INC, NULL, file_info, NULL, H5P_DEFAULT); cout << endl; /* @@ -228,9 +229,10 @@ int main(void) * Operator function. */ herr_t -file_info(hid_t loc_id, const char *name, void *opdata) +file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata) { hid_t group; + /* * Open the group using its name. */ diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 251131d..7b8c5ac 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -243,7 +243,7 @@ DataSet CommonFG::openDataSet( const H5std_string& name ) const /// specified location. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* new_name ) const +void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* new_name ) const { herr_t ret_value; @@ -274,7 +274,7 @@ void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* ne /// \c std::string for \a curr_name and \a new_name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::link( H5G_link_t link_type, const H5std_string& curr_name, const H5std_string& new_name ) const +void CommonFG::link( H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name ) const { link( link_type, curr_name.c_str(), new_name.c_str() ); } @@ -935,6 +935,7 @@ VarLenType CommonFG::openVarLenType( const H5std_string& name ) const return( openVarLenType( name.c_str()) ); } +#ifndef H5_NO_DEPRECATED_SYMBOLS //-------------------------------------------------------------------------- // Function: CommonFG::iterateElems ///\brief Iterates a user's function over the entries of a group. @@ -969,6 +970,7 @@ int CommonFG::iterateElems( const H5std_string& name, int *idx, H5G_iterate_t op { return( iterateElems( name.c_str(), idx, op, op_data )); } +#endif /* H5_NO_DEPRECATED_SYMBOLS */ //-------------------------------------------------------------------------- // Function: CommonFG::getNumObjs diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index 5c75989..ed1c132 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -86,15 +86,17 @@ class H5_DLLCPP CommonFG { H5G_obj_t getObjTypeByIdx(hsize_t idx) const; H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const; +#ifndef H5_NO_DEPRECATED_SYMBOLS // Iterates over the elements of this group - not implemented in // C++ style yet. int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data); int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data); +#endif /* H5_NO_DEPRECATED_SYMBOLS */ // Creates a link of the specified type from new_name to current_name; // both names are interpreted relative to the specified location id. - void link(H5G_link_t link_type, const char* curr_name, const char* new_name) const; - void link(H5G_link_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const; + void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const; + void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const; // Removes the specified name at this location. void unlink(const char* name) const; |