summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IdComponent.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/H5IdComponent.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/H5IdComponent.cpp')
-rw-r--r--c++/src/H5IdComponent.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 3063d6b..7e8587a 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -16,12 +16,9 @@
#endif /*H5_VMS*/
#include <string>
#ifndef H5_NO_NAMESPACE
-#ifndef H5_NO_STD
- using std::string;
#ifdef H5_VMS
using std::count;
#endif /*H5_VMS*/
-#endif // H5_NO_STD
#endif
#include "H5Include.h"
@@ -266,14 +263,14 @@ IdComponent::~IdComponent() {
/// an exception is thrown.
// Programmer Binh-Minh Ribler - Aug 6, 2005
//--------------------------------------------------------------------------
-string IdComponent::inMemFunc(const char* func_name) const
+H5_std::string IdComponent::inMemFunc(const char* func_name) const
{
#ifdef H5_VMS
- string full_name = fromClass();
+ H5_std::string full_name = fromClass();
full_name.append("::");
full_name.append(func_name);
#else
- string full_name = func_name;
+ H5_std::string full_name = func_name;
full_name.insert(0, "::");
full_name.insert(0, fromClass());
#endif /*H5_VMS*/
@@ -297,7 +294,7 @@ IdComponent::IdComponent() : id(-1) {}
// H5File and H5Object subclasses.
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
-string IdComponent::p_get_file_name() const
+H5_std::string IdComponent::p_get_file_name() const
{
// Preliminary call to H5Fget_name to get the length of the file name
ssize_t name_size = H5Fget_name(id, NULL, 0);
@@ -319,7 +316,7 @@ string IdComponent::p_get_file_name() const
}
// Convert the C file name and return
- string file_name(name_C);
+ H5_std::string file_name(name_C);
delete []name_C;
return(file_name);
}