summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataSet.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2008-07-02 14:44:57 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2008-07-02 14:44:57 (GMT)
commitd9533d055c7f306e66e5f972068c77c939d6fc16 (patch)
treeaf5d0f7fc67f008e2f718c6913ab3f7baf777abe /c++/src/H5DataSet.h
parent0e1432a18f999074e48e455aad6ee61c93f27ed1 (diff)
downloadhdf5-d9533d055c7f306e66e5f972068c77c939d6fc16.zip
hdf5-d9533d055c7f306e66e5f972068c77c939d6fc16.tar.gz
hdf5-d9533d055c7f306e66e5f972068c77c939d6fc16.tar.bz2
[svn-r15308] 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/H5DataSet.h')
-rw-r--r--c++/src/H5DataSet.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 7323f52..f968932 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -23,7 +23,7 @@
namespace H5 {
#endif
-class H5_DLLCPP DataSet : public AbstractDs {
+class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
virtual void close();
@@ -81,19 +81,12 @@ class H5_DLLCPP DataSet : public AbstractDs {
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
- // Creates a reference to a named Hdf5 object or to a dataset region
- // in this object.
- void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
- // Creates a reference to a named Hdf5 object in this object.
- void* Reference(const char* name) const; // will be obsolete
- void* Reference(const H5std_string& name) const; // will be obsolete
-
// Returns this class name
virtual H5std_string fromClass () const { return("DataSet"); }
// Creates a dataset by way of dereference.
- DataSet(IdComponent& obj, void* ref);
+ DataSet(H5Object& obj, void* ref);
+ DataSet(H5File& file, void* ref);
// Default constructor.
DataSet();
@@ -104,10 +97,16 @@ class H5_DLLCPP DataSet : public AbstractDs {
// Creates a copy of an existing DataSet using its id.
DataSet(const hid_t existing_id);
+ // Gets the dataset id.
+ virtual hid_t getId() const;
+ virtual void setId(const hid_t new_id);
+
// Destructor: properly terminates access to this dataset.
virtual ~DataSet();
private:
+ hid_t id; // HDF5 dataset id
+
// This function contains the common code that is used by
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific