mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r4580]
Purpose: Bug fixing Description: + added operator= to PredType + removed 'using namespace std' from H5RefCounter.cpp because it's not used and leaving it there requires #include some standard header file + added 'using namespace std' in H5Exception.cpp Platforms tested: SunOS 5.7 (arabica) Windows 98
This commit is contained in:
parent
356626bd34
commit
1398cc0eef
@ -5,11 +5,11 @@
|
||||
#endif
|
||||
|
||||
#include "H5Include.h"
|
||||
#include <string>
|
||||
#include "H5Exception.h"
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
// Default constructor
|
||||
|
@ -27,6 +27,13 @@ PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
|
||||
// Copy constructor: makes a copy of this PredType object.
|
||||
PredType::PredType( const PredType& original ) : AtomType( original ) {}
|
||||
|
||||
// Makes a copy of the predefined type and stores the new
|
||||
// id in the left hand side object.
|
||||
DataType& PredType::operator=( const PredType& rhs )
|
||||
{
|
||||
return(DataType::operator=(rhs));
|
||||
}
|
||||
|
||||
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
|
||||
|
||||
// Definition of pre-defined types
|
||||
@ -461,7 +468,7 @@ void PredType::commit( H5Object& loc, const string& name )
|
||||
bool PredType::committed()
|
||||
{
|
||||
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
// Default destructor
|
||||
|
@ -19,8 +19,7 @@ class PredType : public AtomType {
|
||||
// Copy constructor - makes copy of the original object
|
||||
PredType( const PredType& original );
|
||||
|
||||
virtual hid_t getId() const;
|
||||
hid_t getenum() const { return id; } // remove when done
|
||||
virtual hid_t getId() const;
|
||||
|
||||
// Declaration of predefined types; their definition is in Predtype.C
|
||||
static const PredType STD_I8BE;
|
||||
@ -225,6 +224,10 @@ hid_t getenum() const { return id; } // remove when done
|
||||
|
||||
// Creates a pre-defined type using an HDF5 pre-defined constant
|
||||
PredType( const hid_t predtype_id ); // used by the library only
|
||||
|
||||
// Makes a copy of the predefined type and stores the new
|
||||
// id in the left hand side object.
|
||||
DataType& operator=( const PredType& rhs );
|
||||
};
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#ifndef H5_NO_NAMESPACE
|
||||
namespace H5 {
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
// Creates a reference counter to be used by an HDF5 object
|
||||
|
Loading…
Reference in New Issue
Block a user