summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2005-12-03 12:21:25 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2005-12-03 12:21:25 (GMT)
commit5ed48cf279c7cbf46a0107cf9726f8607fc714c4 (patch)
tree71309b6dcb43df4f4e51613a114d04245295103a /c++/src
parent25576025eb5261a6bc90dc75ab28f40208ef2fdd (diff)
downloadhdf5-5ed48cf279c7cbf46a0107cf9726f8607fc714c4.zip
hdf5-5ed48cf279c7cbf46a0107cf9726f8607fc714c4.tar.gz
hdf5-5ed48cf279c7cbf46a0107cf9726f8607fc714c4.tar.bz2
[svn-r11755] Purpose: Code improvement
Description: There was a workaround for predefined types, in the C++ library, implemented when the C++ library was handling the reference counting of the object ids on its own. Currently, the C++ library is using the available APIs from the C library for that purpose, and there were bugs reported involving that part of the C++ library. So, I decided to remove the workaround completely. Also, improved the use of std members. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol) Linux 2.4 w/PGI (colonelk)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5AbstractDs.cpp5
-rw-r--r--c++/src/H5ArrayType.cpp5
-rw-r--r--c++/src/H5ArrayType.h2
-rw-r--r--c++/src/H5AtomType.cpp5
-rw-r--r--c++/src/H5Attribute.cpp11
-rw-r--r--c++/src/H5Attribute.h2
-rw-r--r--c++/src/H5CommonFG.cpp5
-rw-r--r--c++/src/H5CompType.cpp5
-rw-r--r--c++/src/H5CompType.h2
-rw-r--r--c++/src/H5DataSet.cpp11
-rw-r--r--c++/src/H5DataSet.h2
-rw-r--r--c++/src/H5DataSpace.cpp11
-rw-r--r--c++/src/H5DataSpace.h2
-rw-r--r--c++/src/H5DataType.cpp89
-rw-r--r--c++/src/H5DataType.h15
-rw-r--r--c++/src/H5DcreatProp.cpp5
-rw-r--r--c++/src/H5DcreatProp.h2
-rw-r--r--c++/src/H5DxferProp.cpp5
-rw-r--r--c++/src/H5DxferProp.h2
-rw-r--r--c++/src/H5EnumType.cpp5
-rw-r--r--c++/src/H5EnumType.h2
-rw-r--r--c++/src/H5Exception.cpp10
-rw-r--r--c++/src/H5FaccProp.cpp5
-rw-r--r--c++/src/H5FaccProp.h2
-rw-r--r--c++/src/H5FcreatProp.cpp5
-rw-r--r--c++/src/H5FcreatProp.h2
-rw-r--r--c++/src/H5File.cpp11
-rw-r--r--c++/src/H5File.h2
-rw-r--r--c++/src/H5FloatType.cpp5
-rw-r--r--c++/src/H5FloatType.h2
-rw-r--r--c++/src/H5Group.cpp11
-rw-r--r--c++/src/H5Group.h2
-rw-r--r--c++/src/H5IdComponent.cpp5
-rw-r--r--c++/src/H5IdComponent.h2
-rw-r--r--c++/src/H5IntType.cpp5
-rw-r--r--c++/src/H5Library.cpp5
-rw-r--r--c++/src/H5Object.cpp5
-rw-r--r--c++/src/H5PredType.cpp574
-rw-r--r--c++/src/H5PredType.h70
-rw-r--r--c++/src/H5PropList.cpp11
-rw-r--r--c++/src/H5PropList.h2
-rw-r--r--c++/src/H5StrType.cpp5
-rw-r--r--c++/src/H5StrType.h2
-rw-r--r--c++/src/H5VarLenType.cpp5
-rw-r--r--c++/src/H5VarLenType.h2
45 files changed, 369 insertions, 574 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 1a2e7aa..f71ccea 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 74c572b..119c7bd 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 46d9919..896acc8 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -35,7 +35,7 @@ class H5_DLLCPP ArrayType : public DataType {
int getArrayDims(hsize_t* dims);
// Returns this class name
- virtual string fromClass () const { return ("ArrayType"); }
+ virtual string fromClass () const { return("ArrayType"); }
// Copy constructor: makes copy of the original object.
ArrayType( const ArrayType& original );
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index 4e70835..3ed814e 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index afd2827..e8573c3 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -34,7 +40,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 70e0575..21881c4 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -45,7 +45,7 @@ class H5_DLLCPP Attribute : public AbstractDs {
void write(const DataType& mem_type, const string& strg ) const;
// Returns this class name
- virtual string fromClass () const { return ("Attribute"); }
+ virtual string fromClass () const { return("Attribute"); }
// Creates a copy of an existing attribute using the attribute id
Attribute( const hid_t attr_id );
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 382c61f..836d7b4 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index e7106e5..e74b972 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index ccf4fe9..8176693 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -88,7 +88,7 @@ class H5_DLLCPP CompType : public DataType {
void pack() const;
// Returns this class name
- virtual string fromClass () const { return ("CompType"); }
+ virtual string fromClass () const { return("CompType"); }
// Default constructor
CompType();
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 4dc4222..027be88 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -36,7 +42,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index d5ceb0e..e3a4987 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -84,7 +84,7 @@ class H5_DLLCPP DataSet : public AbstractDs {
void* Reference(const string& name) const;
// Returns this class name
- virtual string fromClass () const { return ("DataSet"); }
+ virtual string fromClass () const { return("DataSet"); }
// Creates a copy of an existing DataSet using its id.
DataSet(const hid_t existing_id);
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index b86b93e..5fdab7c 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -27,7 +33,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 9af6366..35a7891 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -103,7 +103,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
// Returns this class name
- virtual string fromClass () const { return ("DataSpace"); }
+ virtual string fromClass () const { return("DataSpace"); }
// Creates a DataSpace object using an existing dataspace id.
DataSpace(const hid_t space_id);
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 7eaed51..b248d7f 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -35,7 +41,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
@@ -54,7 +61,7 @@ namespace H5 {
// - BMR 5/2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing_id), is_predtype(predefined) {}
+DataType::DataType(const hid_t existing_id) : H5Object(existing_id) {}
//--------------------------------------------------------------------------
// Function: DataType overloaded constructor
@@ -64,7 +71,7 @@ DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is_predtype( false )
+DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object()
{
// Call C routine to create the new datatype
id = H5Tcreate( type_class, size );
@@ -79,17 +86,14 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is
///\brief Default constructor: Creates a stub datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType() : H5Object(), is_predtype( false ) {}
+DataType::DataType() : H5Object() {}
//--------------------------------------------------------------------------
// Function: DataType copy constructor
///\brief Copy constructor: makes a copy of the original DataType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType(const DataType& original) : H5Object(original)
-{
- is_predtype = original.is_predtype; // copy data member from original
-}
+DataType::DataType(const DataType& original) : H5Object(original) {}
//--------------------------------------------------------------------------
// Function: DataType::copy
@@ -103,22 +107,20 @@ DataType::DataType(const DataType& original) : H5Object(original)
//--------------------------------------------------------------------------
void DataType::copy( const DataType& like_type )
{
- // reset the identifier of this instance, H5Tclose will be called
- // if needed
- if( is_predtype == false ) {
- try {
- decRefCount();
- }
- catch (Exception close_error) {
- throw DataTypeIException(inMemFunc("copy"), close_error.getDetailMsg());
- }
+ // reset the identifier of this instance, H5Tclose will be called
+ // if needed
+ try {
+ decRefCount();
+ }
+ catch (Exception close_error) {
+ throw DataTypeIException(inMemFunc("copy"), close_error.getDetailMsg());
}
- // call C routine to copy the datatype
- id = H5Tcopy( like_type.getId() );
+ // call C routine to copy the datatype
+ id = H5Tcopy( like_type.getId() );
- if( id < 0 )
- throw DataTypeIException(inMemFunc("copy"), "H5Tcopy failed");
+ if( id < 0 )
+ throw DataTypeIException(inMemFunc("copy"), "H5Tcopy failed");
}
//--------------------------------------------------------------------------
@@ -199,7 +201,8 @@ void DataType::commit(CommonFG& loc, const string& name) const
// Function: DataType::committed
///\brief Determines whether a datatype is a named type or a
/// transient type.
-///\return true if the datatype is a named type, and false, otherwise.
+///\return \c true if the datatype is a named type, and \c false,
+/// otherwise.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -503,7 +506,8 @@ bool DataType::detectClass(H5T_class_t cls) const
return false;
else
{
- throw DataTypeIException(inMemFunc("detectClass"), "H5Tdetect_class returns negative value");
+ throw DataTypeIException(inMemFunc("detectClass"),
+ "H5Tdetect_class returns negative value");
}
}
@@ -524,7 +528,8 @@ bool DataType::isVariableStr() const
return false;
else
{
- throw DataTypeIException(inMemFunc("isVariableStr"), "H5Tis_variable_str returns negative value");
+ throw DataTypeIException(inMemFunc("isVariableStr"),
+ "H5Tis_variable_str returns negative value");
}
}
@@ -637,19 +642,13 @@ DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
//--------------------------------------------------------------------------
void DataType::close()
{
- // If this datatype is not a predefined type, call H5Tclose on it.
- if( is_predtype == false )
- {
- herr_t ret_value = H5Tclose(id);
- if( ret_value < 0 )
- {
- throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
- }
- // reset the id because the datatype that it represents is now closed
- id = 0;
- }
- else // cannot close a predefined type
- throw DataTypeIException("DataType::close", "Cannot close a predefined type");
+ herr_t ret_value = H5Tclose(id);
+ if( ret_value < 0 )
+ {
+ throw DataTypeIException(inMemFunc("close"), "H5Tclose failed");
+ }
+ // reset the id because the datatype that it represents is now closed
+ id = 0;
}
//--------------------------------------------------------------------------
@@ -662,14 +661,12 @@ void DataType::close()
//--------------------------------------------------------------------------
DataType::~DataType()
{
- // The datatype id will be closed properly
- if( is_predtype == false ) {
- try {
- decRefCount();
- }
- catch (Exception close_error) {
- cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
- }
+ // The datatype id will be closed properly
+ try {
+ decRefCount();
+ }
+ catch (Exception close_error) {
+ cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
}
}
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index c81950b..10a6906 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -39,8 +39,8 @@ class H5_DLLCPP DataType : public H5Object {
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
- void commit( CommonFG& loc, const string& name ) const;
void commit( CommonFG& loc, const char* name ) const;
+ void commit( CommonFG& loc, const string& name ) const;
// Determines whether this datatype is a named datatype or
// a transient datatype.
@@ -70,16 +70,16 @@ class H5_DLLCPP DataType : public H5Object {
DataType getSuper() const;
// Registers a conversion function.
- void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
+ void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
// Removes a conversion function from all conversion paths.
- void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
+ void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
// Tags an opaque datatype.
- void setTag( const string& tag ) const;
void setTag( const char* tag ) const;
+ void setTag( const string& tag ) const;
// Gets the tag associated with an opaque datatype.
string getTag() const;
@@ -104,10 +104,10 @@ class H5_DLLCPP DataType : public H5Object {
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
- virtual string fromClass () const { return ("DataType"); }
+ virtual string fromClass () const { return("DataType"); }
// Creates a copy of an existing DataType using its id
- DataType( const hid_t type_id, bool predtype = false );
+ DataType( const hid_t type_id );
// Default constructor
DataType();
@@ -115,9 +115,6 @@ class H5_DLLCPP DataType : public H5Object {
// Destructor: properly terminates access to this datatype.
virtual ~DataType();
- protected:
- bool is_predtype; // indicates a type is predefined so
- // H5Tclose will not be called for it
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index faa03da..bf1a616 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 831d504..0d8b1ae 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -101,7 +101,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
void setShuffle();
// Returns this class name
- virtual string fromClass () const { return ("DSetCreatPropList"); }
+ virtual string fromClass () const { return("DSetCreatPropList"); }
// Default constructor: creates a stub dataset creation property list.
DSetCreatPropList();
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index bc3bbd1..081e610 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 059e78f..59aeb7b 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -95,7 +95,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
H5Z_EDC_t getEDCCheck();
// Returns this class name
- virtual string fromClass () const { return ("DSetMemXferPropList"); }
+ virtual string fromClass () const { return("DSetMemXferPropList"); }
// Creates a copy of an existing dataset memory and transfer
// property list using the property list id.
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 4d8f954..621f65c 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 2546b66..9b38fa4 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -57,7 +57,7 @@ class H5_DLLCPP EnumType : public DataType {
void valueOf( const string& name, void *value ) const;
// Returns this class name
- virtual string fromClass () const { return ("EnumType"); }
+ virtual string fromClass () const { return("EnumType"); }
// Default constructor
EnumType();
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index 9d5a272..4af1ffc 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -12,14 +12,18 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
-#ifndef H5_NO_STD
- using namespace std;
-#endif // H5_NO_STD
#endif
const string Exception::DEFAULT_MSG("No detailed information provided");
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index b1f69c1..f96fe97 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index b541172..38da7e3 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -120,7 +120,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
unsigned getGcReferences() const;
// Returns this class name
- virtual string fromClass () const { return ("FileAccPropList"); }
+ virtual string fromClass () const { return("FileAccPropList"); }
// Creates a file access property list.
FileAccPropList();
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index 65a03e6..cf76ffd 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index e1d155a..3624531 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -57,7 +57,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
void setIstorek( unsigned ik ) const;
// Returns this class name
- virtual string fromClass () const { return ("FileCreatPropList"); }
+ virtual string fromClass () const { return("FileCreatPropList"); }
// Creates a file create property list.
FileCreatPropList();
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index a881fa4..50a2fca 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,7 +45,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 619effa..30ee167 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -84,7 +84,7 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
void* Reference(const string& name) const;
// Returns this class name
- virtual string fromClass () const { return ("H5File"); }
+ virtual string fromClass () const { return("H5File"); }
// Throw file exception.
virtual void throwException(const string func_name, const string msg) const;
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index c511d0d..d56c4a7 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index 8cd4a69..c80391f 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -53,7 +53,7 @@ class H5_DLLCPP FloatType : public AtomType {
void setNorm( H5T_norm_t norm ) const;
// Returns this class name
- virtual string fromClass () const { return ("FloatType"); }
+ virtual string fromClass () const { return("FloatType"); }
// Default constructor
FloatType();
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index cf20d6c..5837d7b 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,7 +45,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index b496744..fda98d1 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -40,7 +40,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
void* Reference(const string& name) const;
// Returns this class name
- virtual string fromClass () const { return ("Group"); }
+ virtual string fromClass () const { return("Group"); }
// Throw group exception.
virtual void throwException(const string func_name, const string msg) const;
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index e7e0cfd..c6cf92e 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 118eafa..431863b 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -67,7 +67,7 @@ class H5_DLLCPP IdComponent {
string inMemFunc(const char* func_name) const;
// Returns this class name.
- virtual string fromClass() const {return ("IdComponent");}
+ virtual string fromClass() const { return("IdComponent");}
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index a664641..3b84832 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index e7dc902..36711d9 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 1c45730..3d0c6f5 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index ace3522..fc18d73 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
@@ -37,13 +42,13 @@ namespace H5 {
/// predefined datatype.
///\param predtype_id - IN: Id of a predefined datatype
// Description
-// This constructor creates a predefined datatype, so it sets
-// DataType::is_predtype to true.
+// This constructor creates a PredType object by copying
+// the provided HDF5 predefined datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
{
- is_predtype = true;
+ id = H5Tcopy(predtype_id);
}
//--------------------------------------------------------------------------
@@ -64,152 +69,148 @@ PredType::PredType( const PredType& original ) : AtomType( original ) {}
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
// Definition of pre-defined types
-// Note: the parameter E_xxxx_yyyy is the enum value that represents
-// the corresponding HDF5 predefined type H5T_xxxx_yyyy. This enum value
-// is stored in PredType::id since it is a PredType object id, in a way.
-// In addition, this storage makes things safely simpler. When a PredType
-// object is used, the virtual PredType::getId will base on the enum
-// value to return the correct HDF5 predefined type id.
-
-const PredType PredType::C_S1( E_C_S1 );
-const PredType PredType::FORTRAN_S1( E_FORTRAN_S1 );
-
-const PredType PredType::STD_I8BE( E_STD_I8BE );
-const PredType PredType::STD_I8LE( E_STD_I8LE );
-const PredType PredType::STD_I16BE( E_STD_I16BE );
-const PredType PredType::STD_I16LE( E_STD_I16LE );
-const PredType PredType::STD_I32BE( E_STD_I32BE );
-const PredType PredType::STD_I32LE( E_STD_I32LE );
-const PredType PredType::STD_I64BE( E_STD_I64BE );
-const PredType PredType::STD_I64LE( E_STD_I64LE );
-const PredType PredType::STD_U8BE( E_STD_U8BE );
-const PredType PredType::STD_U8LE( E_STD_U8LE );
-const PredType PredType::STD_U16BE( E_STD_U16BE );
-const PredType PredType::STD_U16LE( E_STD_U16LE );
-const PredType PredType::STD_U32BE( E_STD_U32BE );
-const PredType PredType::STD_U32LE( E_STD_U32LE );
-const PredType PredType::STD_U64BE( E_STD_U64BE );
-const PredType PredType::STD_U64LE( E_STD_U64LE );
-const PredType PredType::STD_B8BE( E_STD_B8BE );
-const PredType PredType::STD_B8LE( E_STD_B8LE );
-
-const PredType PredType::STD_B16BE( E_STD_B16BE );
-const PredType PredType::STD_B16LE( E_STD_B16LE );
-const PredType PredType::STD_B32BE( E_STD_B32BE );
-const PredType PredType::STD_B32LE( E_STD_B32LE );
-const PredType PredType::STD_B64BE( E_STD_B64BE );
-const PredType PredType::STD_B64LE( E_STD_B64LE );
-const PredType PredType::STD_REF_OBJ( E_STD_REF_OBJ );
-const PredType PredType::STD_REF_DSETREG( E_STD_REF_DSETREG );
-
-const PredType PredType::IEEE_F32BE( E_IEEE_F32BE );
-const PredType PredType::IEEE_F32LE( E_IEEE_F32LE );
-const PredType PredType::IEEE_F64BE( E_IEEE_F64BE );
-const PredType PredType::IEEE_F64LE( E_IEEE_F64LE );
-
-const PredType PredType::UNIX_D32BE( E_UNIX_D32BE );
-const PredType PredType::UNIX_D32LE( E_UNIX_D32LE );
-const PredType PredType::UNIX_D64BE( E_UNIX_D64BE );
-const PredType PredType::UNIX_D64LE( E_UNIX_D64LE );
-
-const PredType PredType::INTEL_I8( E_INTEL_I8 );
-const PredType PredType::INTEL_I16( E_INTEL_I16 );
-const PredType PredType::INTEL_I32( E_INTEL_I32 );
-const PredType PredType::INTEL_I64( E_INTEL_I64 );
-const PredType PredType::INTEL_U8( E_INTEL_U8 );
-const PredType PredType::INTEL_U16( E_INTEL_U16 );
-const PredType PredType::INTEL_U32( E_INTEL_U32 );
-const PredType PredType::INTEL_U64( E_INTEL_U64 );
-const PredType PredType::INTEL_B8( E_INTEL_B8 );
-const PredType PredType::INTEL_B16( E_INTEL_B16 );
-const PredType PredType::INTEL_B32( E_INTEL_B32 );
-const PredType PredType::INTEL_B64( E_INTEL_B64 );
-const PredType PredType::INTEL_F32( E_INTEL_F32 );
-const PredType PredType::INTEL_F64( E_INTEL_F64 );
-
-const PredType PredType::ALPHA_I8( E_ALPHA_I8 );
-const PredType PredType::ALPHA_I16( E_ALPHA_I16 );
-const PredType PredType::ALPHA_I32( E_ALPHA_I32 );
-const PredType PredType::ALPHA_I64( E_ALPHA_I64 );
-const PredType PredType::ALPHA_U8( E_ALPHA_U8 );
-const PredType PredType::ALPHA_U16( E_ALPHA_U16 );
-const PredType PredType::ALPHA_U32( E_ALPHA_U32 );
-const PredType PredType::ALPHA_U64( E_ALPHA_U64 );
-const PredType PredType::ALPHA_B8( E_ALPHA_B8 );
-const PredType PredType::ALPHA_B16( E_ALPHA_B16 );
-const PredType PredType::ALPHA_B32( E_ALPHA_B32 );
-const PredType PredType::ALPHA_B64( E_ALPHA_B64 );
-const PredType PredType::ALPHA_F32( E_ALPHA_F32 );
-const PredType PredType::ALPHA_F64( E_ALPHA_F64 );
-
-const PredType PredType::MIPS_I8( E_MIPS_I8 );
-const PredType PredType::MIPS_I16( E_MIPS_I16 );
-const PredType PredType::MIPS_I32( E_MIPS_I32 );
-const PredType PredType::MIPS_I64( E_MIPS_I64 );
-const PredType PredType::MIPS_U8( E_MIPS_U8 );
-const PredType PredType::MIPS_U16( E_MIPS_U16 );
-const PredType PredType::MIPS_U32( E_MIPS_U32 );
-const PredType PredType::MIPS_U64( E_MIPS_U64 );
-const PredType PredType::MIPS_B8( E_MIPS_B8 );
-const PredType PredType::MIPS_B16( E_MIPS_B16 );
-const PredType PredType::MIPS_B32( E_MIPS_B32 );
-const PredType PredType::MIPS_B64( E_MIPS_B64 );
-const PredType PredType::MIPS_F32( E_MIPS_F32 );
-const PredType PredType::MIPS_F64( E_MIPS_F64 );
-
-const PredType PredType::NATIVE_CHAR( E_NATIVE_CHAR );
-const PredType PredType::NATIVE_INT( E_NATIVE_INT );
-const PredType PredType::NATIVE_FLOAT( E_NATIVE_FLOAT );
-const PredType PredType::NATIVE_SCHAR( E_NATIVE_SCHAR );
-const PredType PredType::NATIVE_UCHAR( E_NATIVE_UCHAR );
-const PredType PredType::NATIVE_SHORT( E_NATIVE_SHORT );
-const PredType PredType::NATIVE_USHORT( E_NATIVE_USHORT );
-const PredType PredType::NATIVE_UINT( E_NATIVE_UINT );
-const PredType PredType::NATIVE_LONG( E_NATIVE_LONG );
-const PredType PredType::NATIVE_ULONG( E_NATIVE_ULONG );
-const PredType PredType::NATIVE_LLONG( E_NATIVE_LLONG );
-const PredType PredType::NATIVE_ULLONG( E_NATIVE_ULLONG );
-const PredType PredType::NATIVE_DOUBLE( E_NATIVE_DOUBLE );
+const PredType PredType::C_S1( H5T_C_S1 );
+const PredType PredType::FORTRAN_S1( H5T_FORTRAN_S1 );
+
+const PredType PredType::STD_I8BE( H5T_STD_I8BE );
+const PredType PredType::STD_I8LE( H5T_STD_I8LE );
+const PredType PredType::STD_I16BE( H5T_STD_I16BE );
+const PredType PredType::STD_I16LE( H5T_STD_I16LE );
+const PredType PredType::STD_I32BE( H5T_STD_I32BE );
+const PredType PredType::STD_I32LE( H5T_STD_I32LE );
+const PredType PredType::STD_I64BE( H5T_STD_I64BE );
+const PredType PredType::STD_I64LE( H5T_STD_I64LE );
+const PredType PredType::STD_U8BE( H5T_STD_U8BE );
+const PredType PredType::STD_U8LE( H5T_STD_U8LE );
+const PredType PredType::STD_U16BE( H5T_STD_U16BE );
+const PredType PredType::STD_U16LE( H5T_STD_U16LE );
+const PredType PredType::STD_U32BE( H5T_STD_U32BE );
+const PredType PredType::STD_U32LE( H5T_STD_U32LE );
+const PredType PredType::STD_U64BE( H5T_STD_U64BE );
+const PredType PredType::STD_U64LE( H5T_STD_U64LE );
+const PredType PredType::STD_B8BE( H5T_STD_B8BE );
+const PredType PredType::STD_B8LE( H5T_STD_B8LE );
+
+const PredType PredType::STD_B16BE( H5T_STD_B16BE );
+const PredType PredType::STD_B16LE( H5T_STD_B16LE );
+const PredType PredType::STD_B32BE( H5T_STD_B32BE );
+const PredType PredType::STD_B32LE( H5T_STD_B32LE );
+const PredType PredType::STD_B64BE( H5T_STD_B64BE );
+const PredType PredType::STD_B64LE( H5T_STD_B64LE );
+const PredType PredType::STD_REF_OBJ( H5T_STD_REF_OBJ );
+const PredType PredType::STD_REF_DSETREG( H5T_STD_REF_DSETREG );
+
+const PredType PredType::IEEE_F32BE( H5T_IEEE_F32BE );
+const PredType PredType::IEEE_F32LE( H5T_IEEE_F32LE );
+const PredType PredType::IEEE_F64BE( H5T_IEEE_F64BE );
+const PredType PredType::IEEE_F64LE( H5T_IEEE_F64LE );
+
+const PredType PredType::UNIX_D32BE( H5T_UNIX_D32BE );
+const PredType PredType::UNIX_D32LE( H5T_UNIX_D32LE );
+const PredType PredType::UNIX_D64BE( H5T_UNIX_D64BE );
+const PredType PredType::UNIX_D64LE( H5T_UNIX_D64LE );
+
+const PredType PredType::INTEL_I8( H5T_INTEL_I8 );
+const PredType PredType::INTEL_I16( H5T_INTEL_I16 );
+const PredType PredType::INTEL_I32( H5T_INTEL_I32 );
+const PredType PredType::INTEL_I64( H5T_INTEL_I64 );
+const PredType PredType::INTEL_U8( H5T_INTEL_U8 );
+const PredType PredType::INTEL_U16( H5T_INTEL_U16 );
+const PredType PredType::INTEL_U32( H5T_INTEL_U32 );
+const PredType PredType::INTEL_U64( H5T_INTEL_U64 );
+const PredType PredType::INTEL_B8( H5T_INTEL_B8 );
+const PredType PredType::INTEL_B16( H5T_INTEL_B16 );
+const PredType PredType::INTEL_B32( H5T_INTEL_B32 );
+const PredType PredType::INTEL_B64( H5T_INTEL_B64 );
+const PredType PredType::INTEL_F32( H5T_INTEL_F32 );
+const PredType PredType::INTEL_F64( H5T_INTEL_F64 );
+
+const PredType PredType::ALPHA_I8( H5T_ALPHA_I8 );
+const PredType PredType::ALPHA_I16( H5T_ALPHA_I16 );
+const PredType PredType::ALPHA_I32( H5T_ALPHA_I32 );
+const PredType PredType::ALPHA_I64( H5T_ALPHA_I64 );
+const PredType PredType::ALPHA_U8( H5T_ALPHA_U8 );
+const PredType PredType::ALPHA_U16( H5T_ALPHA_U16 );
+const PredType PredType::ALPHA_U32( H5T_ALPHA_U32 );
+const PredType PredType::ALPHA_U64( H5T_ALPHA_U64 );
+const PredType PredType::ALPHA_B8( H5T_ALPHA_B8 );
+const PredType PredType::ALPHA_B16( H5T_ALPHA_B16 );
+const PredType PredType::ALPHA_B32( H5T_ALPHA_B32 );
+const PredType PredType::ALPHA_B64( H5T_ALPHA_B64 );
+const PredType PredType::ALPHA_F32( H5T_ALPHA_F32 );
+const PredType PredType::ALPHA_F64( H5T_ALPHA_F64 );
+
+const PredType PredType::MIPS_I8( H5T_MIPS_I8 );
+const PredType PredType::MIPS_I16( H5T_MIPS_I16 );
+const PredType PredType::MIPS_I32( H5T_MIPS_I32 );
+const PredType PredType::MIPS_I64( H5T_MIPS_I64 );
+const PredType PredType::MIPS_U8( H5T_MIPS_U8 );
+const PredType PredType::MIPS_U16( H5T_MIPS_U16 );
+const PredType PredType::MIPS_U32( H5T_MIPS_U32 );
+const PredType PredType::MIPS_U64( H5T_MIPS_U64 );
+const PredType PredType::MIPS_B8( H5T_MIPS_B8 );
+const PredType PredType::MIPS_B16( H5T_MIPS_B16 );
+const PredType PredType::MIPS_B32( H5T_MIPS_B32 );
+const PredType PredType::MIPS_B64( H5T_MIPS_B64 );
+const PredType PredType::MIPS_F32( H5T_MIPS_F32 );
+const PredType PredType::MIPS_F64( H5T_MIPS_F64 );
+
+const PredType PredType::NATIVE_CHAR( H5T_NATIVE_CHAR );
+const PredType PredType::NATIVE_INT( H5T_NATIVE_INT );
+const PredType PredType::NATIVE_FLOAT( H5T_NATIVE_FLOAT );
+const PredType PredType::NATIVE_SCHAR( H5T_NATIVE_SCHAR );
+const PredType PredType::NATIVE_UCHAR( H5T_NATIVE_UCHAR );
+const PredType PredType::NATIVE_SHORT( H5T_NATIVE_SHORT );
+const PredType PredType::NATIVE_USHORT( H5T_NATIVE_USHORT );
+const PredType PredType::NATIVE_UINT( H5T_NATIVE_UINT );
+const PredType PredType::NATIVE_LONG( H5T_NATIVE_LONG );
+const PredType PredType::NATIVE_ULONG( H5T_NATIVE_ULONG );
+const PredType PredType::NATIVE_LLONG( H5T_NATIVE_LLONG );
+const PredType PredType::NATIVE_ULLONG( H5T_NATIVE_ULLONG );
+const PredType PredType::NATIVE_DOUBLE( H5T_NATIVE_DOUBLE );
#if H5_SIZEOF_LONG_DOUBLE !=0
-const PredType PredType::NATIVE_LDOUBLE( E_NATIVE_LDOUBLE );
+const PredType PredType::NATIVE_LDOUBLE( H5T_NATIVE_LDOUBLE );
#endif
-const PredType PredType::NATIVE_B8( E_NATIVE_B8 );
-const PredType PredType::NATIVE_B16( E_NATIVE_B16 );
-const PredType PredType::NATIVE_B32( E_NATIVE_B32 );
-const PredType PredType::NATIVE_B64( E_NATIVE_B64 );
-const PredType PredType::NATIVE_OPAQUE( E_NATIVE_OPAQUE );
-const PredType PredType::NATIVE_HSIZE( E_NATIVE_HSIZE );
-const PredType PredType::NATIVE_HSSIZE( E_NATIVE_HSSIZE );
-const PredType PredType::NATIVE_HERR( E_NATIVE_HERR );
-const PredType PredType::NATIVE_HBOOL( E_NATIVE_HBOOL );
-
-const PredType PredType::NATIVE_INT8( E_NATIVE_INT8 );
-const PredType PredType::NATIVE_UINT8( E_NATIVE_UINT8 );
-const PredType PredType::NATIVE_INT_LEAST8( E_NATIVE_INT_LEAST8 );
-const PredType PredType::NATIVE_UINT_LEAST8( E_NATIVE_UINT_LEAST8 );
-const PredType PredType::NATIVE_INT_FAST8( E_NATIVE_INT_FAST8 );
-const PredType PredType::NATIVE_UINT_FAST8( E_NATIVE_UINT_FAST8 );
-
-const PredType PredType::NATIVE_INT16( E_NATIVE_INT16 );
-const PredType PredType::NATIVE_UINT16( E_NATIVE_UINT16 );
-const PredType PredType::NATIVE_INT_LEAST16( E_NATIVE_INT_LEAST16 );
-const PredType PredType::NATIVE_UINT_LEAST16( E_NATIVE_UINT_LEAST16 );
-const PredType PredType::NATIVE_INT_FAST16( E_NATIVE_INT_FAST16 );
-const PredType PredType::NATIVE_UINT_FAST16( E_NATIVE_UINT_FAST16 );
-
-const PredType PredType::NATIVE_INT32( E_NATIVE_INT32 );
-const PredType PredType::NATIVE_UINT32( E_NATIVE_UINT32 );
-const PredType PredType::NATIVE_INT_LEAST32( E_NATIVE_INT_LEAST32 );
-const PredType PredType::NATIVE_UINT_LEAST32( E_NATIVE_UINT_LEAST32 );
-const PredType PredType::NATIVE_INT_FAST32( E_NATIVE_INT_FAST32 );
-const PredType PredType::NATIVE_UINT_FAST32( E_NATIVE_UINT_FAST32 );
-
-const PredType PredType::NATIVE_INT64( E_NATIVE_INT64 );
-const PredType PredType::NATIVE_UINT64( E_NATIVE_UINT64 );
-const PredType PredType::NATIVE_INT_LEAST64( E_NATIVE_INT_LEAST64 );
-const PredType PredType::NATIVE_UINT_LEAST64( E_NATIVE_UINT_LEAST64 );
-const PredType PredType::NATIVE_INT_FAST64( E_NATIVE_INT_FAST64 );
-const PredType PredType::NATIVE_UINT_FAST64( E_NATIVE_UINT_FAST64 );
+const PredType PredType::NATIVE_B8( H5T_NATIVE_B8 );
+const PredType PredType::NATIVE_B16( H5T_NATIVE_B16 );
+const PredType PredType::NATIVE_B32( H5T_NATIVE_B32 );
+const PredType PredType::NATIVE_B64( H5T_NATIVE_B64 );
+const PredType PredType::NATIVE_OPAQUE( H5T_NATIVE_OPAQUE );
+const PredType PredType::NATIVE_HSIZE( H5T_NATIVE_HSIZE );
+const PredType PredType::NATIVE_HSSIZE( H5T_NATIVE_HSSIZE );
+const PredType PredType::NATIVE_HERR( H5T_NATIVE_HERR );
+const PredType PredType::NATIVE_HBOOL( H5T_NATIVE_HBOOL );
+
+const PredType PredType::NATIVE_INT8( H5T_NATIVE_INT8 );
+const PredType PredType::NATIVE_UINT8( H5T_NATIVE_UINT8 );
+const PredType PredType::NATIVE_INT_LEAST8( H5T_NATIVE_INT_LEAST8 );
+const PredType PredType::NATIVE_UINT_LEAST8( H5T_NATIVE_UINT_LEAST8 );
+
+const PredType PredType::NATIVE_INT16( H5T_NATIVE_INT16 );
+const PredType PredType::NATIVE_UINT16( H5T_NATIVE_UINT16 );
+const PredType PredType::NATIVE_INT_LEAST16( H5T_NATIVE_INT_LEAST16 );
+const PredType PredType::NATIVE_UINT_LEAST16( H5T_NATIVE_UINT_LEAST16 );
+
+const PredType PredType::NATIVE_INT32( H5T_NATIVE_INT32 );
+const PredType PredType::NATIVE_UINT32( H5T_NATIVE_UINT32 );
+const PredType PredType::NATIVE_INT_LEAST32( H5T_NATIVE_INT_LEAST32 );
+const PredType PredType::NATIVE_UINT_LEAST32( H5T_NATIVE_UINT_LEAST32 );
+
+const PredType PredType::NATIVE_INT64( H5T_NATIVE_INT64 );
+const PredType PredType::NATIVE_UINT64( H5T_NATIVE_UINT64 );
+const PredType PredType::NATIVE_INT_LEAST64( H5T_NATIVE_INT_LEAST64 );
+const PredType PredType::NATIVE_UINT_LEAST64( H5T_NATIVE_UINT_LEAST64 );
+
+// These are new types and waiting for enabling with C99; currently,
+// the H5T_NATIVE_xxx_FASTn are -1 on sol. 11/14/05
+//const PredType PredType::NATIVE_INT_FAST8( H5T_NATIVE_INT_FAST8 );
+//const PredType PredType::NATIVE_UINT_FAST8( H5T_NATIVE_UINT_FAST8 );
+//const PredType PredType::NATIVE_INT_FAST16( H5T_NATIVE_INT_FAST16 );
+//const PredType PredType::NATIVE_UINT_FAST16( H5T_NATIVE_UINT_FAST16 );
+//const PredType PredType::NATIVE_INT_FAST32( H5T_NATIVE_INT_FAST32 );
+//const PredType PredType::NATIVE_UINT_FAST32( H5T_NATIVE_UINT_FAST32 );
+//const PredType PredType::NATIVE_INT_FAST64( H5T_NATIVE_INT_FAST64 );
+//const PredType PredType::NATIVE_UINT_FAST64( H5T_NATIVE_UINT_FAST64 );
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
@@ -229,285 +230,6 @@ PredType& PredType::operator=( const PredType& rhs )
return(*this);
}
-//--------------------------------------------------------------------------
-// Function: PredType::getId
-///\brief Returns the HDF5 predefined type id.
-///\return HDF5 predefined type id or INVALID
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-hid_t PredType::getId() const
-{
- switch( id ) {
- case E_C_S1:
- return( H5T_C_S1 );
- case E_FORTRAN_S1:
- return( H5T_FORTRAN_S1 );
-
- case E_STD_I8BE:
- return( H5T_STD_I8BE );
- case E_STD_I8LE:
- return( H5T_STD_I8LE );
- case E_STD_I16BE:
- return( H5T_STD_I16BE );
- case E_STD_I16LE:
- return( H5T_STD_I16LE );
- case E_STD_I32BE:
- return( H5T_STD_I32BE );
- case E_STD_I32LE:
- return( H5T_STD_I32LE );
- case E_STD_I64BE:
- return( H5T_STD_I64BE );
- case E_STD_I64LE:
- return( H5T_STD_I64LE );
- case E_STD_U8BE:
- return( H5T_STD_U8BE );
- case E_STD_U8LE:
- return( H5T_STD_U8LE );
- case E_STD_U16BE:
- return( H5T_STD_U16BE );
- case E_STD_U16LE:
- return( H5T_STD_U16LE );
- case E_STD_U32BE:
- return( H5T_STD_U32BE );
- case E_STD_U32LE:
- return( H5T_STD_U32LE );
- case E_STD_U64BE:
- return( H5T_STD_U64BE );
- case E_STD_U64LE:
- return( H5T_STD_U64LE );
- case E_STD_B8BE:
- return( H5T_STD_B8BE );
- case E_STD_B8LE:
- return( H5T_STD_B8LE );
-
- case E_STD_B16BE:
- return( H5T_STD_B16BE );
- case E_STD_B16LE:
- return( H5T_STD_B16LE );
- case E_STD_B32BE:
- return( H5T_STD_B32BE );
- case E_STD_B32LE:
- return( H5T_STD_B32LE );
- case E_STD_B64BE:
- return( H5T_STD_B64BE );
- case E_STD_B64LE:
- return( H5T_STD_B64LE );
- case E_STD_REF_OBJ:
- return( H5T_STD_REF_OBJ );
- case E_STD_REF_DSETREG:
- return( H5T_STD_REF_DSETREG );
-
- case E_IEEE_F32BE:
- return( H5T_IEEE_F32BE );
- case E_IEEE_F32LE:
- return( H5T_IEEE_F32LE );
- case E_IEEE_F64BE:
- return( H5T_IEEE_F64BE );
- case E_IEEE_F64LE:
- return( H5T_IEEE_F64LE );
-
- case E_UNIX_D32BE:
- return( H5T_UNIX_D32BE );
- case E_UNIX_D32LE:
- return( H5T_UNIX_D32LE );
- case E_UNIX_D64BE:
- return( H5T_UNIX_D64BE );
- case E_UNIX_D64LE:
- return( H5T_UNIX_D64LE );
-
- case E_INTEL_I8:
- return( H5T_INTEL_I8 );
- case E_INTEL_I16:
- return( H5T_INTEL_I16 );
- case E_INTEL_I32:
- return( H5T_INTEL_I32 );
- case E_INTEL_I64:
- return( H5T_INTEL_I64 );
- case E_INTEL_U8:
- return( H5T_INTEL_U8 );
- case E_INTEL_U16:
- return( H5T_INTEL_U16 );
- case E_INTEL_U32:
- return( H5T_INTEL_U32 );
- case E_INTEL_U64:
- return( H5T_INTEL_U64 );
- case E_INTEL_B8:
- return( H5T_INTEL_B8 );
- case E_INTEL_B16:
- return( H5T_INTEL_B16 );
- case E_INTEL_B32:
- return( H5T_INTEL_B32 );
- case E_INTEL_B64:
- return( H5T_INTEL_B64 );
- case E_INTEL_F32:
- return( H5T_INTEL_F32 );
- case E_INTEL_F64:
- return( H5T_INTEL_F64 );
-
- case E_ALPHA_I8:
- return( H5T_ALPHA_I8 );
- case E_ALPHA_I16:
- return( H5T_ALPHA_I16 );
- case E_ALPHA_I32:
- return( H5T_ALPHA_I32 );
- case E_ALPHA_I64:
- return( H5T_ALPHA_I64 );
- case E_ALPHA_U8:
- return( H5T_ALPHA_U8 );
- case E_ALPHA_U16:
- return( H5T_ALPHA_U16 );
- case E_ALPHA_U32:
- return( H5T_ALPHA_U32 );
- case E_ALPHA_U64:
- return( H5T_ALPHA_U64 );
- case E_ALPHA_B8:
- return( H5T_ALPHA_B8 );
- case E_ALPHA_B16:
- return( H5T_ALPHA_B16 );
- case E_ALPHA_B32:
- return( H5T_ALPHA_B32 );
- case E_ALPHA_B64:
- return( H5T_ALPHA_B64 );
- case E_ALPHA_F32:
- return( H5T_ALPHA_F32 );
- case E_ALPHA_F64:
- return( H5T_ALPHA_F64 );
-
- case E_MIPS_I8:
- return( H5T_MIPS_I8 );
- case E_MIPS_I16:
- return( H5T_MIPS_I16 );
- case E_MIPS_I32:
- return( H5T_MIPS_I32 );
- case E_MIPS_I64:
- return( H5T_MIPS_I64 );
- case E_MIPS_U8:
- return( H5T_MIPS_U8 );
- case E_MIPS_U16:
- return( H5T_MIPS_U16 );
- case E_MIPS_U32:
- return( H5T_MIPS_U32 );
- case E_MIPS_U64:
- return( H5T_MIPS_U64 );
- case E_MIPS_B8:
- return( H5T_MIPS_B8 );
- case E_MIPS_B16:
- return( H5T_MIPS_B16 );
- case E_MIPS_B32:
- return( H5T_MIPS_B32 );
- case E_MIPS_B64:
- return( H5T_MIPS_B64 );
- case E_MIPS_F32:
- return( H5T_MIPS_F32 );
- case E_MIPS_F64:
- return( H5T_MIPS_F64 );
-
- case E_NATIVE_CHAR:
- return( H5T_NATIVE_CHAR );
- case E_NATIVE_INT:
- return( H5T_NATIVE_INT );
- case E_NATIVE_FLOAT:
- return( H5T_NATIVE_FLOAT );
- case E_NATIVE_SCHAR:
- return( H5T_NATIVE_SCHAR );
- case E_NATIVE_UCHAR:
- return( H5T_NATIVE_UCHAR );
- case E_NATIVE_SHORT:
- return( H5T_NATIVE_SHORT );
- case E_NATIVE_USHORT:
- return( H5T_NATIVE_USHORT );
- case E_NATIVE_UINT:
- return( H5T_NATIVE_UINT );
- case E_NATIVE_LONG:
- return( H5T_NATIVE_LONG );
- case E_NATIVE_ULONG:
- return( H5T_NATIVE_ULONG );
- case E_NATIVE_LLONG:
- return( H5T_NATIVE_LLONG );
- case E_NATIVE_ULLONG:
- return( H5T_NATIVE_ULLONG );
- case E_NATIVE_DOUBLE:
- return( H5T_NATIVE_DOUBLE );
-#if H5_SIZEOF_LONG_DOUBLE !=0
- case E_NATIVE_LDOUBLE:
- return( H5T_NATIVE_LDOUBLE );
-#endif
- case E_NATIVE_B8:
- return( H5T_NATIVE_B8 );
- case E_NATIVE_B16:
- return( H5T_NATIVE_B16 );
- case E_NATIVE_B32:
- return( H5T_NATIVE_B32 );
- case E_NATIVE_B64:
- return( H5T_NATIVE_B64 );
- case E_NATIVE_OPAQUE:
- return( H5T_NATIVE_OPAQUE );
- case E_NATIVE_HSIZE:
- return( H5T_NATIVE_HSIZE );
- case E_NATIVE_HSSIZE:
- return( H5T_NATIVE_HSSIZE );
- case E_NATIVE_HERR:
- return( H5T_NATIVE_HERR );
- case E_NATIVE_HBOOL:
- return( H5T_NATIVE_HBOOL );
-
- case E_NATIVE_INT8:
- return( H5T_NATIVE_INT8 );
- case E_NATIVE_UINT8:
- return( H5T_NATIVE_UINT8 );
- case E_NATIVE_INT_LEAST8:
- return( H5T_NATIVE_INT_LEAST8 );
- case E_NATIVE_UINT_LEAST8:
- return( H5T_NATIVE_UINT_LEAST8 );
- case E_NATIVE_INT_FAST8:
- return( H5T_NATIVE_INT_FAST8 );
- case E_NATIVE_UINT_FAST8:
- return( H5T_NATIVE_UINT_FAST8 );
-
- case E_NATIVE_INT16:
- return( H5T_NATIVE_INT16 );
- case E_NATIVE_UINT16:
- return( H5T_NATIVE_UINT16 );
- case E_NATIVE_INT_LEAST16:
- return( H5T_NATIVE_INT_LEAST16 );
- case E_NATIVE_UINT_LEAST16:
- return( H5T_NATIVE_UINT_LEAST16 );
- case E_NATIVE_INT_FAST16:
- return( H5T_NATIVE_INT_FAST16 );
- case E_NATIVE_UINT_FAST16:
- return( H5T_NATIVE_UINT_FAST16 );
-
- case E_NATIVE_INT32:
- return( H5T_NATIVE_INT32 );
- case E_NATIVE_UINT32:
- return( H5T_NATIVE_UINT32 );
- case E_NATIVE_INT_LEAST32:
- return( H5T_NATIVE_INT_LEAST32 );
- case E_NATIVE_UINT_LEAST32:
- return( H5T_NATIVE_UINT_LEAST32 );
- case E_NATIVE_INT_FAST32:
- return( H5T_NATIVE_INT_FAST32 );
- case E_NATIVE_UINT_FAST32:
- return( H5T_NATIVE_UINT_FAST32 );
-
- case E_NATIVE_INT64:
- return( H5T_NATIVE_INT64 );
- case E_NATIVE_UINT64:
- return( H5T_NATIVE_UINT64 );
- case E_NATIVE_INT_LEAST64:
- return( H5T_NATIVE_INT_LEAST64 );
- case E_NATIVE_UINT_LEAST64:
- return( H5T_NATIVE_UINT_LEAST64 );
- case E_NATIVE_INT_FAST64:
- return( H5T_NATIVE_INT_FAST64 );
- case E_NATIVE_UINT_FAST64:
- return( H5T_NATIVE_UINT_FAST64 );
-
- default:
- return( INVALID );
- } // end switch
-} // end of getId()
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index 407e4a6..7de02c5 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -28,7 +28,7 @@ namespace H5 {
class H5_DLLCPP PredType : public AtomType {
public:
// Returns this class name
- virtual string fromClass () const { return ("PredType"); }
+ virtual string fromClass () const { return("PredType"); }
// Makes a copy of the predefined type and stores the new
// id in the left hand side object.
@@ -37,9 +37,6 @@ class H5_DLLCPP PredType : public AtomType {
// Copy constructor - makes copy of the original object
PredType( const PredType& original );
- // Returns the HDF5 predefined type id.
- virtual hid_t getId() const;
-
// Noop destructor
virtual ~PredType();
@@ -157,32 +154,31 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType NATIVE_UINT8;
static const PredType NATIVE_INT_LEAST8;
static const PredType NATIVE_UINT_LEAST8;
- static const PredType NATIVE_INT_FAST8;
- static const PredType NATIVE_UINT_FAST8;
+ //static const PredType NATIVE_INT_FAST8;
+ //static const PredType NATIVE_UINT_FAST8;
static const PredType NATIVE_INT16;
static const PredType NATIVE_UINT16;
static const PredType NATIVE_INT_LEAST16;
static const PredType NATIVE_UINT_LEAST16;
- static const PredType NATIVE_INT_FAST16;
- static const PredType NATIVE_UINT_FAST16;
+ //static const PredType NATIVE_INT_FAST16;
+ //static const PredType NATIVE_UINT_FAST16;
static const PredType NATIVE_INT32;
static const PredType NATIVE_UINT32;
static const PredType NATIVE_INT_LEAST32;
static const PredType NATIVE_UINT_LEAST32;
- static const PredType NATIVE_INT_FAST32;
- static const PredType NATIVE_UINT_FAST32;
+ //static const PredType NATIVE_INT_FAST32;
+ //static const PredType NATIVE_UINT_FAST32;
static const PredType NATIVE_INT64;
static const PredType NATIVE_UINT64;
static const PredType NATIVE_INT_LEAST64;
static const PredType NATIVE_UINT_LEAST64;
- static const PredType NATIVE_INT_FAST64;
- static const PredType NATIVE_UINT_FAST64;
+ //static const PredType NATIVE_INT_FAST64;
+ //static const PredType NATIVE_UINT_FAST64;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
// These dummy functions do not inherit from DataType - they'll
// throw a DataTypeIException if invoked.
void commit( H5Object& loc, const string& name );
@@ -195,54 +191,6 @@ class H5_DLLCPP PredType : public AtomType {
// temporarily - it'll prevent the use of atexit to clean up
static const PredType NotAtexit; // not working yet
- // This enum type is used by this class only to handle the
- // global PredType objects. These values will ensure that the
- // application receives an appropriate and uptodated id for an
- // HDF5 predefined type; particularly usefull when the application
- // closes and opens the library again.
- enum predefined_types {
-
- INVALID = 0, E_C_S1 = 1, E_FORTRAN_S1,
-
- E_STD_I8BE, E_STD_I8LE, E_STD_I16BE, E_STD_I16LE, E_STD_I32BE,
- E_STD_I32LE, E_STD_I64BE, E_STD_I64LE, E_STD_U8BE, E_STD_U8LE,
- E_STD_U16BE, E_STD_U16LE, E_STD_U32BE, E_STD_U32LE, E_STD_U64BE,
- E_STD_U64LE, E_STD_B8BE, E_STD_B8LE, E_STD_B16BE, E_STD_B16LE,
- E_STD_B32BE, E_STD_B32LE, E_STD_B64BE, E_STD_B64LE, E_STD_REF_OBJ,
- E_STD_REF_DSETREG,
-
- E_IEEE_F32BE, E_IEEE_F32LE, E_IEEE_F64BE, E_IEEE_F64LE,
-
- E_UNIX_D32BE, E_UNIX_D32LE, E_UNIX_D64BE, E_UNIX_D64LE,
-
- E_INTEL_I8, E_INTEL_I16, E_INTEL_I32, E_INTEL_I64, E_INTEL_U8,
- E_INTEL_U16, E_INTEL_U32, E_INTEL_U64, E_INTEL_B8, E_INTEL_B16,
- E_INTEL_B32, E_INTEL_B64, E_INTEL_F32, E_INTEL_F64,
-
- E_ALPHA_I8, E_ALPHA_I16, E_ALPHA_I32, E_ALPHA_I64, E_ALPHA_U8,
- E_ALPHA_U16, E_ALPHA_U32, E_ALPHA_U64, E_ALPHA_B8, E_ALPHA_B16,
- E_ALPHA_B32, E_ALPHA_B64, E_ALPHA_F32, E_ALPHA_F64,
-
- E_MIPS_I8, E_MIPS_I16, E_MIPS_I32, E_MIPS_I64, E_MIPS_U8,
- E_MIPS_U16, E_MIPS_U32, E_MIPS_U64, E_MIPS_B8, E_MIPS_B16,
- E_MIPS_B32, E_MIPS_B64, E_MIPS_F32, E_MIPS_F64,
-
- E_NATIVE_CHAR, E_NATIVE_INT, E_NATIVE_FLOAT, E_NATIVE_SCHAR,
- E_NATIVE_UCHAR, E_NATIVE_SHORT, E_NATIVE_USHORT, E_NATIVE_UINT,
- E_NATIVE_LONG, E_NATIVE_ULONG, E_NATIVE_LLONG, E_NATIVE_ULLONG,
- E_NATIVE_DOUBLE, E_NATIVE_LDOUBLE, E_NATIVE_B8, E_NATIVE_B16,
- E_NATIVE_B32, E_NATIVE_B64, E_NATIVE_OPAQUE, E_NATIVE_HSIZE,
- E_NATIVE_HSSIZE, E_NATIVE_HERR, E_NATIVE_HBOOL, E_NATIVE_INT8,
- E_NATIVE_UINT8, E_NATIVE_INT_LEAST8, E_NATIVE_UINT_LEAST8,
- E_NATIVE_INT_FAST8, E_NATIVE_UINT_FAST8, E_NATIVE_INT16,
- E_NATIVE_UINT16, E_NATIVE_INT_LEAST16, E_NATIVE_UINT_LEAST16,
- E_NATIVE_INT_FAST16, E_NATIVE_UINT_FAST16, E_NATIVE_INT32,
- E_NATIVE_UINT32, E_NATIVE_INT_LEAST32, E_NATIVE_UINT_LEAST32,
- E_NATIVE_INT_FAST32, E_NATIVE_UINT_FAST32, E_NATIVE_INT64,
- E_NATIVE_UINT64, E_NATIVE_INT_LEAST64, E_NATIVE_UINT_LEAST64,
- E_NATIVE_INT_FAST64, E_NATIVE_UINT_FAST64
- };
-
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 8a92f6d..e8f51a5 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -12,13 +12,19 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
+#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
+
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -27,7 +33,8 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#ifndef H5_NO_STD
- using namespace std;
+ using std::cerr;
+ using std::endl;
#endif // H5_NO_STD
#endif
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index f820518..642c046 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -94,7 +94,7 @@ class H5_DLLCPP PropList : public IdComponent {
void removeProp(const string& name) const;
// Returns this class name
- virtual string fromClass () const { return ("PropList"); }
+ virtual string fromClass () const { return("PropList"); }
// Default constructor: creates a stub PropList object.
PropList();
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index c2bcae2..68b91fd 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index b79ad0b..9bf3f93 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -47,7 +47,7 @@ class H5_DLLCPP StrType : public AtomType {
void setStrpad(H5T_str_t strpad) const;
// Returns this class name
- virtual string fromClass () const { return ("StrType"); }
+ virtual string fromClass () const { return("StrType"); }
// default constructor
StrType();
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 0a18693..b8f2d32 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -13,6 +13,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
+#endif
#include "H5Include.h"
#include "H5Exception.h"
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index 505d3cb..e4e7959 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -29,7 +29,7 @@ class H5_DLLCPP VarLenType : public DataType {
VarLenType(const DataType* base_type);
// Returns this class name
- virtual string fromClass () const { return ("VarLenType"); }
+ virtual string fromClass () const { return("VarLenType"); }
// Copy constructor: makes copy of the original object.
VarLenType( const VarLenType& original );