summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-03-30 18:06:58 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-03-30 18:06:58 (GMT)
commita7e993d72be8fed2f0d63a8169e185bb2a298842 (patch)
tree420d7ea5ab1fd6415710f5f623f9667721f3f78e /c++/src/H5File.cpp
parent5a90c6b31c8904a407bb91ee4cc6a7aeecf73bed (diff)
downloadhdf5-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/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index b3f1c35..a7a690d 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.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"
@@ -102,7 +99,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c
/// FileCreatPropList::DEFAULT
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File( const string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
+H5File::H5File( const H5_std::string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
p_get_file(name.c_str(), flags, create_plist, access_plist);
}
@@ -196,7 +193,7 @@ bool H5File::isHdf5(const char* name)
///\param name - IN: Name of the file - \c std::string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool H5File::isHdf5(const string& name )
+bool H5File::isHdf5(const H5_std::string& name )
{
return( isHdf5( name.c_str()) );
}
@@ -239,7 +236,7 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
/// FileAccPropList::DEFAULT
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::openFile(const string& name, unsigned int flags, const FileAccPropList& access_plist)
+void H5File::openFile(const H5_std::string& name, unsigned int flags, const FileAccPropList& access_plist)
{
openFile(name.c_str(), flags, access_plist);
}
@@ -497,7 +494,7 @@ void H5File::getVFDHandle(void **file_handle) const
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
-string H5File::getFileName() const
+H5_std::string H5File::getFileName() const
{
try {
return(p_get_file_name());
@@ -564,7 +561,7 @@ void* H5File::Reference(const char* name) const
///\param name - IN: Name of the object to be referenced - \c std::string
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void* H5File::Reference(const string& name) const
+void* H5File::Reference(const H5_std::string& name) const
{
return(Reference(name.c_str()));
}
@@ -678,9 +675,9 @@ void H5File::close()
// implementation of H5File.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::throwException(const string func_name, const string msg) const
+void H5File::throwException(const H5_std::string func_name, const H5_std::string msg) const
{
- string full_name = func_name;
+ H5_std::string full_name = func_name;
full_name.insert(0, "H5File::");
throw FileIException(full_name, msg);
}