summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2012-09-28 22:18:33 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2012-09-28 22:18:33 (GMT)
commit9c3f82fbd762af5711ce11e394fed4360156c5af (patch)
tree305e340b8fda154db0a5905816ec7a3141dce8e1 /c++/src/H5File.cpp
parent51bb0fe2d2d03b5744d0358f379ec3139090503c (diff)
downloadhdf5-9c3f82fbd762af5711ce11e394fed4360156c5af.zip
hdf5-9c3f82fbd762af5711ce11e394fed4360156c5af.tar.gz
hdf5-9c3f82fbd762af5711ce11e394fed4360156c5af.tar.bz2
[svn-r22845] Purpose: Misc fixes
Description: Fixed miscellaneous inconsistencies and typos, which also took care of the failure in Packet Table test on daily test today. Platforms tested: Linux/32 2.6 (jam) Linux/64 2.6 (koala) Mac Lion (duck)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp82
1 files changed, 9 insertions, 73 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index d023001..92c4d32 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -50,7 +50,7 @@ namespace H5 {
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5File::H5File() : H5Location(0) {}
+H5File::H5File() : H5Location(), id(0) {}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
@@ -148,7 +148,7 @@ H5File::H5File(const H5File& original) : H5Location(original)
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
-///\brief Determines whether a file in HDF5 format.
+///\brief Determines whether a file in HDF5 format. (Static)
///\param name - IN: Name of the file
///\return true if the file is in HDF5 format, and false, otherwise
///\exception H5::FileIException
@@ -172,7 +172,7 @@ bool H5File::isHdf5(const char* name)
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
///\brief This is an overloaded member function, provided for convenience.
-/// It takes an \c H5std_string for \a name.
+/// It takes an \c H5std_string for \a name. (Static)
///\param name - IN: Name of the file - \c H5std_string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -250,8 +250,8 @@ void H5File::reOpen()
throw FileIException("H5File::reOpen", close_error.getDetailMsg());
}
- // call C routine to reopen the file - Note: not sure about this
- // does id need to be closed later? which id to be the parameter?
+ // call C routine to reopen the file - Note: not sure about this,
+ // which id to be the parameter when closing?
id = H5Freopen( id );
if( id < 0 ) // Raise exception when H5Freopen returns a neg value
throw FileIException("H5File::reOpen", "H5Freopen failed");
@@ -259,12 +259,10 @@ void H5File::reOpen()
//--------------------------------------------------------------------------
// Function: H5File::reopen
-///\brief Reopens this file.
-///
-///\exception H5::FileIException
-///\par Description
-/// This function will be replaced by the above function \c reOpen
-/// in future releases.
+// Purpose: Reopens this file.
+// Exception H5::FileIException
+// Description
+// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::reopen()
@@ -470,27 +468,6 @@ void H5File::getVFDHandle(void **file_handle) const
}
}
-
-//--------------------------------------------------------------------------
-// Function: H5File::getRegion
-///\brief Retrieves a dataspace with the region pointed to selected.
-///\param ref - IN: Reference to get region of
-///\param ref_type - IN: Type of reference to get region of - default
-///\return DataSpace instance
-///\exception H5::FileIException
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-DataSpace H5File::getRegion(void *ref, H5R_type_t ref_type) const
-{
- try {
- DataSpace dataspace(p_get_region(ref, ref_type));
- return(dataspace);
- }
- catch (IdComponentException E) {
- throw FileIException("H5File::getRegion", E.getDetailMsg());
- }
-}
-
//--------------------------------------------------------------------------
// Function: H5File::getFileSize
///\brief Returns the file size of the HDF5 file.
@@ -513,47 +490,6 @@ hsize_t H5File::getFileSize() const
}
//--------------------------------------------------------------------------
-// Function: H5File::p_reference (protected)
-// Purpose Creates a reference to an HDF5 object or a dataset region.
-// Parameters
-// name - IN: Name of the object to be referenced
-// dataspace - IN: Dataspace with selection
-// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
-// Exception H5::IdComponentException
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-void H5File::p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const
-{
- herr_t ret_value = H5Rcreate(ref, getId(), name, ref_type, space_id);
- if (ret_value < 0)
- {
- throw IdComponentException("", "H5Rcreate failed");
- }
-}
-
-
-//--------------------------------------------------------------------------
-// Function: H5File::p_get_region (protected)
-// Purpose Retrieves a dataspace with the region pointed to selected.
-// Parameters
-// ref_type - IN: Type of reference to get region of - default
-// to H5R_DATASET_REGION
-// ref - IN: Reference to get region of
-// Return Dataspace id
-// Exception H5::IdComponentException
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-hid_t H5File::p_get_region(void *ref, H5R_type_t ref_type) const
-{
- hid_t space_id = H5Rget_region(getId(), ref_type, ref);
- if (space_id < 0)
- {
- throw IdComponentException("", "H5Rget_region failed");
- }
- return(space_id);
-}
-
-//--------------------------------------------------------------------------
// Function: H5File::getLocId
// Purpose: Get the id of this file
// Description