diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-08 03:45:06 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-05-08 03:45:06 (GMT) |
commit | 45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b (patch) | |
tree | 0471d19732edd71e62d0d64b3e027b4559ebf079 /c++/src/H5File.cpp | |
parent | 1a60beea6999013c8763f939655087e2da266225 (diff) | |
download | hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.zip hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.tar.gz hdf5-45c7e2607d48fb5d6f3f920d83f90bfbcbfaad6b.tar.bz2 |
Code improvement
Description:
- Moved class H5File to inherit from class Group because an HDF5 file is
a root group
- Cleanup header file inclusion and class forward declaration
- Revised comments
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r-- | c++/src/H5File.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index c18431c..768ac5e 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -24,19 +24,15 @@ #include "H5Exception.h" #include "H5IdComponent.h" #include "H5PropList.h" -#include "H5Object.h" #include "H5FaccProp.h" #include "H5FcreatProp.h" #include "H5OcreatProp.h" -#include "H5DxferProp.h" #include "H5DcreatProp.h" +#include "H5Location.h" +#include "H5Object.h" #include "H5CommonFG.h" #include "H5Group.h" -#include "H5AbstractDs.h" -#include "H5DataSpace.h" -#include "H5DataSet.h" #include "H5File.h" -#include "H5Alltypes.h" namespace H5 { #ifndef H5_NO_STD @@ -49,7 +45,7 @@ namespace H5 { ///\brief Default constructor: creates a stub H5File object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {} +H5File::H5File() : Group(), id(H5I_INVALID_HID) {} //-------------------------------------------------------------------------- // Function: H5File overloaded constructor @@ -82,7 +78,7 @@ H5File::H5File() : H5Location(), CommonFG(), id(H5I_INVALID_HID) {} // to catch then re-throw it. -BMR 2013/03/21 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : H5Location(), CommonFG(), id(H5I_INVALID_HID) +H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID) { try { p_get_file(name, flags, create_plist, access_plist); @@ -107,7 +103,7 @@ H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& cr // to catch then re-throw it. -BMR 2013/03/21 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : H5Location(), CommonFG(), id(H5I_INVALID_HID) +H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID) { try { p_get_file(name.c_str(), flags, create_plist, access_plist); @@ -164,7 +160,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro // constructor is needed by the library in order to return // an object, H5File doesn't need it. -BMR (HDFFV-8766 partially) //-------------------------------------------------------------------------- -H5File::H5File(hid_t existing_id) : H5Location(), CommonFG() +H5File::H5File(hid_t existing_id) : Group() { id = existing_id; incRefCount(); // increment number of references to this id @@ -179,7 +175,7 @@ H5File::H5File(hid_t existing_id) : H5Location(), CommonFG() ///\param original - IN: H5File instance to copy // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5File::H5File(const H5File& original) : H5Location(), CommonFG() +H5File::H5File(const H5File& original) : Group() { id = original.getId(); incRefCount(); // increment number of references to this id |