summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r--c++/src/H5Object.cpp47
1 files changed, 15 insertions, 32 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 4697d9c..a3b53d4 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -25,6 +25,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5DataSpace.h"
+#include "H5StrcreatProp.h"
+#include "H5LcreatProp.h"
#include "H5AbstractDs.h"
#include "H5LaccProp.h"
#include "H5Location.h"
@@ -34,11 +36,6 @@
namespace H5 {
-#ifndef H5_NO_STD
- using std::cerr;
- using std::endl;
-#endif // H5_NO_STD
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate2; used to resolve the different prototype
@@ -64,32 +61,19 @@ namespace H5 {
H5Object::H5Object() : H5Location() {}
//--------------------------------------------------------------------------
-// Function: H5Object overloaded constructor (protected)
-// Purpose Creates an H5Object object using the id of an existing HDF5
-// object.
-// Parameters object_id - IN: Id of an existing HDF5 object
-// Programmer Binh-Minh Ribler - 2000
-// *** Deprecation warning ***
-// This constructor is no longer appropriate because the data member "id" had
-// been moved to the sub-classes. It will be removed in 1.10 release. If its
-// removal does not raise any problems in 1.10, it will be removed from 1.8 in
-// subsequent releases.
-// Removed in 1.8.18 and 1.10.1 - Aug 2016
+// 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
//--------------------------------------------------------------------------
-//H5Object::H5Object(const hid_t object_id) : H5Location() {}
-
-//--------------------------------------------------------------------------
-// Function: H5Object copy constructor
-///\brief Copy constructor: makes a copy of the original H5Object
-/// instance.
-///\param original - IN: H5Object instance to copy
-// Programmer Binh-Minh Ribler - 2000
-// *** Deprecation warning ***
-// This constructor is no longer appropriate because the data member "id" had
-// been moved to the sub-classes. It is removed from 1.8.15 because it is
-// a noop and it can be generated by the compiler if needed.
-//--------------------------------------------------------------------------
-// H5Object::H5Object(const H5Object& original) : H5Location() {}
+void f_Attribute_setId(Attribute* attr, hid_t new_id)
+{
+ attr->p_setId(new_id);
+}
/***************************************************************************
Notes for H5A wrappers
@@ -314,8 +298,7 @@ int H5Object::getNumAttrs() const
if(H5Oget_info(getId(), &oinfo) < 0)
throwException("getNumAttrs", "H5Oget_info failed");
- else
- return(static_cast<int>(oinfo.num_attrs));
+ return(static_cast<int>(oinfo.num_attrs));
}
//--------------------------------------------------------------------------