summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-10-22 08:22:30 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-10-22 08:22:30 (GMT)
commitdaa61b598616713bd39d360aeb9dbbd7ec5803cb (patch)
tree6765b17006dcfab43126e37f205c940c4201fefc /c++/src/H5File.cpp
parent118b1d38fa0d00d0cff94d33e753b11bd732951f (diff)
downloadhdf5-daa61b598616713bd39d360aeb9dbbd7ec5803cb.zip
hdf5-daa61b598616713bd39d360aeb9dbbd7ec5803cb.tar.gz
hdf5-daa61b598616713bd39d360aeb9dbbd7ec5803cb.tar.bz2
[svn-r12795] Purpose: Fixing bug
Description: Wrappers of H5Rcreate had incorrect prototypes. Solution: Added these overloaded functions for H5Rcreate wrapper to IdComponent: void reference(void* ref, const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; void reference(void* ref, const char* name) const; void reference(void* ref, const H5std_string& name) const; Added these overloaded functions for H5Rdereference: void dereference(IdComponent& obj, void* ref); DataSet(IdComponent& obj, void* ref); Group(IdComponent& obj, void* ref); DataType(IdComponent& obj, void* ref); The incorrect wrappers will be removed after announcing. Platform tested: Linux 2.4 (heping) AIX 5.1 (copper) SunOS 5.8 64-bit (sol)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp50
1 files changed, 20 insertions, 30 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 7132105..ca2aea8 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -250,8 +250,10 @@ void H5File::openFile(const H5std_string& name, unsigned int flags, const FileAc
// Note: This wrapper doesn't seem right regarding the 'id' and should
// be investigated. BMR - 2/20/2005
// Modification
-// Replaced resetIdComponent with decRefCount to use C library
-// ID reference counting mechanism - BMR, Jun 1, 2004
+// - Replaced resetIdComponent() with decRefCount() to use C
+// library ID reference counting mechanism - BMR, Feb 20, 2005
+// - Replaced decRefCount with close() to let the C library
+// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
void H5File::reOpen()
{
@@ -501,14 +503,9 @@ H5std_string H5File::getFileName() const
//--------------------------------------------------------------------------
// Function: H5File::Reference
-///\brief Creates a reference to an Hdf5 object or a dataset region.
-///\param name - IN: Name of the object to be referenced
-///\param dataspace - IN: Dataspace with selection
-///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
-///\return A reference
-///\exception H5::FileIException
-///\par Description
-/// Note that name must be an absolute path to the object in the file.
+///\brief Important!!! - This functions does not work correctly, it
+/// will be removed in the near future. Please use
+/// H5File::reference instead!
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* H5File::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
@@ -523,19 +520,9 @@ void* H5File::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_t
//--------------------------------------------------------------------------
// Function: H5File::Reference
-///\brief This is an overloaded function, provided for your convenience.
-/// It differs from the above function in that it only creates
-/// a reference to an HDF5 object, not to a dataset region.
-///\param name - IN: Name of the object to be referenced
-///\return A reference
-///\exception H5::FileIException
-///\par Description
-// This function passes H5R_OBJECT and -1 to the protected
-// function for it to pass to the C API H5Rcreate
-// to create a reference to the named object.
-///\par
-/// Note that, for H5File, name must be an absolute path to the
-/// object in the file.
+///\brief Important!!! - This functions does not work correctly, it
+/// will be removed in the near future. Please use similar
+/// H5File::reference instead!
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* H5File::Reference(const char* name) const
@@ -550,10 +537,9 @@ void* H5File::Reference(const char* name) const
//--------------------------------------------------------------------------
// Function: H5File::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.
-///\param name - IN: Name of the object to be referenced - \c std::string
+///\brief Important!!! - This functions does not work correctly, it
+/// will be removed in the near future. Please use similar
+/// H5File::reference instead!
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* H5File::Reference(const H5std_string& name) const
@@ -565,7 +551,9 @@ void* H5File::Reference(const H5std_string& name) const
// Function: H5File::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
-///\param ref_type - IN: Type of reference to query
+///\param ref_type - IN: Type of reference, valid values are:
+/// \li \c H5R_OBJECT \tReference is an object reference.
+/// \li \c H5R_DATASET_REGION \tReference is a dataset region reference.
///\return Object type, which can be one of the following:
/// \li \c H5G_LINK - Object is a symbolic link.
/// \li \c H5G_GROUP - Object is a group.
@@ -685,8 +673,10 @@ void H5File::throwException(const H5std_string& func_name, const H5std_string& m
///\brief Properly terminates access to this file.
// Programmer Binh-Minh Ribler - 2000
// Modification
-// Replaced resetIdComponent with decRefCount to use C library
-// ID reference counting mechanism - BMR, Jun 1, 2004
+// - Replaced resetIdComponent() with decRefCount() to use C
+// library ID reference counting mechanism - BMR, Feb 20, 2005
+// - Replaced decRefCount with close() to let the C library
+// handle the reference counting - BMR, Jun 1, 2006
//--------------------------------------------------------------------------
H5File::~H5File()
{