diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2008-07-02 14:44:57 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2008-07-02 14:44:57 (GMT) |
commit | d9533d055c7f306e66e5f972068c77c939d6fc16 (patch) | |
tree | af5d0f7fc67f008e2f718c6913ab3f7baf777abe /c++/src/H5Attribute.h | |
parent | 0e1432a18f999074e48e455aad6ee61c93f27ed1 (diff) | |
download | hdf5-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/H5Attribute.h')
-rw-r--r-- | c++/src/H5Attribute.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 513b6ab..49faeea 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -21,11 +21,14 @@ namespace H5 { #endif -class H5_DLLCPP Attribute : public AbstractDs { +class H5_DLLCPP Attribute : public AbstractDs, public IdComponent { public: // Closes this attribute. virtual void close(); + // Gets the name of the file, in which this attribute belongs. + H5std_string getFileName() const; + // Gets the name of this attribute. ssize_t getName( size_t buf_size, H5std_string& attr_name ) const; H5std_string getName( size_t buf_size ) const; // returns name, not its length @@ -45,11 +48,15 @@ class H5_DLLCPP Attribute : public AbstractDs { void write(const DataType& mem_type, const void *buf ) const; void write(const DataType& mem_type, const H5std_string& strg ) const; + // Creates an attribute by way of dereference. + Attribute(H5Object& obj, void* ref); + Attribute(H5File& file, void* ref); + // Returns this class name virtual H5std_string fromClass () const { return("Attribute"); } - // Creates a copy of an existing attribute using the attribute id - Attribute( const hid_t attr_id ); + // Creates a copy of an existing attribute using the attribute id + Attribute( const hid_t attr_id ); // Copy constructor: makes a copy of an existing Attribute object. Attribute( const Attribute& original ); @@ -57,10 +64,16 @@ class H5_DLLCPP Attribute : public AbstractDs { // Default constructor Attribute(); + // Gets/Sets the attribute id. + virtual hid_t getId() const; + virtual void setId(const hid_t new_id); + // Destructor: properly terminates access to this attribute. virtual ~Attribute(); private: + hid_t id; // HDF5 attribute 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 |