diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-27 20:28:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-27 20:28:27 (GMT) |
commit | 2c93a80648a72fd19d13c3c014ef998dc1f88f8f (patch) | |
tree | 545dda6a2ce07309b440397baa189bb10e70bc3f /c++ | |
parent | 0ee1ca5c204516f07f71476906218850a67425a3 (diff) | |
download | hdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.zip hdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.tar.gz hdf5-2c93a80648a72fd19d13c3c014ef998dc1f88f8f.tar.bz2 |
[svn-r14160] Description:
Make H5Topen versioned, and add regression test for H5Topen1.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5CommonFG.cpp | 72 |
1 files changed, 32 insertions, 40 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index a1f1f90..653cbd1 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -659,15 +659,14 @@ void CommonFG::unmount( const H5std_string& name ) const //-------------------------------------------------------------------------- DataType CommonFG::openDataType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openDataType", "H5Topen failed"); - } + throwException("openDataType", "H5Topen2 failed"); + // No failure, create and return the DataType object DataType data_type(type_id); return(data_type); @@ -695,15 +694,14 @@ DataType CommonFG::openDataType( const H5std_string& name ) const //-------------------------------------------------------------------------- ArrayType CommonFG::openArrayType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openArrayType", "H5Topen failed"); - } + throwException("openArrayType", "H5Topen2 failed"); + // No failure, create and return the ArrayType object ArrayType array_type (type_id); return(array_type); @@ -731,15 +729,14 @@ ArrayType CommonFG::openArrayType( const H5std_string& name ) const //-------------------------------------------------------------------------- CompType CommonFG::openCompType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openCompType", "H5Topen failed"); - } + throwException("openCompType", "H5Topen2 failed"); + // No failure, create and return the CompType object CompType comp_type(type_id); return(comp_type); @@ -767,15 +764,14 @@ CompType CommonFG::openCompType( const H5std_string& name ) const //-------------------------------------------------------------------------- EnumType CommonFG::openEnumType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openEnumType", "H5Topen failed"); - } + throwException("openEnumType", "H5Topen2 failed"); + // No failure, create and return the EnumType object EnumType enum_type(type_id); return(enum_type); @@ -803,15 +799,14 @@ EnumType CommonFG::openEnumType( const H5std_string& name ) const //-------------------------------------------------------------------------- IntType CommonFG::openIntType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openIntType", "H5Topen failed"); - } + throwException("openIntType", "H5Topen2 failed"); + // No failure, create and return the IntType object IntType int_type(type_id); return(int_type); @@ -839,15 +834,14 @@ IntType CommonFG::openIntType( const H5std_string& name ) const //-------------------------------------------------------------------------- FloatType CommonFG::openFloatType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openFloatType", "H5Topen failed"); - } + throwException("openFloatType", "H5Topen2 failed"); + // No failure, create and return the FloatType object FloatType float_type(type_id); return(float_type); @@ -875,15 +869,14 @@ FloatType CommonFG::openFloatType( const H5std_string& name ) const //-------------------------------------------------------------------------- StrType CommonFG::openStrType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openStrType", "H5Topen failed"); - } + throwException("openStrType", "H5Topen2 failed"); + // No failure, create and return the StrType object StrType str_type(type_id); return(str_type); @@ -911,15 +904,14 @@ StrType CommonFG::openStrType( const H5std_string& name ) const //-------------------------------------------------------------------------- VarLenType CommonFG::openVarLenType( const char* name ) const { - // Call C function H5Topen to open the named datatype in this group, + // Call C function H5Topen2 to open the named datatype in this group, // given either the file or group id - hid_t type_id = H5Topen(getLocId(), name); + hid_t type_id = H5Topen2(getLocId(), name, H5P_DEFAULT); // If the datatype's opening failed, throw an exception if( type_id < 0 ) - { - throwException("openVarLenType", "H5Topen failed"); - } + throwException("openVarLenType", "H5Topen2 failed"); + // No failure, create and return the VarLenType object VarLenType varlen_type(type_id); return(varlen_type); |