summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2005-08-18 22:16:56 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2005-08-18 22:16:56 (GMT)
commit6496413284a3319bc41ad3ebde3783bae02d6e23 (patch)
tree0d46e5948389c2e64b75a56b9d73789c44a8f16b /c++
parentf27f7c7821350c31dc252cca2b875ae35e5516db (diff)
downloadhdf5-6496413284a3319bc41ad3ebde3783bae02d6e23.zip
hdf5-6496413284a3319bc41ad3ebde3783bae02d6e23.tar.gz
hdf5-6496413284a3319bc41ad3ebde3783bae02d6e23.tar.bz2
[svn-r11264] Purpose: Additional code improvement
Description: Used "using" declaration and directive better to reduce namespace pollution. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol)
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5Attribute.cpp3
-rw-r--r--c++/src/H5DataSet.cpp3
-rw-r--r--c++/src/H5DataSpace.cpp3
-rw-r--r--c++/src/H5DataType.cpp3
-rw-r--r--c++/src/H5Exception.h2
-rw-r--r--c++/src/H5File.cpp3
-rw-r--r--c++/src/H5Group.cpp3
-rw-r--r--c++/src/H5IdComponent.h8
-rw-r--r--c++/src/H5PropList.cpp3
9 files changed, 30 insertions, 1 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 9a177b9..1939f6f 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -33,6 +33,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 34a87d7..8e5eef0 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -35,6 +35,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 7ed6ae2..25efc93 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -26,6 +26,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 62dca0f..987d0a1 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -34,6 +34,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 41a6e24..3d9c85d 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -21,7 +21,7 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::string;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 54c4f6d..fbb6a49 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -38,6 +38,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 6bf25a1..88b8bdd 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -38,6 +38,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 33fa7d2..5648380 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -61,10 +61,18 @@ class H5_DLLCPP IdComponent {
// Makes and returns the string "<class-name>::<func_name>";
// <class-name> is returned by fromClass().
+#ifdef H5_NO_STD
string inMemFunc(const char* func_name) const;
+#else
+ std::string inMemFunc(const char* func_name) const;
+#endif // H5_NO_STD
// Returns this class name.
+#ifdef H5_NO_STD
virtual string fromClass() const {return ("IdComponent");}
+#else
+ virtual std::string fromClass() const {return ("IdComponent");}
+#endif // H5_NO_STD
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index ff46e29..3eb0b84 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -26,6 +26,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using namespace std;
+#endif // H5_NO_STD
#endif
//--------------------------------------------------------------------------