summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IdComponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5IdComponent.cpp')
-rw-r--r--c++/src/H5IdComponent.cpp36
1 files changed, 13 insertions, 23 deletions
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 93ee4fd..60735f0 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -26,14 +26,19 @@
namespace H5 {
#endif
-// This flag controls whether H5Library::initH5cpp has been called to register
-// terminating functions with atexit()
+// This flag indicates whether H5Library::initH5cpp has been called to register
+// the terminating functions with atexit()
bool IdComponent::H5cppinit = false;
+
+// This flag is used to decide whether H5dont_atexit should be called.
+// Subclasses that have global constants use it. This is a temporary
+// work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed.
bool IdComponent::H5dontAtexit_called = false;
//--------------------------------------------------------------------------
// Function: IdComponent overloaded constructor
-// Purpose Creates an IdComponent object using the id of an existing object.
+///\brief Creates an IdComponent object using the id of an existing
+/// object. - Obsolete, will be removed in 1.8.17
// Param h5_id - IN: Id of an existing object
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
@@ -43,25 +48,10 @@ bool IdComponent::H5dontAtexit_called = false;
// 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 from documentation in 1.8.16 -BMR (October 2015)
//--------------------------------------------------------------------------
IdComponent::IdComponent(const hid_t h5_id) {}
//--------------------------------------------------------------------------
-// Function: IdComponent copy constructor
-// Purpose: This noop copy constructor is removed as a result of the data
-// member "id" being moved down to sub-classes. (Mar 2015)
-// Parameters: original - IN: IdComponent 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.
-//--------------------------------------------------------------------------
-// IdComponent::IdComponent(const IdComponent& original) {}
-
-//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
///\brief Increment reference counter for a given id.
// Programmer Binh-Minh Ribler - May 2005
@@ -227,7 +217,7 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
//--------------------------------------------------------------------------
// Function: IdComponent::setId
///\brief Sets the identifier of this object to a new value.
-///
+///\param new_id - IN: New identifier to be set to
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
@@ -242,8 +232,8 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
// C++ API object, which will be destroyed properly, and so
// p_setId does not call incRefCount. On the other hand, the
// public version setId is used by other applications, in which
-// the id passed to setId already has a reference count, so setId
-// must call incRefCount.
+// the id passed to setId is that of another C++ API object, so
+// setId must call incRefCount.
//--------------------------------------------------------------------------
void IdComponent::setId(const hid_t new_id)
{
@@ -295,10 +285,10 @@ H5std_string IdComponent::inMemFunc(const char* func_name) const
IdComponent::IdComponent()
{
// initH5cpp will register the terminating functions with atexit().
- // We only do this once.
+ // This should only be done once.
if (!H5cppinit)
{
- H5Library::getInstance()->initH5cpp();
+ H5Library::initH5cpp();
H5cppinit = true;
}
}