diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-08-20 04:29:58 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2004-08-20 04:29:58 (GMT) |
commit | 4a04b0c05c608de05c69c33a6dced509d04cde09 (patch) | |
tree | 55484a35e37d81d1128a05c8c004d17a7ac2826a /c++/src/H5Object.cpp | |
parent | 226df4069427644a4a53087e8303a5685a07533c (diff) | |
download | hdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.zip hdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.tar.gz hdf5-4a04b0c05c608de05c69c33a6dced509d04cde09.tar.bz2 |
[svn-r9127] Purpose: Adding wrapper for new C API and other updates
Description:
Added wrappers for H5Fget_name:
H5File::getFileName
H5Object::getFileName
Moved some functions from Group into the base class CommonFG for
H5File too.
Platforms tested:
SunOS 5.7 (arabica)
Linux 2.4 (eirene)
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 127c315..9c8f5f4 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -30,6 +30,7 @@ namespace H5 { #endif +#ifndef DOXYGEN_SHOULD_SKIP_THIS // userAttrOpWrpr simply interfaces between the user's function and the // C library function H5Aiterate; used to resolve the different prototype // problem. May be moved to Iterator later. @@ -48,21 +49,23 @@ extern "C" herr_t userAttrOpWrpr( hid_t loc_id, const char* attr_name, void* op_ //-------------------------------------------------------------------------- // Function: H5Object default constructor (protected) // Description -// The id is set to 0 here but subclass constructor will set -// it to a valid HDF5 id. +// The id is set by IdComponent() but subclass constructor will +// set it to a valid HDF5 id. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5Object::H5Object() : IdComponent() {} //-------------------------------------------------------------------------- // Function: H5Object overloaded constructor (protected) -// Purpose Creates an H5Object object using the id of an existing H5 +// Purpose Creates an H5Object object using the id of an existing HDF5 // object. -// Parameters object_id - IN: Id of an existing H5 object +// Parameters object_id - IN: Id of an existing HDF5 object // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {} +#endif // DOXYGEN_SHOULD_SKIP_THIS + //-------------------------------------------------------------------------- // Function: H5Object copy constructor ///\brief Copy constructor: makes a copy of the original H5Object @@ -220,7 +223,7 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned * idx, void *op_da //-------------------------------------------------------------------------- // Function: H5Object::getNumAttrs -///\brief Returns the number of attributes attached to this H5 object. +///\brief Returns the number of attributes attached to this HDF5 object. ///\return Number of attributes ///\exception H5::AttributeIException // Programmer Binh-Minh Ribler - 2000 @@ -287,6 +290,18 @@ void H5Object::flush(H5F_scope_t scope ) const } //-------------------------------------------------------------------------- +// Function: H5Object::getFileName +///\brief Gets the name of the file, in which this HDF5 object belongs. +///\return File name +///\exception H5::IdComponentException +// Programmer Binh-Minh Ribler - Jul, 2004 +//-------------------------------------------------------------------------- +string H5Object::getFileName() const +{ + return(p_get_file_name()); +} + +//-------------------------------------------------------------------------- // Function: H5Object destructor ///\brief Noop destructor. // Programmer Binh-Minh Ribler - 2000 |