diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2008-05-20 20:24:44 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2008-05-20 20:24:44 (GMT) |
commit | 988e907b113c992cd2878705a5b98b499a4ccf41 (patch) | |
tree | 31b669eff3d8afade2cc50fa621d5559bb4c945c /c++/src/H5AbstractDs.cpp | |
parent | 980d1837908aa700efcf7edc0be62a9fc207c6ed (diff) | |
download | hdf5-988e907b113c992cd2878705a5b98b499a4ccf41.zip hdf5-988e907b113c992cd2878705a5b98b499a4ccf41.tar.gz hdf5-988e907b113c992cd2878705a5b98b499a4ccf41.tar.bz2 |
[svn-r15046] Purpose: Fixed bugs
Description:
The class hierarchy was revised to address the problem reported in
bugzilla #1068. Classes AbstractDS and Attribute are moved out of
H5Object. Class Attribute now multiply inherits from IdComponent and
AbstractDs and class DataSet from H5Object and AbstractDs.
In addition, data member IdComponent::id was moved into subclasses:
Attribute, DataSet, DataSpace, DataType, H5File, Group, and PropList.
Also fixed bugzilla 1045: revised Attribute::write and Attribute::read
wrappers to handle memory allocation/deallocation properly. (bugzilla 1045)
Platforms tested:
SunOS 5.10 (linew)
Linux 2.6 (kagiso)
FreeBSD (duty)
Diffstat (limited to 'c++/src/H5AbstractDs.cpp')
-rw-r--r-- | c++/src/H5AbstractDs.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 7cb170d..a61cc88 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -34,21 +34,21 @@ namespace H5 { ///\brief Default constructor // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -AbstractDs::AbstractDs() : H5Object() {} +AbstractDs::AbstractDs(){} //-------------------------------------------------------------------------- // Function: AbstractDs default constructor ///\brief Creates an AbstractDs instance using an existing id. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -AbstractDs::AbstractDs( const hid_t ds_id ) : H5Object( ds_id ) {} +AbstractDs::AbstractDs(const hid_t ds_id){} //-------------------------------------------------------------------------- // Function: AbstractDs copy constructor ///\brief Copy constructor: makes a copy of the original AbstractDs object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {} +AbstractDs::AbstractDs(const AbstractDs& original){} //-------------------------------------------------------------------------- // Function: AbstractDs::getTypeClass @@ -80,8 +80,10 @@ H5T_class_t AbstractDs::getTypeClass() const return( type_class ); else { - throw DataTypeIException(inMemFunc("getTypeClass"), - "H5Tget_class returns H5T_NO_CLASS"); + if (fromClass() == "DataSet") + throw DataTypeIException("DataSet::getTypeClass", "H5Tget_class returns H5T_NO_CLASS"); + else if (fromClass() == "Attribute") + throw DataTypeIException("Attribute::getTypeClass", "H5Tget_class returns H5T_NO_CLASS"); } } |