diff options
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 61 |
1 files changed, 15 insertions, 46 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 359fab2..5d102d7 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -5,12 +5,10 @@ * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <string> @@ -25,6 +23,7 @@ #include "H5OcreatProp.h" #include "H5DcreatProp.h" #include "H5DxferProp.h" +#include "H5LcreatProp.h" #include "H5LaccProp.h" #include "H5Location.h" #include "H5Object.h" @@ -46,10 +45,10 @@ namespace H5 { extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) { - H5std_string s_attr_name = H5std_string(attr_name); - UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data); - myData->op(*myData->location, s_attr_name, myData->opData); - return 0; + H5std_string s_attr_name = H5std_string(attr_name); + UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data); + myData->op(*myData->location, s_attr_name, myData->opData); + return 0; } //-------------------------------------------------------------------------- @@ -59,34 +58,6 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name, H5Object::H5Object() : H5Location() {} //-------------------------------------------------------------------------- -// Function: H5Object overloaded constructor (protected) -// Purpose Creates an H5Object object using the id of an existing HDF5 -// object. -// Parameters object_id - IN: Id of an existing HDF5 object -// 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. -// Removed in 1.10.1 - Aug 2016 -//-------------------------------------------------------------------------- -//H5Object::H5Object(const hid_t object_id) : H5Location() {} - -//-------------------------------------------------------------------------- -// Function: H5Object copy constructor -///\brief Copy constructor: makes a copy of the original H5Object -/// instance. -///\param original - IN: H5Object 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. -//-------------------------------------------------------------------------- -// H5Object::H5Object(const H5Object& original) : H5Location() {} - -//-------------------------------------------------------------------------- // Function: f_Attribute_setId - friend // Purpose: This function is friend to class H5::Attribute so that it // can set Attribute::id in order to work around a problem @@ -150,7 +121,7 @@ Attribute H5Object::createAttribute(const char* name, const DataType& data_type, //-------------------------------------------------------------------------- Attribute H5Object::createAttribute(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist) const { - return(createAttribute( name.c_str(), data_type, data_space, create_plist)); + return(createAttribute(name.c_str(), data_type, data_space, create_plist)); } //-------------------------------------------------------------------------- @@ -185,7 +156,7 @@ Attribute H5Object::openAttribute(const char* name) const //-------------------------------------------------------------------------- Attribute H5Object::openAttribute(const H5std_string& name) const { - return(openAttribute( name.c_str())); + return(openAttribute(name.c_str())); } //-------------------------------------------------------------------------- @@ -225,9 +196,8 @@ Attribute H5Object::openAttribute(const unsigned int idx) const ///\par Description /// The signature of user_op is /// void (*)(H5::H5Location&, H5std_string, void*). -/// For information, please refer to the C layer Reference Manual -/// at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Iterate +/// For information, please refer to the H5Aiterate2 API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data) @@ -241,7 +211,7 @@ int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_dat // call the C library routine H5Aiterate2 to iterate the attributes hsize_t idx = _idx ? static_cast<hsize_t>(*_idx) : 0; int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx, - userAttrOpWrpr, reinterpret_cast<void *>(userData)); + userAttrOpWrpr, static_cast<void *>(userData)); // release memory delete userData; @@ -392,7 +362,6 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna renameAttr (oldname.c_str(), newname.c_str()); } -#ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: getObjName ///\brief Given an id, returns the type of the object. @@ -423,7 +392,6 @@ ssize_t H5Object::getObjName(char *obj_name, size_t buf_size) const ///\return Name of the object ///\exception H5::Exception // Programmer Binh-Minh Ribler - Mar, 2014 -// Modification //-------------------------------------------------------------------------- H5std_string H5Object::getObjName() const { @@ -504,6 +472,7 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const return(name_size); } +#ifndef DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- // Function: H5Object destructor ///\brief Noop destructor. |