summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.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/H5Object.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/H5Object.cpp')
-rw-r--r--c++/src/H5Object.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index ab79d9d..d656ccf 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -15,6 +15,7 @@
#include <string>
+#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -29,11 +30,11 @@
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
+#include "H5CommonFG.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
-#include "H5private.h" // for HDmemset
namespace H5 {
@@ -86,6 +87,21 @@ H5Object::H5Object() : H5Location() {}
// H5Object::H5Object(const H5Object& original) : H5Location() {}
//--------------------------------------------------------------------------
+// Function: f_Attribute_setId - friend
+// Purpose: This function is friend to class H5::Attribute so that it
+// can set Attribute::id in order to work around a problem
+// described in the JIRA issue HDFFV-7947.
+// Applications shouldn't need to use it.
+// param attr - IN/OUT: Attribute object to be changed
+// param new_id - IN: New id to set
+// Programmer Binh-Minh Ribler - 2015
+//--------------------------------------------------------------------------
+void f_Attribute_setId(Attribute* attr, hid_t new_id)
+{
+ attr->p_setId(new_id);
+}
+
+//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute