diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-10 03:40:26 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-03-10 03:40:26 (GMT) |
commit | 43158f3bb352f374c31556a5d0dc463a09e0b32e (patch) | |
tree | 9f67734a305f6afee83b15fb2614d0854ec87180 /c++ | |
parent | 2a5d608f7bf5f99fb61898a331fde2ccc170117e (diff) | |
parent | 801191b4c374adc462345f2c068f1cfc6f4adf97 (diff) | |
download | hdf5-43158f3bb352f374c31556a5d0dc463a09e0b32e.zip hdf5-43158f3bb352f374c31556a5d0dc463a09e0b32e.tar.gz hdf5-43158f3bb352f374c31556a5d0dc463a09e0b32e.tar.bz2 |
Merge pull request #833 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cpp3:develop to develop
Update for new support website.
* commit '801191b4c374adc462345f2c068f1cfc6f4adf97':
Upated cpp doc.
Added C++ wrappers - HDFFV-10149 Description: Added the following wrappers to class H5::Group: + H5Lcreate_soft: // Creates a soft link from link_name to target_name. void newLink(const char *target_name, const char *link_name,...) void newLink(const H5std_string& target_name,...)
Update for new support website Description: - Replaced external links with text including the C API name - Removed links of copyright at the bottom of each page - Removed logo at top - Removed document name and version number Platforms tested: Linux/32 2.6 (jam) - only documentation
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5ArrayType.cpp | 7 | ||||
-rw-r--r-- | c++/src/H5AtomType.cpp | 12 | ||||
-rw-r--r-- | c++/src/H5CppDoc.h | 13 | ||||
-rw-r--r-- | c++/src/H5DataSet.cpp | 13 | ||||
-rw-r--r-- | c++/src/H5DataSpace.cpp | 20 | ||||
-rw-r--r-- | c++/src/H5DataType.cpp | 7 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.cpp | 28 | ||||
-rw-r--r-- | c++/src/H5DxferProp.cpp | 9 | ||||
-rw-r--r-- | c++/src/H5FaccProp.cpp | 48 | ||||
-rw-r--r-- | c++/src/H5FcreatProp.cpp | 25 | ||||
-rw-r--r-- | c++/src/H5File.cpp | 5 | ||||
-rw-r--r-- | c++/src/H5Group.cpp | 311 | ||||
-rw-r--r-- | c++/src/H5Group.h | 69 | ||||
-rw-r--r-- | c++/src/H5Library.cpp | 8 | ||||
-rw-r--r-- | c++/src/H5Location.cpp | 33 | ||||
-rw-r--r-- | c++/src/H5Object.cpp | 6 | ||||
-rw-r--r-- | c++/src/H5OcreatProp.cpp | 14 | ||||
-rw-r--r-- | c++/src/H5StrType.cpp | 4 | ||||
-rw-r--r-- | c++/src/cpp_doc_config | 4 | ||||
-rw-r--r-- | c++/src/footer.html | 4 | ||||
-rw-r--r-- | c++/test/tlinks.cpp | 391 |
21 files changed, 730 insertions, 301 deletions
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 15ac140..76e7532 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -119,7 +119,6 @@ ArrayType::ArrayType(const H5Location& loc, const H5std_string& dtype_name) : Da // Closes the id on the lhs object first with setId, then copies // each data member from the rhs object. (Issue HDFFV-9562) // Programmer Binh-Minh Ribler - Mar 2016 -// Modification //-------------------------------------------------------------------------- ArrayType& ArrayType::operator=(const ArrayType& rhs) { @@ -165,9 +164,6 @@ DataType* ArrayType::decode() const ///\return Number of dimensions ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 -// Modification -// Apr, 2016 -// Became const. //-------------------------------------------------------------------------- int ArrayType::getArrayNDims() const { @@ -188,9 +184,6 @@ int ArrayType::getArrayNDims() const ///\return Number of dimensions ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 -// Modification -// Apr, 2016 -// Became const. //-------------------------------------------------------------------------- int ArrayType::getArrayDims(hsize_t* dims) const { diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index 5e709af..4e19850 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -175,8 +175,8 @@ size_t AtomType::getPrecision() const ///\param precision - IN: Number of bits of precision ///\exception H5::DataTypeIException ///\par Description -/// For information, please see C layer Reference Manuat at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetPrecision +/// For information, please refer to the H5Tset_precision API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setPrecision(size_t precision) const @@ -195,8 +195,8 @@ void AtomType::setPrecision(size_t precision) const ///\return Offset value ///\exception H5::DataTypeIException ///\par Description -/// For information, please see C layer Reference Manuat at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetOffset +/// For information, please refer to the H5Tget_offset API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 // Modification // 12/05/00: due to C API change @@ -222,8 +222,8 @@ int AtomType::getOffset() const ///\param offset - IN: Offset of first significant bit ///\exception H5::DataTypeIException ///\par Description -/// For information, please see C layer Reference Manuat at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetOffset +/// For information, please refer to the H5Tset_offset API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setOffset(size_t offset) const diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h index bfab9cd..6eb85bf 100644 --- a/c++/src/H5CppDoc.h +++ b/c++/src/H5CppDoc.h @@ -26,12 +26,9 @@ * * The C++ API provides C++ wrappers for the HDF5 C Library. * - * It is assumed that the user has knowledge of the - * <a href="https://support.hdfgroup.org/HDF5/doc/H5.format.html"> - * HDF5 file format</a> and its components. - * For more information on the HDF5 C Library, see the - * <a href="https://support.hdfgroup.org/HDF5/doc/index.html"> - * HDF5 Software Documentation</a> page. + * It is assumed that the user has knowledge of the HDF5 file format and its + * components. For more information on the HDF5 C Library, please refer to + * the HDF5 Software Documentation page. * * Because the HDF5 C Library maps very well to * the object oriented design approach, classes in the C++ API can @@ -51,15 +48,13 @@ Datatype Interface (H5T) DataType and subclasses \endverbatim * - * This <a href="https://support.hdfgroup.org/HDF5/doc/cpplus_RM/C2Cppfunction_map.mht"> + * This <a href="./C2Cppfunction_map.mht"> * table </a> provides a map from the C APIs to the C++ member functions. * <br /> * \section install_sec Installation * * The HDF5 C++ API is included with the HDF5 source code and can * be obtained from - * <a href="https://support.hdfgroup.org/HDF5/release/obtainsrc.html"> - * https://support.hdfgroup.org/HDF5/release/obtainsrc.html</a>. * * Please refer to the release_docs/INSTALL file under the top directory * of the HDF5 source code for information about installing, building, diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 32377bc..9e0f9ff 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -90,9 +90,6 @@ DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs(), id(origina /// \c loc can be DataSet, Group, H5File, or named DataType, that /// is a datatype that has been named by DataType::commit. // Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// Jul, 2008 -// Added for application convenience. //-------------------------------------------------------------------------- DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID) { @@ -109,9 +106,6 @@ DataSet::DataSet(const H5Location& loc, const void* ref, H5R_type_t ref_type, co ///\param plist - IN: Property list - default to PropList::DEFAULT ///\exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// Jul, 2008 -// Added for application convenience. //-------------------------------------------------------------------------- DataSet::DataSet(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), AbstractDs(), id(H5I_INVALID_HID) { @@ -577,10 +571,8 @@ int DataSet::iterateElems(void* buf, const DataType& type, const DataSpace& spac ///\param size - IN: Array containing the new magnitude of each dimension ///\exception H5::DataSetIException ///\par Description -/// For more information, please see the Description section in -/// C layer Reference Manual at: -///\par -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5D.html#Dataset-Extend +/// For information, please refer to the H5Dset_extent API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSet::extend(const hsize_t* size) const @@ -600,7 +592,6 @@ void DataSet::extend(const hsize_t* size) const ///\param space - IN: Dataspace describing memory buffer & containing selection to use ///\exception H5::DataSetIException // Programmer Binh-Minh Ribler - 2014 -// Modification //-------------------------------------------------------------------------- void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space) const { diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 379de2f..b563da4 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -466,9 +466,8 @@ hssize_t DataSpace::getSelectElemNpoints () const ///\param buf - IN: List of element points selected ///\exception H5::DataSpaceIException ///\par Description -/// For more information, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemPointList +/// For information, please refer to the C API +/// H5Sget_select_elem_pointlist in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const @@ -490,9 +489,8 @@ void DataSpace::getSelectElemPointlist (hsize_t startpoint, hsize_t numpoints, h /// the coordinates of the diagonally opposite corner ///\exception H5::DataSpaceIException ///\par Description -/// For more information, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectBounds +/// For information, please refer to the H5Sget_select_bounds API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end) const @@ -516,9 +514,8 @@ void DataSpace::getSelectBounds (hsize_t* start, hsize_t* end) const /// specifying the coordinates of the elements being selected ///\exception H5::DataSpaceIException ///\par Description -/// For more information, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements +/// For information, please refer to the H5Sselect_elements API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectElements (H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const @@ -598,9 +595,8 @@ bool DataSpace::selectValid () const ///\param block - IN: Size of block in the hyperslab - default to \c NULL ///\exception H5::DataSpaceIException ///\par Description -/// For more information, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab +/// For information, please refer to the H5Sselect_hyperslab API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block) const diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 444a77a..4b06c0a 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -96,9 +96,6 @@ DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), enco ///\param plist - IN: Property list - default to PropList::DEFAULT ///\exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// Jul, 2008 -// Added for application convenience. //-------------------------------------------------------------------------- DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), encoded_buf(NULL), buf_size(0) { @@ -653,8 +650,8 @@ DataType DataType::getSuper() const /// destination datatypes. ///\exception H5::DataTypeIException ///\par Description -/// For more information, please see: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-Register +/// For information, please refer to the H5Tregister API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func) const diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index fd3cd17..2946730 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -158,8 +158,8 @@ int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim) const ///\param layout - IN: Type of storage layout for raw data ///\exception H5::PropListIException ///\par Description -/// For information on valid layout types, please refer to -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLayout +/// For information, please refer to the H5Pset_layout API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setLayout(H5D_layout_t layout) const @@ -233,9 +233,8 @@ void DSetCreatPropList::setDeflate(int level) const ///\par Description /// The associate C function sets an SZIP compression filter, /// H5Z_FILTER_SZIP, for a dataset. For more information about -/// SZIP and usage, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSzip +/// SZIP and usage, please refer to the H5Pset_szip API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - Jan, 2007 //-------------------------------------------------------------------------- void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const @@ -255,9 +254,8 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p ///\par Description /// The associate C function sets an Nbit compression filter, /// H5Z_FILTER_NBIT, for a dataset. For more information about -/// Nbit compression, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-setNbit +/// Nbit compression, please refer to the H5Pset_nbit API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - Apr, 2016 //-------------------------------------------------------------------------- void DSetCreatPropList::setNbit() const @@ -284,8 +282,7 @@ void DSetCreatPropList::setNbit() const /// according to the actual dataset datatype. ///\par /// For information on setting fill value, please refer to the -/// C layer Reference Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue +/// H5Pset_fill_value API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFillValue(const DataType& fvalue_type, const void* value) const @@ -534,9 +531,8 @@ bool DSetCreatPropList::allFiltersAvail() const /// ///\exception H5::PropListIException ///\par Description -/// Please refer to the Reference Manual of \c H5Pset_shuffle for -/// details. -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetShuffle +/// For information, please refer to the H5Pset_shuffle API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setShuffle() const @@ -752,7 +748,8 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name, /// an unlimited selection ///\exception H5::PropListIException ///\par Description -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetVirtual +/// For information, please refer to the H5Pset_virtual API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - Mar, 2017 //-------------------------------------------------------------------------- void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fname, const char *src_dsname, const DataSpace& sspace) const @@ -779,7 +776,8 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fnam /// an unlimited selection ///\exception H5::PropListIException ///\par Description -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetVirtual +/// For information, please refer to the H5Pset_virtual API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - Mar, 2017 //-------------------------------------------------------------------------- void DSetCreatPropList::setVirtual(const DataSpace& vspace, const H5std_string src_fname, const H5std_string src_dsname, const DataSpace& sspace) const diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index 3a72b28..21e18e7 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -434,8 +434,8 @@ void DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t& alloc_func, void** ///\param size - IN: Maximum size, in bytes, of the small data block. ///\exception H5::PropListIException ///\par Description -/// For detail, please refer to the C layer Reference Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSmallData +/// For detail, please refer to the H5Pset_small_data_block_size +/// API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const @@ -473,9 +473,8 @@ hsize_t DSetMemXferPropList::getSmallDataBlockSize() const /// ///\exception H5::PropListIException ///\par Description -/// For information, please refer to the C layer Reference -/// Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetHyperVectorSize +/// For detail, please refer to the H5Pset_hyper_vector_size +/// API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index b414294..9e1098b 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -124,8 +124,8 @@ void FileAccPropList::setStdio() const ///\return A low-level driver ID which is the same ID used when the /// driver was set for the property list. The driver ID is /// only valid as long as the file driver remains registered. -/// Valid driver identifiers can be found at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetDriver +/// For detail on valid driver identifiers, please refer to the +/// H5Pget_driver API in the HDF5 C Reference Manual. ///\exception H5::PropListIException // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- @@ -146,9 +146,8 @@ hid_t FileAccPropList::getDriver() const ///\param new_driver_info - IN: Struct containing the driver-specific properites ///\exception H5::PropListIException ///\par Description -/// For a list of valid driver identifiers, please see the C -/// layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetDriver +/// For information, please refer to the H5Pset_driver API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const @@ -205,8 +204,7 @@ hsize_t FileAccPropList::getFamilyOffset() const ///\exception H5::PropListIException ///\par Description /// For more details on the use of \c H5FD_CORE driver, please -/// refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplCore +/// refer to the H5Pset_fapl_core API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const @@ -309,8 +307,8 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const ///\param raw_ext - IN: Raw data filename extension as \c char* ///\exception H5::PropListIException ///\par Description -/// Temporary - For information, please refer to: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit +/// For information, please refer to the H5Pset_fapl_split API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext) const @@ -369,8 +367,8 @@ size_t FileAccPropList::getSieveBufSize() const ///\param bufsize - IN: Maximum size, in bytes, of data sieve buffer ///\exception H5::PropListIException ///\par Description -/// For detail on data sieving, please refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSieveBufSize +/// For more detail, please refer to the H5Pset_sieve_buf_size +/// API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSieveBufSize(size_t bufsize) const @@ -389,8 +387,8 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const /// block allocations ///\exception H5::PropListIException ///\par Description -/// For more detail, please see the C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMetaBlockSize +/// For information, please refer to the H5Pset_meta_block_size +/// API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const @@ -429,8 +427,8 @@ hsize_t FileAccPropList::getMetaBlockSize() const ///\param buf_size - IN: Size of the logging buffer ///\exception H5::PropListIException ///\par Description -/// For detail on \a flags, please refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplLog +/// For information, please refer to the H5Pset_fapl_log API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const @@ -486,8 +484,8 @@ void FileAccPropList::setSec2() const /// effect of a special case, forcing everything to be aligned. /// The parameter \a alignment must have a positive value. /// -/// For detail on \a setting alignment, please refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAlignment +/// For more detail, please refer to the H5Pset_alignment API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const @@ -523,8 +521,8 @@ void FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const ///\param dtype - IN: Type of data ///\exception H5::PropListIException ///\par Description -/// More details and valid values for \a dtype can be found at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetMultiType +/// For information, please refer to the H5Pset_multi_type API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setMultiType(H5FD_mem_t dtype) const @@ -542,8 +540,8 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const ///\return The data type property ///\exception H5::PropListIException ///\par Description -/// More details and possible returned values can be found at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetMultiType +/// For information, please refer to the H5Pget_multi_type API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5FD_mem_t FileAccPropList::getMultiType() const @@ -643,8 +641,8 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree() const /// on (1) or off (0). ///\exception H5::PropListIException ///\par Description -/// For detail on \a fapl, please refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetGCReferences +/// For information, please refer to the H5Pset_gc_references API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setGcReferences(unsigned gc_ref) const @@ -694,8 +692,8 @@ unsigned FileAccPropList::getGcReferences() const /// \li \c H5F_LIBVER_18 /// \li \c H5F_LIBVER_LATEST (Default) /// -/// For more details, please refer to -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLibverBounds +/// For more detail, please refer to the H5Pset_libver_bounds API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - March, 2015 //-------------------------------------------------------------------------- void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index 9674c0a..98a35cb 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -173,9 +173,8 @@ hsize_t FileCreatPropList::getUserblock() const ///\param sizeof_size - IN: Size of an object length in bytes. ///\exception H5::PropListIException ///\par Description -/// For information on setting sizes, please refer to the -/// C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSizes +/// For information, please refer to the H5Pset_sizes API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const @@ -214,8 +213,8 @@ void FileCreatPropList::getSizes(size_t& sizeof_addr, size_t& sizeof_size) const ///\param lk - IN: Symbol table node size ///\exception H5::PropListIException ///\par Description -/// For information, please see the C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetSymK +/// For information, please refer to the H5Pset_sym_k API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setSymk(unsigned ik, unsigned lk) const @@ -235,8 +234,8 @@ void FileCreatPropList::setSymk(unsigned ik, unsigned lk) const /// ///\exception H5::PropListIException ///\par Description -/// For information, please see -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetSymK +/// For information, please refer to the H5Pget_sym_k API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::getSymk(unsigned& ik, unsigned& lk) const @@ -256,8 +255,8 @@ void FileCreatPropList::getSymk(unsigned& ik, unsigned& lk) const ///\param ik - IN: 1/2 rank of chunked storage B-tree ///\exception H5::PropListIException ///\par Description -/// For information, please see the C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetIstoreK +/// For information, please refer to the H5Pset_istore_k API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setIstorek(unsigned ik) const @@ -276,8 +275,8 @@ void FileCreatPropList::setIstorek(unsigned ik) const ///\return 1/2 rank of chunked storage B-tree ///\exception H5::PropListIException ///\par Description -/// For information, please see -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetIstoreK +/// For information, please refer to the H5Pget_istore_k API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- unsigned FileCreatPropList::getIstorek() const @@ -306,8 +305,8 @@ unsigned FileCreatPropList::getIstorek() const /// changed and the existing strategy will be retained. /// If the given threshold value is zero, the property will not be /// changed and the existing threshold will be retained. -/// For information, please see the C layer Reference Manual at: -/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFileSpace +/// For information, please refer to the H5Pset_file_space_strategy +/// API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - Feb, 2017 //-------------------------------------------------------------------------- void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index 3a0b54d..57ee4d5 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -72,9 +72,8 @@ H5File::H5File() : Group(), id(H5I_INVALID_HID) {} /// exists, and fail, otherwise ///\par /// For info on file creation in the case of an already-open file, -/// please refer to the \b Special \b case section in the C layer -/// Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create +/// please refer to the \b Special \b case section of the H5Fcreate +/// API in the C Reference Manual. // Notes With a PGI compiler (~2012-2013,) the exception thrown by // p_get_file could not be caught in the applications. Added try // block here to catch then re-throw it. -BMR 2013/03/21 diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index c0e0dd1..aa27a18 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -76,6 +76,297 @@ void Group::closeObjId(hid_t obj_id) const } } +/*** For H5L API ***/ + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief Creates a soft link from \a link_name to \a target_name. +///\param target_name - IN: Name of object, can be a non-existing object +///\param link_name - IN: Link name for the target name +///\param lcpl - IN: Link creation plist - default to PropList::DEFAULT +///\param lapl - IN: Link access plist - default to PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +///\par Description +/// Note that both names are interpreted relative to the current +/// location. +/// For information on creating a soft link, please refer to the +/// H5Lcreate_soft APIs in the HDF5 C Reference Manual. +// March 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const char *target_name, const char *link_name, + const PropList& lcpl, const PropList& lapl) const +{ + herr_t ret_value = -1; + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lcreate_soft(target_name, id, link_name, lcpl_id, lapl_id); + if (ret_value < 0) + throwException("newLink", "creating soft link failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a target_name and \a link_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const H5std_string& target_name, const H5std_string& + link_name, const PropList& lcpl, const PropList& lapl) const +{ + newLink(target_name.c_str(), link_name.c_str(), lcpl, lapl); +} + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief Creates a hard link from \a new_name to \a curr_name. +///\param curr_name - IN: Name of the existing object +///\param new_name - IN: New name for the object +///\param lcpl - IN: Link creation plist - default to PropList::DEFAULT +///\param lapl - IN: Link access plist - default to PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +///\par Description +/// Note that both names are interpreted relative to the +/// specified location. +/// For information on creating a hard link, please refer to the +/// H5Lcreate_hard APIs in the HDF5 C Reference Manual. +// March 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const char *curr_name, const Group& new_loc, + const char *new_name, const PropList& lcpl, const PropList& lapl) const +{ + herr_t ret_value = -1; + hid_t new_loc_id = new_loc.getId(); + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lcreate_hard(getId(), curr_name, new_loc.getId(), new_name, H5P_DEFAULT, H5P_DEFAULT); + if (ret_value < 0) + throwException("newLink", "creating link failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a curr_name and \a new_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const H5std_string& curr_name, const Group& new_loc, + const H5std_string& new_name, const PropList& lcpl, const PropList& lapl) const +{ + newLink(curr_name.c_str(), new_loc, new_name.c_str(), lcpl, lapl); +} + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief Creates a hard link from \a new_name to \a curr_name - can be +/// used to pass in H5L_SAME_LOC. +///\param curr_name - IN: Name of the existing object +///\param new_name - IN: New name for the object +///\param lcpl - IN: Link creation plist - default to PropList::DEFAULT +///\param lapl - IN: Link access plist - default to PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +///\par Description +/// Note that both names are interpreted relative to the +/// specified location. +/// For information on creating a hard link, please refer to the +/// H5Lcreate_hard APIs in the HDF5 C Reference Manual. +// March 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const char *curr_name, const hid_t same_loc, + const char *new_name, const PropList& lcpl, const PropList& lapl) const +{ + herr_t ret_value = -1; + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lcreate_hard(getId(), curr_name, same_loc, new_name, H5P_DEFAULT, H5P_DEFAULT); + + if (ret_value < 0) + throwException("newLink", "creating link failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::newLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a curr_name and \a new_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::newLink(const H5std_string& curr_name, const hid_t same_loc, + const H5std_string& new_name, const PropList& lcpl, const PropList& lapl) const +{ + newLink(curr_name.c_str(), same_loc, new_name.c_str(), lcpl, lapl); +} + + +//-------------------------------------------------------------------------- +// Function: Group::copyLink +///\brief Copies a link from one location to another. +///\param src - IN: Source location +///\param src_name - IN: Original name +///\param dst - IN: Destination location +///\param dst_name - IN: New name +///\param lcpl - IN: Link creation plist - default PropList::DEFAULT +///\param lapl - IN: Link access plist - default PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::copyLink(const char *src_name, + const Group& dst, const char *dst_name, const PropList& lcpl, + const PropList& lapl) const +{ + herr_t ret_value; + hid_t dst_id = dst.getId(); + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lcopy(getId(), src_name, dst_id, dst_name, lcpl_id, lapl_id); + if(ret_value < 0) + throwException("copyLink", "H5Lcopy failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::copyLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a src_name and \a dst_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::copyLink(const H5std_string& src_name, + const Group& dst, const H5std_string& dst_name, const PropList& lcpl, + const PropList& lapl) const +{ + copyLink(src_name.c_str(), dst, dst_name.c_str(), lcpl, lapl); +} + +//-------------------------------------------------------------------------- +// Function: Group::copyLink +///\brief Copies a link to the same location. +///\param src - IN: Source location +///\param src_name - IN: Original name +///\param dst_name - IN: New name +///\param lcpl - IN: Link creation plist - default PropList::DEFAULT +///\param lapl - IN: Link access plist - default PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::copyLink(const char *src_name, + const char *dst_name, const PropList& lcpl, + const PropList& lapl) const +{ + herr_t ret_value; + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lcopy(getId(), src_name, H5L_SAME_LOC, dst_name, lcpl_id, lapl_id); + if(ret_value < 0) + throwException("copyLink", "H5Lcopy H5L_SAME_LOC failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::copyLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a src_name and \a dst_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::copyLink(const H5std_string& src_name, + const H5std_string& dst_name, const PropList& lcpl, + const PropList& lapl) const +{ + copyLink(src_name.c_str(), dst_name.c_str(), lcpl, lapl); +} + +//-------------------------------------------------------------------------- +// Function: Group::moveLink +///\brief Renames an object in a group/file and moves it to a new location. +///\param src - IN: Source location +///\param src_name - IN: Original name +///\param dst - IN: Destination location +///\param dst_name - IN: New name +///\param lcpl - IN: Link creation plist - default PropList::DEFAULT +///\param lapl - IN: Link access plist - default PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +///\note +/// Exercise care in moving groups as it is possible to render +/// data in a file inaccessible with Group::moveLink. Please refer +/// to the Group Interface in the HDF5 User's Guide for details. +// March, 2018 +//-------------------------------------------------------------------------- +void Group::moveLink(const char* src_name, const Group& dst, const char* dst_name, const PropList& lcpl, const PropList& lapl) const +{ + herr_t ret_value; + hid_t dst_id = dst.getId(); + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lmove(getId(), src_name, dst_id, dst_name, lcpl_id, lapl_id); + if (ret_value < 0) + throwException("moveLink", "H5Lmove failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::moveLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a src_name and \a dst_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::moveLink(const H5std_string& src_name, const Group& dst, const H5std_string& dst_name, const PropList& lcpl, const PropList& lapl) const +{ + moveLink(src_name.c_str(), dst, dst_name.c_str(), lcpl, lapl); +} + +//-------------------------------------------------------------------------- +// Function: Group::moveLink +///\brief Renames an object in a group or file to the same location. +///\param src - IN: Source location +///\param src_name - IN: Original name +///\param dst_name - IN: New name +///\param lcpl - IN: Link creation plist - default PropList::DEFAULT +///\param lapl - IN: Link access plist - default PropList::DEFAULT +///\exception H5::FileIException or H5::GroupIException +///\note +/// Exercise care in moving groups as it is possible to render +/// data in a file inaccessible with Group::moveLink. Please refer +/// to the Group Interface in the HDF5 User's Guide for details. +// March, 2018 +//-------------------------------------------------------------------------- +void Group::moveLink(const char* src_name, const char* dst_name, const PropList& lcpl, const PropList& lapl) const +{ + herr_t ret_value; + hid_t lcpl_id = lcpl.getId(); + hid_t lapl_id = lapl.getId(); + + ret_value = H5Lmove(getId(), src_name, H5L_SAME_LOC, dst_name, lcpl_id, lapl_id); + if (ret_value < 0) + throwException("moveLink", "H5Lmove H5L_SAME_LOC failed"); +} + +//-------------------------------------------------------------------------- +// Function: Group::moveLink +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function in that it takes an +/// \c H5std_string for \a src_name and \a dst_name. +///\exception H5::FileIException or H5::GroupIException +// March, 2018 +//-------------------------------------------------------------------------- +void Group::moveLink(const H5std_string& src_name, const H5std_string& dst_name, const PropList& lcpl, const PropList& lapl) const +{ + moveLink(src_name.c_str(), H5L_SAME_LOC, dst_name.c_str(), lcpl, lapl); +} + +/*** End of H5L API section ***/ + //-------------------------------------------------------------------------- // Function: Group::getLocId // Purpose: Get the id of this group @@ -123,26 +414,6 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const } //-------------------------------------------------------------------------- -// Function: Group overload constructor - dereference -// brief Given a reference, ref, to an hdf5 group, creates a Group objec -// param attr - IN: Specifying location where the referenced object is i -// param ref - IN: Reference pointer -// param ref_type - IN: Reference type - default to H5R_OBJECT -// param plist - IN: Property list - default to PropList::DEFAULT -// exception H5::ReferenceException -// Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// Mar, 2017 -// Removed in 1.10.1 because H5Location is Attribute's baseclass -// now. -BMR -//-------------------------------------------------------------------------- -/* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID) -{ - id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference"); -} - */ - -//-------------------------------------------------------------------------- // Function: Group::getNumObjs ///\brief Returns the number of objects in this group. ///\return Number of objects diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index b3a9007..d95d996 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -50,6 +50,75 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; + /*** For H5L API ***/ + + // Creates a soft link from link_name to target_name. + void newLink(const char *target_name, const char *link_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void newLink(const H5std_string& target_name, + const H5std_string& link_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Creates a hard link from new_name to curr_name. + void newLink(const char *curr_name, + const Group& new_loc, const char *new_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void newLink(const H5std_string& curr_name, + const Group& new_loc, const H5std_string& new_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Creates a hard link from new_name to curr_name in same location. + void newLink(const char *curr_name, + const hid_t same_loc, const char *new_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void newLink(const H5std_string& curr_name, + const hid_t same_loc, const H5std_string& new_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Copy an object from a group of file to another. + void copyLink(const char *src_name, + const Group& dst, const char *dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void copyLink(const H5std_string& src_name, + const Group& dst, const H5std_string& dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Copy an object from a group of file to the same location. + void copyLink(const char *src_name, const char *dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void copyLink(const H5std_string& src_name, + const H5std_string& dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Rename an object in a group or file to a new location. + void moveLink(const char* src_name, + const Group& dst, const char* dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void moveLink(const H5std_string& src_name, + const Group& dst, const H5std_string& dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + + // Rename an object in a group or file to the same location. + void moveLink(const char* src_name, const char* dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + void moveLink(const H5std_string& src_name, + const H5std_string& dst_name, + const PropList& lcpl = PropList::DEFAULT, + const PropList& lapl = PropList::DEFAULT) const; + // default constructor Group(); diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 9293622..214c5b2 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -110,8 +110,7 @@ void H5Library::getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& reln ///\exception H5::LibraryIException ///\par Description /// For information about library version, please refer to -/// the C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-VersCheck +/// the H5check_version API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum) @@ -240,9 +239,8 @@ void H5Library::termH5cpp() ///\exception H5::LibraryIException ///\par Description /// Setting a value of -1 for a limit means no limit of that type. -/// For more information on free list limits, please refer to C -/// layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-SetFreeListLimits +/// For more information on free list limits, please refer to +/// the H5set_free_list_limits API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index d0b5f9d..3ca080e 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -230,7 +230,6 @@ void H5Location::setComment(const H5std_string& name, const H5std_string& commen /// It differs from the above function in that it doesn't take /// an object name. // Programmer Binh-Minh Ribler - Sep 2013 -// Modification //-------------------------------------------------------------------------- void H5Location::setComment(const char* comment) const { @@ -513,9 +512,6 @@ void H5Location::reference(void* ref, const H5std_string& name, H5R_type_t ref_t // from_func - IN: Name of the calling function // Exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// May 2008 - BMR -// Moved from IdComponent. //-------------------------------------------------------------------------- hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const PropList& plist, const char* from_func) { @@ -544,9 +540,6 @@ hid_t H5Location::p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_ty ///\param plist - IN: Property list - default to PropList::DEFAULT ///\exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 -// Modification -// May, 2008 -// Corrected missing parameters. - BMR //-------------------------------------------------------------------------- void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) { @@ -563,8 +556,6 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t // exception H5::ReferenceException // Programmer Binh-Minh Ribler - Oct, 2006 // Modification -// May, 2008 -// Corrected missing parameters. -BMR // Mar, 2017 // Removed in 1.10.1 because H5Location is Attribute's baseclass // now. -BMR @@ -955,12 +946,14 @@ DataSet H5Location::openDataSet(const H5std_string& name) const /// Note that both names are interpreted relative to the /// specified location. /// For information on creating hard link and soft link, please -/// refer to the C layer Reference Manual at: -/// http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateHard and -/// http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateSoft +/// refer to the H5Lcreate_hard and H5Lcreate_soft APIs in the +/// HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 // Modification // 2007: QAK modified to use H5L APIs - BMR +// Mar 2018: Inadequate functionality, new hard link is only in +// H5L_SAME_LOC. This function will be retired in favor of +// its replacement, Group::newLink(). - BMR //-------------------------------------------------------------------------- void H5Location::link(H5L_type_t link_type, const char* curr_name, const char* new_name) const { @@ -1036,8 +1029,7 @@ void H5Location::unlink(const H5std_string& name) const ///\note /// Exercise care in moving groups as it is possible to render /// data in a file inaccessible with H5Location::move. Please refer -/// to the Group Interface in the HDF5 User's Guide for details at: -/// https://www.hdfgroup.org/HDF5/doc/UG/HDF5_Users_Guide-Responsive%20HTML5/index.html#t=HDF5_Users_Guide%2FGroups%2FHDF5_Groups.htm +/// to the Group Interface in the HDF5 User's Guide for details. // Programmer Binh-Minh Ribler - 2000 // Modification // 2007: QAK modified to use H5L APIs - BMR @@ -1070,9 +1062,8 @@ void H5Location::move(const H5std_string& src, const H5std_string& dst) const ///\param statbuf - OUT: Buffer to return information about the object ///\exception H5::FileIException/H5::GroupIException/H5::LocationException ///\par Description -/// For more information, please refer to the C layer Reference -/// Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-GetObjinfo +/// For information, please refer to the H5Gget_objinfo API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void H5Location::getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const @@ -1435,8 +1426,8 @@ ssize_t H5Location::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size /// \li \c H5O_TYPE_GROUP /// \li \c H5O_TYPE_DATASET /// \li \c H5O_TYPE_NAMED_DATATYPE -/// Refer to the C API documentation for more details: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo +/// For information, please refer to the H5Oget_info_by_name API in +/// the HDF5 C Reference Manual. ///\exception H5::FileIException/H5::GroupIException/H5::LocationException /// Exception will be thrown when: /// - an error returned by the C API @@ -1501,8 +1492,8 @@ H5O_type_t H5Location::childObjType(const H5std_string& objname) const /// \li \c H5O_TYPE_GROUP /// \li \c H5O_TYPE_DATASET /// \li \c H5O_TYPE_NAMED_DATATYPE -/// Refer to the C API documentation for more details: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5O.html#Object-GetInfo +/// For information, please refer to the H5Oget_info_by_idx API in +/// the HDF5 C Reference Manual. ///\exception H5::FileIException/H5::GroupIException/H5::LocationException /// Exception will be thrown when: /// - an error returned by the C API diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 3eed168..fcdfd59 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -224,9 +224,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) @@ -421,7 +420,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 { diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp index ec6c08e..121198c 100644 --- a/c++/src/H5OcreatProp.cpp +++ b/c++/src/H5OcreatProp.cpp @@ -113,8 +113,7 @@ ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) {} ///\par Description /// If \c max_compact is set to 0, dense storage will be used. /// For more detail about on attribute storage, please refer to the -/// C layer Reference Manual at: -/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrPhaseChange +/// H5Pset_attr_phase_change API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const @@ -137,8 +136,7 @@ void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_den ///\par Description /// If \c max_compact is set to 0, dense storage will be used. /// For more detail about on attribute storage, please refer to the -/// C layer Reference Manual at: -/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrPhaseChange +/// H5Pget_attr_phase_change API in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const @@ -166,8 +164,8 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d /// tracked not indexed. Note that HDF5 currently provides no /// mechanism to turn on attribute creation order tracking at object /// creation time and to build the index later. -/// The C layer Reference Manual at can be found at: -/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetAttrCreationOrder +/// For detail, please refer to the H5Pset_attr_creation_order API +/// in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const @@ -188,8 +186,8 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const ///\par Description /// When no flag is set, i.e. crt_order_flags = 0, attribute /// creation order is neither tracked not indexed. -/// The C layer Reference Manual at can be found at: -/// https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-GetAttrCreationOrder +/// For detail, please refer to the H5Pget_attr_creation_order API +/// in the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - September 2015 //-------------------------------------------------------------------------- unsigned ObjCreatPropList::getAttrCrtOrder() const diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index d2d87e9..7125676 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -281,8 +281,8 @@ H5T_str_t StrType::getStrpad() const ///\param strpad - IN: String padding type ///\exception H5::DataTypeIException ///\par Description -/// For detail, please refer to the C layer Reference Manual at: -/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetStrpad +/// For information, please refer to the H5Tset_strpad API in +/// the HDF5 C Reference Manual. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void StrType::setStrpad(H5T_str_t strpad) const diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 56ea1e6..3943f7b 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "HDF5 C++ API" +PROJECT_NAME = # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version @@ -51,7 +51,7 @@ PROJECT_BRIEF = # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. -PROJECT_LOGO = ./header_files/hdf_logo.jpg +PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is diff --git a/c++/src/footer.html b/c++/src/footer.html index ba37ee7..5ad9b7c 100644 --- a/c++/src/footer.html +++ b/c++/src/footer.html @@ -11,8 +11,8 @@ </address> </td><td width="5%"> </td> <td align="right"> - <a href="https://www.hdfgroup.org/HDF5/doc/Copyright.html">Copyright</a> by - <a href="https://www.hdfgroup.org">The HDF Group</a> + Copyright by + The HDF Group <br> and the Board of Trustees of the University of Illinois </td> diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index e348d64..93bd0266 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -323,11 +323,9 @@ static const char *FILENAME[] = { * Purpose Test building a file with assorted links. * * Return Success: 0 - * * Failure: -1 * - * Programmer Binh-Minh Ribler - * October 16, 2009 + * October 16, 2009 *------------------------------------------------------------------------- */ static void test_basic_links(hid_t fapl_id, hbool_t new_format) @@ -438,16 +436,267 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format) /*------------------------------------------------------------------------- + * Function: test_move + * + * Purpose: Tests wrappers of H5Lmove() + * + * Return: Success: 0 + * Failure: number of errors + * March, 2018 + *------------------------------------------------------------------------- + */ +const H5std_string GROUP1NAME("First_group"); +const H5std_string GROUP2NAME("Second_group"); +static void +test_move(hid_t fapl_id, hbool_t new_format) +{ + char filename[1024]; + + if(new_format) + SUBTEST("Group::moveLink (w/new group format)") + else + SUBTEST("Group::moveLink") + + try + { + // Create two new files + h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename); + H5File file_a(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_id); + h5_fixname(FILENAME[1], fapl_id, filename, sizeof filename); + H5File file_b(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_id); + + // Create groups in first file + Group grp_1(file_a.createGroup(GROUP1NAME)); + Group grp_2(file_a.createGroup(GROUP2NAME)); + Group grp_move(grp_1.createGroup("group_move")); + + // Create hard and soft links + grp_1.link(H5L_TYPE_HARD, "group_move", "hard"); + grp_2.link(H5L_TYPE_SOFT, "/First_group/group_copy", "soft"); + + // Move a group across files, should fail + try { + grp_1.moveLink("group_move", file_b, "group_new_name"); + + // Should throw an exception but didn't + H5_FAILED(); + cerr << " Group group_move should not be moved across files" << endl; + } catch (Exception& E) { + // expected + } + + // Move a soft link across files, should succeed + grp_2.moveLink("soft", file_b, "soft_new_name"); + if(file_b.exists("soft_new_name") != TRUE) + throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist"); + + // Move a group across groups in the same file while renaming it + grp_1.moveLink("group_move", grp_2, "group_new_name"); + + // Open the group just moved to the new location. */ + Group moved_grp = grp_2.openGroup("group_new_name"); + moved_grp.close(); + + // Verify that the group is no longer in the original location + try { + moved_grp = grp_1.openGroup("group_move"); + + // Should throw an exception but didn't + H5_FAILED(); + cerr << " Group group_move should not be in original location" << endl; + } catch (Exception& E) { + // expected + } + + // Use H5Lmove to rename a group without moving it + H5std_string new_name("group_new_name"); + H5std_string newer_name("group_newer_name"); + grp_2.moveLink(new_name, newer_name); + + // Open the group + moved_grp = grp_2.openGroup("group_newer_name"); + moved_grp.close(); + + // Use H5Lmove to move a group without renaming it + grp_2.moveLink(newer_name, grp_1, newer_name); + + // Open the group + moved_grp = grp_1.openGroup("group_newer_name"); + moved_grp.close(); + + // Move the group while giving long paths + file_a.moveLink("/First_group/group_newer_name", grp_2, "/Second_group/group_newest_name"); + + // Open the group just moved to the new location + moved_grp = grp_2.openGroup("group_newest_name"); + moved_grp.close(); + + // Verify that the groups are not in previous locations + try { + moved_grp = grp_1.openGroup("group_newer_name"); + moved_grp.close(); + + H5_FAILED(); // Should throw an exception but didn't + cerr << " Group group_newer_name should not be in GROUP1NAME" << endl; + } catch (Exception& E) { + // expected + } + try { + moved_grp = grp_2.openGroup("group_newer_name"); + moved_grp.close(); + + H5_FAILED(); // Should throw an exception but didn't + cerr << " Group group_newer_name should not be in GROUP2NAME" << endl; + } catch (Exception& E) { + // expected + } + try { + moved_grp = grp_2.openGroup("group_new_name"); + moved_grp.close(); + + H5_FAILED(); // Should throw an exception but didn't + cerr << " Group group_new_name should not be in GROUP2NAME" << endl; + } catch (Exception& E) { + // expected + } + try { + moved_grp = grp_1.openGroup("group_copy"); + moved_grp.close(); + + H5_FAILED(); // Should throw an exception but didn't + cerr << " Group group_copy should not be in GROUP1NAME" << endl; + } catch (Exception& E) { + // expected + } + PASSED(); + } // end of try block + catch (Exception& E) + { + issue_fail_msg("test_num_links()", __LINE__, __FILE__, E.getCDetailMsg()); + } +} + +/*------------------------------------------------------------------------- + * Function: test_copy + * + * Purpose: Tests wrappers of H5Lcopy() + * + * Return: Success: 0 + * Failure: number of errors + * March, 2018 + *------------------------------------------------------------------------- + */ +static void test_copy(hid_t fapl_id, hbool_t new_format) +{ + char filename[1024]; + + if(new_format) + SUBTEST("Group::copyLink (w/new group format)") + else + SUBTEST("Group::copyLink") + + try + { + // Create two new files + h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename); + H5File file_a(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_id); + h5_fixname(FILENAME[1], fapl_id, filename, sizeof filename); + H5File file_b(filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl_id); + + // Create groups in first file + Group grp_1(file_a.createGroup(GROUP1NAME)); + Group grp_2(file_a.createGroup(GROUP2NAME)); + Group grp_move(grp_1.createGroup("group_copy")); + + // Create hard and soft links + grp_1.newLink("group_copy", H5L_SAME_LOC, "hard"); + grp_2.newLink("/First_group/group_copy", "soft"); + + // Copy a group across files, should fail + try { + grp_1.copyLink("group_copy", file_b, "group_new_name"); + } catch (Exception& E) { + // expected + } + + // Copy a soft link across files, should succeed + grp_2.copyLink("soft", file_b, "soft_new_name"); + if (file_b.exists("soft_new_name") != TRUE) + throw InvalidActionException("H5File::exists", "soft_new_name doesn't exist"); + + // Move a group across groups in the same file while renaming it + H5std_string copy_name("group_copy"); + H5std_string new_name("group_new_name"); + grp_1.copyLink(copy_name, grp_2, new_name); + + // Open the group just moved to the new location. + Group moved_grp(grp_2.openGroup("group_new_name")); + moved_grp.close(); + + // Verify that the group is also in the original location + moved_grp = grp_1.openGroup("group_copy"); + moved_grp.close(); + + // Create a group in the same location with a different name + grp_2.copyLink("group_new_name", "group_newer_name"); + + // Open the group + moved_grp = grp_2.openGroup("group_newer_name"); + moved_grp.close(); + + // Verify that the group is also in the original location + moved_grp = grp_2.openGroup("group_new_name"); + moved_grp.close(); + + // Use H5Lcopy to copy to a different location with the same name + grp_2.copyLink("group_newer_name", grp_1, "group_newer_name"); + + // Open the group + moved_grp = grp_1.openGroup("group_newer_name"); + moved_grp.close(); + + // Verify that the group is still in the previous location + moved_grp = grp_2.openGroup("group_new_name"); + moved_grp.close(); + + // Copy the group while giving long paths + file_a.copyLink("/First_group/group_newer_name", grp_2, "/Second_group/group_newest_name"); + + // Open the newest group just moved to the new location + moved_grp = grp_2.openGroup("group_newest_name"); + moved_grp.close(); + + // Verify that the group is still in all previous original locations + moved_grp = grp_1.openGroup("group_newer_name"); + moved_grp.close(); + + moved_grp = grp_2.openGroup("group_newer_name"); + moved_grp.close(); + + moved_grp = grp_2.openGroup("group_new_name"); + moved_grp.close(); + + moved_grp = grp_1.openGroup("group_copy"); + moved_grp.close(); + + PASSED(); + } // end of try block + catch (Exception& E) + { + issue_fail_msg("test_num_links()", __LINE__, __FILE__, E.getCDetailMsg()); + } +} + + +/*------------------------------------------------------------------------- * Function: test_num_links * * Purpose Test setting and getting limit of number of links * * Return Success: 0 - * * Failure: -1 * - * Programmer Binh-Minh Ribler - * October 16, 2009 + * October 16, 2009 *------------------------------------------------------------------------- */ static void test_num_links(hid_t fapl_id, hbool_t new_format) @@ -491,8 +740,7 @@ static void test_num_links(hid_t fapl_id, hbool_t new_format) * * Return None * - * Programmer Binh-Minh Ribler - * October 16, 2009 + * October 16, 2009 *------------------------------------------------------------------------- */ extern "C" @@ -516,9 +764,10 @@ void test_links() if((fapl2_id = H5Pcopy(fapl_id)) < 0) throw Exception("test_links", "H5Pcopy failed"); - /* Set the "use the latest version of the format" bounds for creating objects in the file */ + /* Set the "use the latest version of the format" bounds for creating + objects in the file */ if(H5Pset_libver_bounds(fapl2_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - throw Exception("test_links", "H5Pset_libver_bounds failed"); + throw Exception("test_links", "H5Pset_libver_bounds failed"); /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) @@ -534,124 +783,10 @@ void test_links() /* General tests... (on both old & new format groups */ // FileAccPropList may be passed in instead of fapl id test_basic_links(my_fapl_id, new_format); -#if 0 -// these tests are from the C test links.c and left here for future -// implementation of H5L API - nerrors += test_basic_links(fapl_id, new_format) < 0 ? 1 : 0; - nerrors += cklinks(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += new_links(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += ck_new_links(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += long_links(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += toomany(my_fapl, new_format) < 0 ? 1 : 0; - - /* Test new H5L link creation routine */ - nerrors += test_lcpl(my_fapl, new_format); - nerrors += test_move(my_fapl, new_format); - nerrors += test_copy(my_fapl, new_format); - nerrors += test_move_preserves(my_fapl, new_format); -#ifndef H5_NO_DEPRECATED_SYMBOLS - nerrors += test_deprec(my_fapl, new_format); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_self(envval, my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_pingpong(envval, my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_unlink_compact(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_closing(envval, my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_endian(new_format) < 0 ? 1 : 0; - nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0; - - /* tests for external link */ - nerrors += external_link_env(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_prefix(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_abs_mainpath(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_rel_mainpath(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_cwd(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_abstar(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_abstar_cur(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_reltar(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_chdir(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_set_elink_fapl1(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_set_elink_fapl2(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_set_elink_fapl3(new_format) < 0 ? 1 : 0; - nerrors += external_set_elink_acc_flags(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_set_elink_cb(my_fapl, new_format) < 0 ? 1 : 0; - -#ifdef H5_HAVE_WINDOW_PATH - nerrors += external_link_win1(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win2(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win3(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win4(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win5(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win6(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win7(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win8(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += external_link_win9(my_fapl, new_format) < 0 ? 1 : 0; -#endif - /* These tests assume that external links are a form of UD links, - * so assume that everything that passed for external links - * above has already been tested for UD links. - */ - if(new_format == TRUE) { - nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */ - nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ - } /* end if */ - - nerrors += ud_callbacks(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += ud_link_errors(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += lapl_udata(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += lapl_nlinks(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += linkinfo(my_fapl, new_format) < 0 ? 1 : 0; - - /* Misc. extra tests, useful for both new & old format files */ - nerrors += link_visit(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += link_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += obj_visit(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += obj_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0; - nerrors += obj_visit_stop(my_fapl, new_format) < 0 ? 1 : 0; - - /* Keep this test last, it's testing files that are used above */ - /* do not do this for files used by external link tests */ - nerrors += check_all_closed(my_fapl, new_format, EXTSTOP) < 0 ? 1 : 0; -#endif // 0 + test_move(my_fapl_id, new_format); + test_copy(my_fapl_id, new_format); } /* end for */ -#if 0 - /* New group revision feature tests */ - nerrors += corder_create_empty(fapl2) < 0 ? 1 : 0; -/* XXX: when creation order indexing is fully working, go back and add checks -* to these tests to make certain that the creation order values are -* correct. -*/ - nerrors += corder_create_compact(fapl2) < 0 ? 1 : 0; - nerrors += corder_create_dense(fapl2) < 0 ? 1 : 0; - nerrors += corder_transition(fapl2) < 0 ? 1 : 0; - nerrors += corder_delete(fapl2) < 0 ? 1 : 0; - nerrors += link_info_by_idx(fapl2) < 0 ? 1 : 0; - nerrors += delete_by_idx(fapl2) < 0 ? 1 : 0; - nerrors += link_iterate(fapl2) < 0 ? 1 : 0; - nerrors += open_by_idx(fapl2) < 0 ? 1 : 0; - nerrors += object_info(fapl2) < 0 ? 1 : 0; - nerrors += group_info(fapl2) < 0 ? 1 : 0; - nerrors += timestamps(fapl2) < 0 ? 1 : 0; - - /* Test new API calls on old-style groups */ - nerrors += link_info_by_idx_old(fapl) < 0 ? 1 : 0; - nerrors += delete_by_idx_old(fapl) < 0 ? 1 : 0; - nerrors += link_iterate_old(fapl) < 0 ? 1 : 0; - nerrors += open_by_idx_old(fapl) < 0 ? 1 : 0; - nerrors += object_info_old(fapl) < 0 ? 1 : 0; - nerrors += group_info_old(fapl) < 0 ? 1 : 0; - -#endif /* Close 2nd FAPL */ H5Pclose(fapl2_id); @@ -683,5 +818,9 @@ extern "C" void cleanup_links() { HDremove(FILENAME[0]); + HDremove(FILENAME[1]); } + + + |