diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-05 16:23:39 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-04-05 16:23:39 (GMT) |
commit | 6f7076f47b7e00b5172f80e5e08b3a3ab63d8a86 (patch) | |
tree | d1b60d66be0081652d701e946e98d03de3dc44ff /c++/src/H5CommonFG.cpp | |
parent | 12f01d9cd48c8c49b2ad2e5e0d0a0f35e2e598a8 (diff) | |
download | hdf5-6f7076f47b7e00b5172f80e5e08b3a3ab63d8a86.zip hdf5-6f7076f47b7e00b5172f80e5e08b3a3ab63d8a86.tar.gz hdf5-6f7076f47b7e00b5172f80e5e08b3a3ab63d8a86.tar.bz2 |
[svn-r12200] Purpose: Maintenance
Description:
Changed to alias string instead of std, i.e. H5std_string instead
of H5std, because the old way wasn't working when std didn't exist.
Platforms tested:
Linux 2.4 (heping)
SunOS 5.8 64-bit (sol)
HPUX 11.00 (kelgia) - this was the problematic platform but I wasn't
able to test before.
Diffstat (limited to 'c++/src/H5CommonFG.cpp')
-rw-r--r-- | c++/src/H5CommonFG.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index ebb5195..2dd6fdb 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -88,7 +88,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -Group CommonFG::createGroup( const H5_std::string& name, size_t size_hint ) const +Group CommonFG::createGroup( const H5std_string& name, size_t size_hint ) const { return( createGroup( name.c_str(), size_hint )); } @@ -126,7 +126,7 @@ Group CommonFG::openGroup( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -Group CommonFG::openGroup( const H5_std::string& name ) const +Group CommonFG::openGroup( const H5std_string& name ) const { return( openGroup( name.c_str() )); } @@ -170,7 +170,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSet CommonFG::createDataSet( const H5_std::string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const +DataSet CommonFG::createDataSet( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const { return( createDataSet( name.c_str(), data_type, data_space, create_plist )); } @@ -207,7 +207,7 @@ DataSet CommonFG::openDataSet( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataSet CommonFG::openDataSet( const H5_std::string& name ) const +DataSet CommonFG::openDataSet( const H5std_string& name ) const { return( openDataSet( name.c_str() )); } @@ -244,7 +244,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 H5_std::string& curr_name, const H5_std::string& new_name ) const +void CommonFG::link( H5G_link_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() ); } @@ -272,7 +272,7 @@ void CommonFG::unlink( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::unlink( const H5_std::string& name ) const +void CommonFG::unlink( const H5std_string& name ) const { unlink( name.c_str() ); } @@ -306,7 +306,7 @@ void CommonFG::move( const char* src, const char* dst ) const /// \c std::string for \a src and \a dst. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::move( const H5_std::string& src, const H5_std::string& dst ) const +void CommonFG::move( const H5std_string& src, const H5std_string& dst ) const { move( src.c_str(), dst.c_str() ); } @@ -340,7 +340,7 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::getObjinfo( const H5_std::string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const +void CommonFG::getObjinfo( const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const { getObjinfo( name.c_str(), follow_link, statbuf ); } @@ -368,7 +368,7 @@ void CommonFG::getObjinfo( const char* name, H5G_stat_t& statbuf ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - Nov, 2005 //-------------------------------------------------------------------------- -void CommonFG::getObjinfo( const H5_std::string& name, H5G_stat_t& statbuf ) const +void CommonFG::getObjinfo( const H5std_string& name, H5G_stat_t& statbuf ) const { getObjinfo( name.c_str(), statbuf ); } @@ -382,7 +382,7 @@ void CommonFG::getObjinfo( const H5_std::string& name, H5G_stat_t& statbuf ) con ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getLinkval( const char* name, size_t size ) const +H5std_string CommonFG::getLinkval( const char* name, size_t size ) const { char* value_C = new char[size+1]; // temporary C-string for C API @@ -391,7 +391,7 @@ H5_std::string CommonFG::getLinkval( const char* name, size_t size ) const { throwException("getLinkval", "H5Gget_linkval failed"); } - H5_std::string value = H5_std::string( value_C ); + H5std_string value = H5std_string( value_C ); delete []value_C; return( value ); } @@ -403,7 +403,7 @@ H5_std::string CommonFG::getLinkval( const char* name, size_t size ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getLinkval( const H5_std::string& name, size_t size ) const +H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const { return( getLinkval( name.c_str(), size )); } @@ -439,7 +439,7 @@ void CommonFG::setComment( const char* name, const char* comment ) const /// \c std::string for \a name and \a comment. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::setComment( const H5_std::string& name, const H5_std::string& comment ) const +void CommonFG::setComment( const H5std_string& name, const H5std_string& comment ) const { setComment( name.c_str(), comment.c_str() ); } @@ -467,7 +467,7 @@ void CommonFG::removeComment(const char* name) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - May 2005 //-------------------------------------------------------------------------- -void CommonFG::removeComment(const H5_std::string& name) const +void CommonFG::removeComment(const H5std_string& name) const { removeComment (name.c_str()); } @@ -480,7 +480,7 @@ void CommonFG::removeComment(const H5_std::string& name) const ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - May 2005 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getComment (const H5_std::string& name) const +H5std_string CommonFG::getComment (const H5std_string& name) const { size_t bufsize = 256; // anticipating the comment's length hid_t loc_id = getLocId(); // temporary variable @@ -505,7 +505,7 @@ H5_std::string CommonFG::getComment (const H5_std::string& name) const { throwException("getComment", "H5Gget_comment failed"); } - H5_std::string comment = H5_std::string( comment_C ); + H5std_string comment = H5std_string( comment_C ); delete []comment_C; return (comment); } @@ -520,7 +520,7 @@ H5_std::string CommonFG::getComment (const H5_std::string& name) const ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getComment( const char* name, size_t bufsize ) const +H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const { // temporary C-string for the object's comment char* comment_C = new char[bufsize+1]; @@ -532,7 +532,7 @@ H5_std::string CommonFG::getComment( const char* name, size_t bufsize ) const { throwException("getComment", "H5Gget_comment failed"); } - H5_std::string comment = H5_std::string( comment_C ); + H5std_string comment = H5std_string( comment_C ); delete []comment_C; return( comment ); } @@ -544,7 +544,7 @@ H5_std::string CommonFG::getComment( const char* name, size_t bufsize ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getComment( const H5_std::string& name, size_t bufsize ) const +H5std_string CommonFG::getComment( const H5std_string& name, size_t bufsize ) const { return( getComment( name.c_str(), bufsize )); } @@ -581,7 +581,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::mount( const H5_std::string& name, H5File& child, PropList& plist ) const +void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const { mount( name.c_str(), child, plist ); } @@ -612,7 +612,7 @@ void CommonFG::unmount( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void CommonFG::unmount( const H5_std::string& name ) const +void CommonFG::unmount( const H5std_string& name ) const { unmount( name.c_str() ); } @@ -648,7 +648,7 @@ DataType CommonFG::openDataType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataType CommonFG::openDataType( const H5_std::string& name ) const +DataType CommonFG::openDataType( const H5std_string& name ) const { return( openDataType( name.c_str()) ); } @@ -684,7 +684,7 @@ ArrayType CommonFG::openArrayType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- -ArrayType CommonFG::openArrayType( const H5_std::string& name ) const +ArrayType CommonFG::openArrayType( const H5std_string& name ) const { return( openArrayType( name.c_str()) ); } @@ -720,7 +720,7 @@ CompType CommonFG::openCompType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -CompType CommonFG::openCompType( const H5_std::string& name ) const +CompType CommonFG::openCompType( const H5std_string& name ) const { return( openCompType( name.c_str()) ); } @@ -756,7 +756,7 @@ EnumType CommonFG::openEnumType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -EnumType CommonFG::openEnumType( const H5_std::string& name ) const +EnumType CommonFG::openEnumType( const H5std_string& name ) const { return( openEnumType( name.c_str()) ); } @@ -792,7 +792,7 @@ IntType CommonFG::openIntType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -IntType CommonFG::openIntType( const H5_std::string& name ) const +IntType CommonFG::openIntType( const H5std_string& name ) const { return( openIntType( name.c_str()) ); } @@ -828,7 +828,7 @@ FloatType CommonFG::openFloatType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -FloatType CommonFG::openFloatType( const H5_std::string& name ) const +FloatType CommonFG::openFloatType( const H5std_string& name ) const { return( openFloatType( name.c_str()) ); } @@ -864,7 +864,7 @@ StrType CommonFG::openStrType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -StrType CommonFG::openStrType( const H5_std::string& name ) const +StrType CommonFG::openStrType( const H5std_string& name ) const { return( openStrType( name.c_str()) ); } @@ -900,7 +900,7 @@ VarLenType CommonFG::openVarLenType( const char* name ) const /// \c std::string for \a name. // Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- -VarLenType CommonFG::openVarLenType( const H5_std::string& name ) const +VarLenType CommonFG::openVarLenType( const H5std_string& name ) const { return( openVarLenType( name.c_str()) ); } @@ -935,7 +935,7 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void* /// \c std::string for \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -int CommonFG::iterateElems( const H5_std::string& name, int *idx, H5G_iterate_t op , void* op_data ) +int CommonFG::iterateElems( const H5std_string& name, int *idx, H5G_iterate_t op , void* op_data ) { return( iterateElems( name.c_str(), idx, op, op_data )); } @@ -973,7 +973,7 @@ hsize_t CommonFG::getNumObjs() const /// each time the group is opened. // Programmer Binh-Minh Ribler - Mar, 2005 //-------------------------------------------------------------------------- -H5_std::string CommonFG::getObjnameByIdx(hsize_t idx) const +H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const { // call H5Gget_objname_by_idx with name as NULL to get its length ssize_t name_len = H5Gget_objname_by_idx(getLocId(), idx, NULL, 0); @@ -987,7 +987,7 @@ H5_std::string CommonFG::getObjnameByIdx(hsize_t idx) const name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, name_len); // clean up and return the string - H5_std::string name = H5_std::string(name_C); + H5std_string name = H5std_string(name_C); delete []name_C; return (name); } @@ -1009,7 +1009,7 @@ H5_std::string CommonFG::getObjnameByIdx(hsize_t idx) const /// each time the group is opened. // Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- -ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5_std::string& name, size_t size) const +ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const { char* name_C = new char[size]; ssize_t name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, size); @@ -1017,7 +1017,7 @@ ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5_std::string& name, size_t size { throwException("getObjnameByIdx", "H5Gget_objname_by_idx failed"); } - name = H5_std::string( name_C ); + name = H5std_string( name_C ); delete [] name_C; return (name_len); } @@ -1052,15 +1052,15 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const ///\exception H5::FileIException or H5::GroupIException // Programmer Binh-Minh Ribler - January, 2003 //-------------------------------------------------------------------------- -H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5_std::string& type_name) const +H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const { H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx); switch (obj_type) { - case H5G_LINK: type_name = H5_std::string("symbolic link"); break; - case H5G_GROUP: type_name = H5_std::string("group"); break; - case H5G_DATASET: type_name = H5_std::string("dataset"); break; - case H5G_TYPE: type_name = H5_std::string("datatype"); break; + case H5G_LINK: type_name = H5std_string("symbolic link"); break; + case H5G_GROUP: type_name = H5std_string("group"); break; + case H5G_DATASET: type_name = H5std_string("dataset"); break; + case H5G_TYPE: type_name = H5std_string("datatype"); break; case H5G_UNKNOWN: default: { |