diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-03-30 18:06:58 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2006-03-30 18:06:58 (GMT) |
commit | a7e993d72be8fed2f0d63a8169e185bb2a298842 (patch) | |
tree | 420d7ea5ab1fd6415710f5f623f9667721f3f78e /c++/src/H5PropList.cpp | |
parent | 5a90c6b31c8904a407bb91ee4cc6a7aeecf73bed (diff) | |
download | hdf5-a7e993d72be8fed2f0d63a8169e185bb2a298842.zip hdf5-a7e993d72be8fed2f0d63a8169e185bb2a298842.tar.gz hdf5-a7e993d72be8fed2f0d63a8169e185bb2a298842.tar.bz2 |
[svn-r12180] Purpose: Maintenance
Description:
Added alias H5_std so either the global or std namespace can be
used, depending on H5_NO_STD.
Platforms tested:
Linux 2.4 (heping)
SunOS 5.8 64-bit (sol)
AIX 5.1 (copper)
Diffstat (limited to 'c++/src/H5PropList.cpp')
-rw-r--r-- | c++/src/H5PropList.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index e8f51a5..80c1300 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -20,9 +20,6 @@ #include <string> #ifndef H5_NO_NAMESPACE -#ifndef H5_NO_STD - using std::string; -#endif // H5_NO_STD #endif #include "H5Include.h" @@ -162,7 +159,7 @@ void PropList::copyProp(PropList& dest, const char *name) const ///\param name - IN: Name of the property to copy - \c std::string // Programmer Binh-Minh Ribler - Jul, 2005 //-------------------------------------------------------------------------- -void PropList::copyProp( PropList& dest, const string& name ) const +void PropList::copyProp( PropList& dest, const H5_std::string& name ) const { copyProp( dest, name.c_str()); } @@ -199,7 +196,7 @@ void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const ///\param name - IN: Name of the property to copy - \c std::string // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void PropList::copyProp( PropList& dest, PropList& src, const string& name ) const +void PropList::copyProp( PropList& dest, PropList& src, const H5_std::string& name ) const { copyProp( dest, src, name.c_str()); } @@ -280,7 +277,7 @@ bool PropList::propExist(const char* name ) const ///\param name - IN: Name of property to check for - \c std::string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -bool PropList::propExist(const string& name ) const +bool PropList::propExist(const H5_std::string& name ) const { return( propExist( name.c_str()) ); } @@ -334,7 +331,7 @@ void PropList::getProperty(const char* name, void* value) const ///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -string PropList::getProperty(const char* name) const +H5_std::string PropList::getProperty(const char* name) const { size_t size = getPropSize(name); char* prop_strg_C = new char[size+1]; // temporary C-string for C API @@ -347,7 +344,7 @@ string PropList::getProperty(const char* name) const } // Return propety value as a string after deleting temp C-string - string prop_strg = string(prop_strg_C); + H5_std::string prop_strg = H5_std::string(prop_strg_C); delete []prop_strg_C; return (prop_strg); } @@ -360,7 +357,7 @@ string PropList::getProperty(const char* name) const ///\param value - OUT: Pointer to the buffer for the property value // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -void PropList::getProperty(const string& name, void* value) const +void PropList::getProperty(const H5_std::string& name, void* value) const { getProperty(name.c_str(), value); } @@ -373,7 +370,7 @@ void PropList::getProperty(const string& name, void* value) const ///\return The property that is a \c std::string. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -string PropList::getProperty(const string& name) const +H5_std::string PropList::getProperty(const H5_std::string& name) const { return (getProperty(name.c_str())); } @@ -410,7 +407,7 @@ size_t PropList::getPropSize(const char *name) const /// // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -size_t PropList::getPropSize(const string& name) const +size_t PropList::getPropSize(const H5_std::string& name) const { return (getPropSize(name.c_str())); } @@ -422,14 +419,14 @@ size_t PropList::getPropSize(const string& name) const /// a NULL string. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -string PropList::getClassName() const +H5_std::string PropList::getClassName() const { char* temp_str; temp_str = H5Pget_class_name(id); if (temp_str != NULL) { - string class_name = string(temp_str); + H5_std::string class_name = H5_std::string(temp_str); free(temp_str); return(class_name); } @@ -496,7 +493,7 @@ void PropList::setProperty(const char* name, const char* charptr) const ///\param strg - IN: Value for the property is a \c std::string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -void PropList::setProperty(const char* name, string& strg) const +void PropList::setProperty(const char* name, H5_std::string& strg) const { setProperty(name, strg.c_str()); } @@ -510,7 +507,7 @@ void PropList::setProperty(const char* name, string& strg) const ///\param value - IN: Void pointer to the value for the property // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -void PropList::setProperty(const string& name, void* value) const +void PropList::setProperty(const H5_std::string& name, void* value) const { setProperty(name.c_str(), value); } @@ -524,7 +521,7 @@ void PropList::setProperty(const string& name, void* value) const ///\param strg - IN: Value for the property is a \c std::string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -void PropList::setProperty(const string& name, string& strg) const +void PropList::setProperty(const H5_std::string& name, H5_std::string& strg) const { setProperty(name.c_str(), strg.c_str()); } @@ -576,7 +573,7 @@ void PropList::removeProp(const char *name) const ///\param name - IN: Name of property to remove - \c std::string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- -void PropList::removeProp(const string& name) const +void PropList::removeProp(const H5_std::string& name) const { removeProp(name.c_str()); } |