diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-03-27 02:46:53 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-03-27 02:46:53 (GMT) |
commit | 2d79c4652dcce93f04c73da71ff5e1b2cca6d5ec (patch) | |
tree | f245efdd37fa485aeda821f031245f9689c29b1d /c++/src/H5IntType.cpp | |
parent | b9a636874a182824a8be2847c4f2f4ae1a0af555 (diff) | |
download | hdf5-2d79c4652dcce93f04c73da71ff5e1b2cca6d5ec.zip hdf5-2d79c4652dcce93f04c73da71ff5e1b2cca6d5ec.tar.gz hdf5-2d79c4652dcce93f04c73da71ff5e1b2cca6d5ec.tar.bz2 |
[svn-r3720] Purpose: Bug fixes and code clean up - 1.4 branch
Description and Solution:
- Predefined type objects become outdated when the application calls
H5close and then H5open to use the library again.
Solution:
+ Reimplemented PredType using enum type to obtain up-to-date
values for predefined types, i.e. H5T_xxx_yyy's, when they
are used.
+ Added to PredType its own version of getId() to return the
appropriate predefined type id according to the enum value.
+ Made IdComponent::getId() a virtual function
- Since Albert already fixed the "multiply defined RcsId" problem,
removed the now become unnessary "#undef RCSID" from H5Include.h
- Added a check for func_name != NULL in one of the Exception
constructors because seg. fault. might occur in some situations.
- It is more convenient to make a copy of a datatype, dataspace,
or property list by using assignment operator
Solution:
+ Added assignment operator to DataType, DataSpace, and
PropList so that they will invoke H5Tcopy, H5Scopy,
and H5Pcopy, respectively, instead of just simply
copying the data members as for other classes. So,
now a type, space, or property list can be copied by
either :
mytype = original_type, or
mytype.copy(original_type)
Note that copy constructors are still just copying the
data members.
+ Added an assignment operator to DataType that takes a
predefined type.
+ Made IdComponent::operator= a virtual function
Platforms tested:
arabica (sparc-sun-solaris 2.7)
Diffstat (limited to 'c++/src/H5IntType.cpp')
-rw-r--r-- | c++/src/H5IntType.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index c97daeb..6b48d7b 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -32,10 +32,18 @@ IntType::IntType( const PredType& pred_type ) : AtomType() copy( pred_type ); } +/* BMR - may not keep +IntType& IntType::operator=( const PredType& rhs ) +{ + copy(rhs); + return(*this); +} +*/ + // Creates a integer datatype using an existing id IntType::IntType( const hid_t existing_id ) : AtomType( existing_id ) {} -// Gets the integer datatype of the specified dataset - will reimplement -BMR +// Gets the integer datatype of the specified dataset - may reimplement -BMR IntType::IntType( const DataSet& dataset ) : AtomType() { // Calls C function H5Dget_type to get the id of the datatype |