[svn-r6990] Purpose:

Bug fix and minor code enhancement

Description:
    Missing methods to read/write C++ String for an attribute and
    a dataset.

Solution:
    Added overloaded functions read and write to H5::Attribute and
    H5::DataSet.

    Also, added another constructor StrType so the need to separately
    set the length of the string type can be eliminated.  It's minor
    but convenient.

    Made some minor changes to make error messages more readable.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    IRIX 6.5.11 (modi4)
    HPUX 11.00 (kelgia)
This commit is contained in:
Binh-Minh Ribler
2003-06-06 23:02:11 -05:00
parent 4e4ab0d320
commit 5d1b56cb81
12 changed files with 83 additions and 25 deletions

View File

@@ -57,7 +57,11 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
/* Constructor that takes an existing dataspace id
Description:
Uses an HDF5 id to create a DataSpace identifier instance. This id can be either an existing dataspace id or a default dataspace id. Design note: in the case of default dataspace, the identifier still has reference counter; the p_close function will take care of not to call H5Sclose on the default id.
Uses an HDF5 id to create a DataSpace identifier instance.
This id can be either an existing dataspace id or a default
dataspace id. Design note: in the case of default dataspace,
the identifier still has reference counter; the p_close function
will take care of not to call H5Sclose on the default id.
*/
DataSpace::DataSpace( const hid_t space_id ) : IdComponent( space_id ) {}
@@ -361,7 +365,7 @@ DataSpace::~DataSpace()
try {
resetIdComponent( this ); }
catch (Exception close_error) { // thrown by p_close
cerr << "DataSpace::~DataSpace" << close_error.getDetailMsg() << endl;
cerr << "DataSpace::~DataSpace - " << close_error.getDetailMsg() << endl;
}
}