diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-05-27 07:54:58 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-05-27 07:54:58 (GMT) |
commit | 315ca49e4a04ce8874cac02d1cc4a6b7a45bd57c (patch) | |
tree | 2bba19f41db044afddcc261bc7bf800eb8790725 /c++/src/H5IdComponent.h | |
parent | 23de8877a3025bb2f8751b312dfe5751b8b91074 (diff) | |
download | hdf5-315ca49e4a04ce8874cac02d1cc4a6b7a45bd57c.zip hdf5-315ca49e4a04ce8874cac02d1cc4a6b7a45bd57c.tar.gz hdf5-315ca49e4a04ce8874cac02d1cc4a6b7a45bd57c.tar.bz2 |
[svn-r8588] Purpose:
Add C++ wrappers - incrementally check-in
Description
Added wrapper for these C APIs:
H5Rcreate
H5Rget_obj_type
H5Rget_region
This is an incremental check-in to preserve the code, corresponding
tests will follow in a few weeks.
Platforms:
Linux 2.4 (eirene)
I'm checking the code out and test on arabica too.
Misc. update:
Diffstat (limited to 'c++/src/H5IdComponent.h')
-rw-r--r-- | c++/src/H5IdComponent.h | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 85dc83f..81e95ac 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -58,9 +58,6 @@ class H5_DLLCPP IdComponent { // Assignment operator IdComponent& operator=( const IdComponent& rhs ); - // Resets this IdComponent instance - //template <class Type> - //void reset( Type* parent ); void reset(); void resetId(); @@ -75,35 +72,17 @@ class H5_DLLCPP IdComponent { // Default constructor IdComponent(); + // Creates a reference to an HDF5 object or a dataset region. + void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const; + + // Retrieves the type of object that an object reference points to. + H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const; + + // Retrieves a dataspace with the region pointed to selected. + hid_t p_get_region(void *ref, H5R_type_t ref_type) const; + }; // end class IdComponent -// BMR - including template member function implementation here to -// prevent compilation errors. When the compilers support template -// member functions in *.C files, move them to IdComponent.C. - -// This function makes sure that this IdComponent instance actually -// represents an HDF5 component and that this HDF5 component is no longer -// referenced, then calls the parent function p_close to close the -// appropriate HDF5 component. In addition, this identifier instance -// will delete itself. -// Type is the class of the instance to whom this IdComponent object -// belongs. -/* 11/10/00 - BMR: commented this member function because many compilers - still have no support for member template function. The function is - replaced by resetIdComponent in H5Idtemplates.h -template <class Type> -void IdComponent::reset( Type* parent ) -{ - if( ref_count->noReference()) // ref_count is decremented here - { - if( id > 0 ) - parent->p_close(); // which p_close depends on whom this - // IdComponent object belongs to - delete ref_count; // delete the reference counter - delete this; // this IdComponent object deletes itself - } -} -*/ #ifndef H5_NO_NAMESPACE } #endif |