summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Group.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-12-27 03:53:47 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-12-27 03:53:47 (GMT)
commitb00962ac8694b14b74382f77d1cf849b93383fb5 (patch)
tree6833353ed1959b51e94a0228498bf3ce519670f9 /c++/src/H5Group.cpp
parent96c28287935c50693e19d473537b4f58692a30f8 (diff)
parente05da1b533d5eb9527a5b67ba2683379f8e1e7ac (diff)
downloadhdf5-b00962ac8694b14b74382f77d1cf849b93383fb5.zip
hdf5-b00962ac8694b14b74382f77d1cf849b93383fb5.tar.gz
hdf5-b00962ac8694b14b74382f77d1cf849b93383fb5.tar.bz2
Merge pull request #209 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cpp:develop to develop
- Replacing openXxxType with individual type constructors - Put back CommonFG - Removed overloaded constructors that take an Attribute where there is one that takes an H5Location * commit 'e05da1b533d5eb9527a5b67ba2683379f8e1e7ac': Description: Removed commented out code and fixed miscellaneous typos. Platforms tested: Linux/32 2.6 (jam) (very minor) Purpose: Improvement for HDFFV-10004 Description: When adding wrappers for H5Lexists, a new class, LinkAccPropList, was added to the C++ API, triggered complicated circular dependencies. Thus, some improvement was made to resolve the problems. - Replaced existing functions openXxxType with individual type constructors + Added individual XxxType constructors to replace the existing functions openXxxType because it's rather awkward to use these functions. + Moved openXxxType from H5Location back to CommonFG + Put back CommonFG as a baseclass of Group for openXxxType functions. + This replacement should improve usability and prevent the problem of circular dependencies. - Removed overloaded constructor that takes an Attribute when there is already one that takes H5Location because Attribute inherits from H5Location now. Platforms tested: Linux/32 2.6 (jam) Darwin (osx1010test) Linux/64 (platypus)
Diffstat (limited to 'c++/src/H5Group.cpp')
-rw-r--r--c++/src/H5Group.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 20f14a3..4325a68 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -34,11 +34,11 @@
#include "H5AbstractDs.h"
#include "H5DataSpace.h"
#include "H5DataSet.h"
+#include "H5CommonFG.h"
#include "H5Attribute.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5Alltypes.h"
-#include "H5private.h" // for HDstrcpy
namespace H5 {
using std::cerr;
@@ -49,7 +49,7 @@ namespace H5 {
///\brief Default constructor: creates a stub Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
+Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) {}
//--------------------------------------------------------------------------
// Function: Group copy constructor
@@ -57,7 +57,7 @@ Group::Group() : H5Object(), id(H5I_INVALID_HID) {}
///\param original - IN: Original group to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const Group& original) : H5Object(), id(original.id)
+Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
{
incRefCount(); // increment number of references to this id
}
@@ -84,7 +84,7 @@ hid_t Group::getLocId() const
///\param existing_id - IN: Id of an existing group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const hid_t existing_id) : H5Object(), id(existing_id)
+Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id)
{
incRefCount(); // increment number of references to this id
}
@@ -102,7 +102,7 @@ Group::Group(const hid_t existing_id) : H5Object(), id(existing_id)
/// is a datatype that has been named by DataType::commit.
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
-Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
+Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), CommonFG(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
}
@@ -117,10 +117,11 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const
///\exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
-Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
+ /* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
}
+ */
//--------------------------------------------------------------------------
// Function: Group::getId