diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-05-26 07:02:51 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-05-26 07:02:51 (GMT) |
commit | 80816a3dde8614c52d80f0090f8a5d08fc4546e7 (patch) | |
tree | 1b32a2bdc1d0831783a4f513b46f1885b968b6b8 /c++/src/H5Object.cpp | |
parent | 2e588eef3fe7e7108168d095d385502fd8e41b9d (diff) | |
download | hdf5-80816a3dde8614c52d80f0090f8a5d08fc4546e7.zip hdf5-80816a3dde8614c52d80f0090f8a5d08fc4546e7.tar.gz hdf5-80816a3dde8614c52d80f0090f8a5d08fc4546e7.tar.bz2 |
[svn-r8576] Purpose:
Add more C++ wrapper and documentation - incrementally check-in
Description:
Added doxygen documentation to:
H5DataSet.cpp
H5DataSpace.cpp
H5CommonFG.cpp
and a wrapper for H5Rcreate to H5Object.* with tests will be added
later.
There are more documentation need to be added to these files but
to preserve the changes, I check them in now.
Platforms:
SunOS 5.7 (arabica)
Linux 2.4 (eirene)
Misc. update:
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 8a0f3b1..3fd6561 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -262,7 +262,7 @@ void H5Object::removeAttr( const string& name ) const } //-------------------------------------------------------------------------- -// Function: H5Object::getNumAttrs +// Function: H5Object::flush ///\brief Flushes all buffers associated with a file to disk. ///\param scope - IN: Specifies the scope of the flushing action, /// which can be either of these values: @@ -283,6 +283,26 @@ void H5Object::flush(H5F_scope_t scope ) const } //-------------------------------------------------------------------------- +// Function: H5Object::Reference +///\brief Creates a reference. +///\param name - IN: Name of the object to be referenced +///\return A reference +///\exception H5::ReferenceIException +// Programmer Binh-Minh Ribler - May, 2004 +//-------------------------------------------------------------------------- +void* H5Object::Reference(const char* name, H5R_type_t ref_type, DataSpace& dataspace) const +{ + void *ref; + herr_t ret_value = H5Rcreate(ref, id, name, ref_type, dataspace.getId()); + if (ret_value < 0) + { + throw AttributeIException("H5Object::getNumAttrs", + "H5Aget_num_attrs failed - returned negative number of attributes"); + } + return(ref); +} + +//-------------------------------------------------------------------------- // Function: H5Object destructor ///\brief Subclasses destructors will properly terminate access to /// this H5 object. |