[svn-r3707] Purpose: Bug fixes and code clean up

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)
This commit is contained in:
Binh-Minh Ribler
2001-03-24 23:37:22 -05:00
parent 4432a558f9
commit ba6cba5d30
13 changed files with 541 additions and 162 deletions

View File

@@ -68,6 +68,14 @@ void DataSpace::copy( const DataSpace& like_space )
}
}
// Makes a copy of the dataspace on the right hand side and stores
// the new id in the left hand side object.
DataSpace& DataSpace::operator=( const DataSpace& rhs )
{
copy(rhs);
return(*this);
}
// Determines whether this dataspace is a simple dataspace.
bool DataSpace::isSimple () const
{