diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/Makefile.in | 2 | ||||
-rw-r--r-- | c++/examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 2 | ||||
-rw-r--r-- | c++/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/src/H5CommonFG.cpp | 49 | ||||
-rw-r--r-- | c++/src/Makefile.in | 4 | ||||
-rw-r--r-- | c++/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/test/Makefile.in | 2 |
9 files changed, 16 insertions, 51 deletions
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index 0076335..50ea838 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- diff --git a/c++/Makefile.in b/c++/Makefile.in index 8c82ca9..232299d 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -227,6 +227,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -278,7 +279,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index f60d96e..f45251b 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed # with "cpp_ex_". This allows for easier filtering of the examples. diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index e9bbf47..e8aa093 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -194,6 +194,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -245,7 +246,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index d983d1e..fea68cd 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index dcc331f..b3889a0 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -130,9 +130,7 @@ Group CommonFG::openGroup( const char* name ) const // If the opening of the group failed, throw an exception if( group_id < 0 ) - { throwException("openGroup", "H5Gopen2 failed"); - } // No failure, create and return the Group object Group group( group_id ); @@ -174,9 +172,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co // If the creation of the dataset failed, throw an exception if( dataset_id < 0 ) - { throwException("createDataSet", "H5Dcreate2 failed"); - } // No failure, create and return the DataSet object DataSet dataset( dataset_id ); @@ -270,9 +266,8 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne break; } /* end switch */ - if( ret_value < 0 ) { + if( ret_value < 0 ) throwException("link", "creating link failed"); - } } //-------------------------------------------------------------------------- @@ -300,9 +295,7 @@ void CommonFG::unlink( const char* name ) const { herr_t ret_value = H5Ldelete( getLocId(), name, H5P_DEFAULT ); if( ret_value < 0 ) - { throwException("unlink", "H5Ldelete failed"); - } } //-------------------------------------------------------------------------- @@ -336,9 +329,7 @@ void CommonFG::move( const char* src, const char* dst ) const { herr_t ret_value = H5Lmove( getLocId(), src, H5L_SAME_LOC, dst, H5P_DEFAULT, H5P_DEFAULT ); if( ret_value < 0 ) - { throwException("move", "H5Lmove failed"); - } } //-------------------------------------------------------------------------- @@ -371,9 +362,7 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st { herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf ); if( ret_value < 0 ) - { throwException("getObjinfo", "H5Gget_objinfo failed"); - } } //-------------------------------------------------------------------------- @@ -400,9 +389,7 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const { herr_t ret_value = H5Gget_objinfo( getLocId(), name, 0, &statbuf ); if( ret_value < 0 ) - { throwException("getObjinfo", "H5Gget_objinfo failed"); - } } //-------------------------------------------------------------------------- @@ -440,9 +427,8 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const { ret_value = H5Lget_info(getLocId(), name, &linkinfo, H5P_DEFAULT); if( ret_value < 0 ) - { throwException("getLinkval", "H5Lget_info to find buffer size failed"); - } + val_size = linkinfo.u.val_size; } @@ -453,9 +439,8 @@ H5std_string CommonFG::getLinkval( const char* name, size_t size ) const ret_value = H5Lget_val(getLocId(), name, value_C, val_size, H5P_DEFAULT); if( ret_value < 0 ) - { throwException("getLinkval", "H5Lget_val failed"); - } + value = H5std_string(value_C); delete []value_C; } @@ -498,9 +483,7 @@ void CommonFG::setComment( const char* name, const char* comment ) const { herr_t ret_value = H5Oset_comment_by_name( getLocId(), name, comment, H5P_DEFAULT ); if( ret_value < 0 ) - { throwException("setComment", "H5Oset_comment_by_name failed"); - } } //-------------------------------------------------------------------------- @@ -530,9 +513,7 @@ void CommonFG::removeComment(const char* name) const { herr_t ret_value = H5Oset_comment_by_name(getLocId(), name, NULL, H5P_DEFAULT); if( ret_value < 0 ) - { throwException("removeComment", "H5Oset_comment_by_name failed"); - } } //-------------------------------------------------------------------------- @@ -588,9 +569,8 @@ H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const // if H5Oget_comment_by_name returns SUCCEED, return the string comment, // otherwise, throw an exception if( ret_value < 0 ) - { throwException("getComment", "H5Oget_comment_by_name failed"); - } + H5std_string comment = H5std_string(comment_C); delete []comment_C; return (comment); @@ -628,9 +608,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const // Raise exception if H5Fmount returns negative value if( ret_value < 0 ) - { throwException("mount", "H5Fmount failed"); - } } //-------------------------------------------------------------------------- @@ -659,9 +637,7 @@ void CommonFG::unmount( const char* name ) const // Raise exception if H5Funmount returns negative value if( ret_value < 0 ) - { throwException("unmount", "H5Funmount failed"); - } } //-------------------------------------------------------------------------- @@ -1006,9 +982,7 @@ hsize_t CommonFG::getNumObjs() const herr_t ret_value = H5Gget_info(getLocId(), &ginfo); if(ret_value < 0) - { throwException("getNumObjs", "H5Gget_info failed"); - } return (ginfo.nlinks); } @@ -1032,9 +1006,7 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const // call H5Lget_name_by_idx with name as NULL to get its length ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT); if(name_len < 0) - { throwException("getObjnameByIdx", "H5Lget_name_by_idx failed"); - } // now, allocate C buffer to get the name char* name_C = new char[name_len+1]; @@ -1067,9 +1039,8 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, char* name, size_t size) const { ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5P_DEFAULT); if(name_len < 0) - { throwException("getObjnameByIdx", "H5Lget_name_by_idx failed"); - } + return (name_len); } @@ -1085,9 +1056,8 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) char* name_C = new char[size]; ssize_t name_len = getObjnameByIdx(idx, name_C, size); if(name_len < 0) - { throwException("getObjnameByIdx", "H5Lget_name_by_idx failed"); - } + name = H5std_string(name_C); delete []name_C; return (name_len); @@ -1107,9 +1077,8 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const { H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx); if (obj_type == H5G_UNKNOWN) - { throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed"); - } + return (obj_type); } @@ -1135,9 +1104,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const case H5G_TYPE: HDstrcpy(type_name, "datatype"); break; case H5G_UNKNOWN: default: - { throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed"); - } } return (obj_type); } @@ -1163,9 +1130,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const case H5G_TYPE: type_name = H5std_string("datatype"); break; case H5G_UNKNOWN: default: - { throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed"); - } } return (obj_type); } diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index d8b2367..b025f0b 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -269,6 +269,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -320,7 +321,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ @@ -467,7 +467,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 127 +LT_VERS_REVISION = 138 LT_VERS_AGE = 0 # Include src directory diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 7f4437c..124edb9 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_CPP_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index 00a8056..ef1455c 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -230,6 +230,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -281,7 +282,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ |