summaryrefslogtreecommitdiffstats
path: root/c++/src/H5AbstractDs.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2000-12-23 13:17:32 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2000-12-23 13:17:32 (GMT)
commitd24bacb8a47f945e6919f067e8057ad30012bd5a (patch)
tree2844b08018435b9d33f68ef4b787d5434db66d5a /c++/src/H5AbstractDs.h
parent45c5dd949f7dd4549dc5996ff8395652ef3d9dda (diff)
downloadhdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.zip
hdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.tar.gz
hdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.tar.bz2
[svn-r3199]
Purpose: bug fix Description: I found a couple of places where virtual destructors were missing and could cause small memory leaks. Also, some destructors were not virtual when they should be. Solution: - added virtual destructors, which also free dynamically allocated memory - added virtual to several destructors - also, fixed several typos Platforms tested: Solaris 2.7 (arabica)
Diffstat (limited to 'c++/src/H5AbstractDs.h')
-rw-r--r--c++/src/H5AbstractDs.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index 49aafa9..924b63b 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -1,3 +1,8 @@
+// Class AbstractDs is an abstract base class, from which Attribute and
+// DataSet inherit. It provides the services that are common to both
+// Attribute and DataSet. It also inherits from H5Object and passes down
+// the services that H5Object provides.
+
#ifndef _AbstractDs_H
#define _AbstractDs_H
@@ -6,9 +11,6 @@ namespace H5 {
#endif
class AbstractDs : public H5Object {
public:
- // Copy constructor
- AbstractDs( const AbstractDs& original );
-
// Gets the dataspace of this abstract dataset - pure virtual
virtual DataSpace getSpace() const = 0;
@@ -16,22 +18,24 @@ class AbstractDs : public H5Object {
// dataset
H5T_class_t getTypeClass() const;
- // Gets a copy the datatype of this abstract dataset. Note that
- // this datatype is a generic one and can only be accessed via
- // generic member functions, i.e., member functions belong to
- // DataType. To get specific datatype, i.e. EnumType,
- // FloatType, etc..., use the specific functions instead .
+ // Gets a copy the datatype of that this abstract dataset uses.
+ // Note that this datatype is a generic one and can only be accessed
+ // via generic member functions, i.e., member functions belong
+ // to DataType. To get specific datatype, i.e. EnumType, FloatType,
+ // etc..., use the specific functions, that follow, instead .
DataType getDataType() const;
- // Gets a copy of the specific datatype of this abstract dataset -
- // overloading for subtypes.
+ // Gets a copy of the specific datatype of this abstract dataset
EnumType getEnumType() const;
CompType getCompType() const;
IntType getIntType() const;
FloatType getFloatType() const;
StrType getStrType() const;
- virtual ~AbstractDs() {};
+ // Copy constructor
+ AbstractDs( const AbstractDs& original );
+
+ virtual ~AbstractDs();
protected:
// Default constructor