summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Attribute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r--c++/src/H5Attribute.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 89d72a8..48d1f10 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.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"
@@ -96,7 +93,7 @@ void Attribute::write( const DataType& mem_type, const void *buf ) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
-void Attribute::write( const DataType& mem_type, const string& strg ) const
+void Attribute::write( const DataType& mem_type, const H5_std::string& strg ) const
{
// Convert string to C-string
const char* strg_C;
@@ -135,7 +132,7 @@ void Attribute::read( const DataType& mem_type, void *buf ) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
-void Attribute::read( const DataType& mem_type, string& strg ) const
+void Attribute::read( const DataType& mem_type, H5_std::string& strg ) const
{
size_t size = mem_type.getSize();
char* strg_C = new char[size+1]; // temporary C-string for C API
@@ -201,7 +198,7 @@ hid_t Attribute::p_get_type() const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Nov, 2001
//--------------------------------------------------------------------------
-ssize_t Attribute::getName( size_t buf_size, string& attr_name ) const
+ssize_t Attribute::getName( size_t buf_size, H5_std::string& attr_name ) const
{
char* name_C = new char[buf_size+1]; // temporary C-string for C API
@@ -229,9 +226,9 @@ ssize_t Attribute::getName( size_t buf_size, string& attr_name ) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-string Attribute::getName( size_t buf_size ) const
+H5_std::string Attribute::getName( size_t buf_size ) const
{
- string attr_name;
+ H5_std::string attr_name;
ssize_t name_size = getName( buf_size, attr_name );
return( attr_name );
// let caller catch exception if any
@@ -246,7 +243,7 @@ string Attribute::getName( size_t buf_size ) const
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-string Attribute::getName() const
+H5_std::string Attribute::getName() const
{
// Try with 256 characters for the name first, if the name's length
// returned is more than that then, read the name again with the
@@ -254,7 +251,7 @@ string Attribute::getName() const
char* name_C = new char[256]; // temporary C-string for C API
ssize_t name_size = H5Aget_name(id, 255, name_C);
- string attr_name;
+ H5_std::string attr_name;
if (name_size >= 256)
name_size = getName(name_size, attr_name);