summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2012-04-02 03:14:19 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2012-04-02 03:14:19 (GMT)
commit88ce565d7d324569f2a360aa37bfeefffa021a8a (patch)
tree94e9dc7c38bb49e7c70c42f6c3fcca73eacfd545 /c++/src/H5Object.cpp
parent42306f8ed4ade51a8629b9c5a159d1afac5f617f (diff)
downloadhdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.zip
hdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.tar.gz
hdf5-88ce565d7d324569f2a360aa37bfeefffa021a8a.tar.bz2
[svn-r22235] Purpose: Fixed bugs HDFFV-2761 & HDFFV-7852
Description: - Replaced PredType::NotAtexit() with PredType::AtExit(H5CPP_EXITED); and used PredType::AtExit as a flag to detect when all predefined types have been destroyed. Then, H5close will be called to terminate the library after its being re-initiated when the PredType destructors were activated. This change removed the memory leaks shown by the user's sample program. - Added H5CPP_EXITED for PredType::AtExit to use as a flag - Updated some inaccurate comments - Removed stream functions from FileAccPropList - Replaced H5_VMS with appropriate macro in H5IdComponent.cpp - Corrected many URLs (hdfgroup vs. ncsa) in comments - Replaced std::string with H5std_string in comments Platforms tested: Linux/32 2.6 (jam) Linux/64 2.6 (amani) SunOS 5.10 (linew)
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r--c++/src/H5Object.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index e25c255..3c85502 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -124,7 +124,7 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type
// Function: H5Object::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
-/// a reference to an \c std::string for \a name.
+/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
@@ -158,7 +158,7 @@ Attribute H5Object::openAttribute( const char* name ) const
// Function: H5Object::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
-/// a reference to an \c std::string for \a name.
+/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const H5std_string& name ) const
@@ -194,15 +194,17 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
-///\param idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
+///\param _idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
+/// The signature of user_op is
+/// void (*)(H5::H5Object&, H5std_string, void*).
/// For information, please refer to the C layer Reference Manual
/// at:
-/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5A.html#Annot-Iterate
+/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_data )
@@ -267,7 +269,7 @@ void H5Object::removeAttr( const char* name ) const
// Function: H5Object::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
-/// a reference to an \c std::string for \a name.
+/// a reference to an \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const H5std_string& name ) const
@@ -294,7 +296,7 @@ void H5Object::renameAttr(const char* oldname, const char* newname) const
// Function: H5Object::renameAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
-/// a reference to an \c std::string for the names.
+/// a reference to an \c H5std_string for the names.
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newname) const
@@ -366,9 +368,9 @@ void H5Object::p_reference(void* ref, const char* name, hid_t space_id, H5R_type
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference to query, valid values are:
-/// \li \c H5R_OBJECT \tReference is an object reference.
-/// \li \c H5R_DATASET_REGION \tReference is a dataset region
-/// reference. - this is the default
+/// \li \c H5R_OBJECT - Reference is an object reference.
+/// \li \c H5R_DATASET_REGION - Reference is a dataset region
+/// reference. - this is the default
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
@@ -410,9 +412,9 @@ void H5Object::reference(void* ref, const char* name) const
// Function: H5Object::reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it takes an
-/// \c std::string for the object's name.
+/// \c H5std_string for the object's name.
///\param ref - IN: Reference pointer
-///\param name - IN: Name of the object to be referenced - \c std::string
+///\param name - IN: Name of the object to be referenced - \c H5std_string
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Object::reference(void* ref, const H5std_string& name) const