diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2015-04-04 06:41:18 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2015-04-04 06:41:18 (GMT) |
commit | 943993af8357c963d4da4141e7e68f5eaa59e21a (patch) | |
tree | 7d708506eef3d46550003c0e948affc004149e89 /c++/src/H5IdComponent.cpp | |
parent | aa13c0501d781ccbe83b19bc795e0c0241559789 (diff) | |
download | hdf5-943993af8357c963d4da4141e7e68f5eaa59e21a.zip hdf5-943993af8357c963d4da4141e7e68f5eaa59e21a.tar.gz hdf5-943993af8357c963d4da4141e7e68f5eaa59e21a.tar.bz2 |
[svn-r26726] Purpose: Fix warnings HDFFV-8658
Description: (r26457)
The following two constructors of classes: AbstractDs, IdComponent,
H5Location, and H5Object are no longer appropriate after the data member
"id" had been moved from IdComponent to the sub-classes.
The copy constructors are noop and will be generated by the compilers if
needed so they can be removed in 1.8.15 without effecting applications. The
other constructors will be removed from 1.10 release, and then from 1.8 if
their removal does not raise any problems in at least two 1.10 releases.
<Classname>(const hid_t h5_id);
<Classname>(const <Classname>& original);
Deprecation warnings are added to each of these classes.
The other classes are changed to call the default constructor instead of
one of the constructors above.
Platforms tested:
Linux/64 (platypus)
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
Diffstat (limited to 'c++/src/H5IdComponent.cpp')
-rw-r--r-- | c++/src/H5IdComponent.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 4a9dcac..54813ea 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -37,16 +37,28 @@ namespace H5 { ///\param h5_id - IN: Id of an existing object ///\exception H5::DataTypeIException // 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. //-------------------------------------------------------------------------- IdComponent::IdComponent(const hid_t h5_id) {} //-------------------------------------------------------------------------- // Function: IdComponent copy constructor -///\brief Copy constructor: makes a copy of the original IdComponent object. -///\param original - IN: IdComponent instance to copy +// 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 ) {} +// IdComponent::IdComponent(const IdComponent& original) {} //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount @@ -82,12 +94,14 @@ void IdComponent::decRefCount(const hid_t obj_id) const { if (p_valid_id(obj_id)) if (H5Idec_ref(obj_id) < 0) + { if (H5Iget_ref(obj_id) <= 0) throw IdComponentException(inMemFunc("decRefCount"), "object ref count is 0 or negative"); else throw IdComponentException(inMemFunc("decRefCount"), "decrementing object ref count failed"); + } } //-------------------------------------------------------------------------- |