diff options
Diffstat (limited to 'c++/src/H5Attribute.cpp')
-rw-r--r-- | c++/src/H5Attribute.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 7547ca5..ec12d6b 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -17,7 +17,6 @@ #else #include <iostream> #endif - #include <string> #include "H5Include.h" @@ -262,6 +261,21 @@ H5std_string Attribute::getName() const } //-------------------------------------------------------------------------- +// Function: Attribute::getStorageSize +///\brief Returns the amount of storage size required for this attribute. +///\return Size of the storage or 0, for no data +///\exception H5::AttributeIException +// Note: H5Dget_storage_size returns 0 when there is no data. This +// function should have no failure. (from SLU) +// Programmer Binh-Minh Ribler - Mar, 2005 +//-------------------------------------------------------------------------- +hsize_t Attribute::getStorageSize() const +{ + hsize_t storage_size = H5Aget_storage_size(id); + return (storage_size); +} + +//-------------------------------------------------------------------------- // Function: Attribute::close ///\brief Closes this attribute. /// @@ -283,27 +297,14 @@ void Attribute::close() } //-------------------------------------------------------------------------- -// Function: Attribute::getStorageSize -///\brief Returns the amount of storage size required for this attribute. -///\return Size of the storage or 0, for no data -///\exception H5::AttributeIException -// Note: H5Dget_storage_size returns 0 when there is no data. This -// function should have no failure. (from SLU) -// Programmer Binh-Minh Ribler - Mar, 2005 -//-------------------------------------------------------------------------- -hsize_t Attribute::getStorageSize() const -{ - hsize_t storage_size = H5Aget_storage_size(id); - return (storage_size); -} - -//-------------------------------------------------------------------------- // Function: Attribute destructor ///\brief Properly terminates access to this attribute. // Programmer Binh-Minh Ribler - 2000 // Modification -// Replaced resetIdComponent with decRefCount to use C library -// ID reference counting mechanism - June 1, 2004 +// - Replaced resetIdComponent() with decRefCount() to use C +// library ID reference counting mechanism - BMR, Jun 1, 2004 +// - Replaced decRefCount with close() to let the C library +// handle the reference counting - BMR, Jun 1, 2006 //-------------------------------------------------------------------------- Attribute::~Attribute() { |