[svn-r8587] Purpose:

Add C++ wrappers - incrementally check-in

Description
    Added wrapper for these C APIs:
        H5Dget_offset
        H5Dget_space_status

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)

Misc. update:
This commit is contained in:
Binh-Minh Ribler
2004-05-26 18:33:55 -05:00
parent 76336666db
commit 23de8877a3
2 changed files with 41 additions and 0 deletions

View File

@@ -135,6 +135,41 @@ hsize_t DataSet::getStorageSize() const
}
}
//--------------------------------------------------------------------------
// Function: DataSet::getOffset
///\brief Returns the address of this dataset in the file.
///\return Address of dataset
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
haddr_t DataSet::getOffset() const
{
haddr_t ds_addr; // for address of dataset
ds_addr = H5Dget_offset(id);
if( ds_addr == HADDR_UNDEF )
{
throw DataSetIException("DataSet::getOffset", "H5Dget_offset returned HADDR_UNDEF");
}
return(ds_addr);
}
//--------------------------------------------------------------------------
// Function: DataSet::getSpaceStatus
///\brief Determines whether space has been allocated for a dataset.
///\param status - OUT: Space allocation status
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::getSpaceStatus(H5D_space_status_t& status) const
{
herr_t ret_value = H5Dget_space_status(id, &status);
if( ret_value < 0 )
{
throw DataSetIException("DataSet::getSpaceStatus", "H5Dget_space_status failed");
}
}
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief Returns the number of bytes required to store VL data.