summaryrefslogtreecommitdiffstats
path: root/c++/src/H5AbstractDs.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2008-07-02 14:56:42 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2008-07-02 14:56:42 (GMT)
commite5df9bb33aa8b88bd0df21479942c1156ffd52aa (patch)
tree48c4dc2f0e08512addab592c0306fa57ded0898a /c++/src/H5AbstractDs.cpp
parentd9533d055c7f306e66e5f972068c77c939d6fc16 (diff)
downloadhdf5-e5df9bb33aa8b88bd0df21479942c1156ffd52aa.zip
hdf5-e5df9bb33aa8b88bd0df21479942c1156ffd52aa.tar.gz
hdf5-e5df9bb33aa8b88bd0df21479942c1156ffd52aa.tar.bz2
[svn-r15309] 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. 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.cpp12
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");
}
}