summaryrefslogtreecommitdiffstats
path: root/c++/test/tlinks.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Squashed commit of the token_refactoring branch:Dana Robinson2020-01-161-2/+2
|
* Code improvementBinh-Minh Ribler2019-02-161-277/+9
| | | | | | | Description: Removed dead code and accidentally leftover code Platforms tested: Linux/64 (jelly) - very minor
* Adding a C++ wrapperBinh-Minh Ribler2019-02-141-12/+144
| | | | | | | | | | | | | Description: - Added a wrapper for H5Ovisit2 to class H5Object // Recursively visit elements reachable from this object. void visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t user_op, void *op_data, unsigned int fields); - Fixed various typos in documentation Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1011test)
* Add support for "make check-vol", along with a few minor cleanups, etc.Quincey Koziol2018-11-291-5/+0
|
* Fixed HDFFV-10458 partiallyBinh-Minh Ribler2018-07-171-3/+4
| | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Oget_info2 and H5Oget_info_by_name2. // Returns information about an HDF5 object. void getInfo(H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC) // Returns information about an HDF5 object, given its name. void getInfo(const char* name, H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) void getInfo(const H5std_string& name, H5O_info_t& objinfo, unsigned fields = H5O_INFO_BASIC, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
* Code improvementBinh-Minh Ribler2018-03-121-6/+7
| | | | | | | | | | Description: - Removed memory leaks caused by accidentally invoking p_get_member_type - Added the call to test_lcpl, missed previously Platforms tested: Linux/64 (jelly) Linux/ppc64 (ostrich) Darwin (osx1010test)
* HDFFV-10149 continuedBinh-Minh Ribler2018-03-121-9/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: - Moved the new wrappers committed on Mar 9: 43158f3bb352f374c31556a5d0dc463a09e0b32e to H5Location and renamed some of them for overloading. This is because the loc_id in the C APIs can be file, group, dataset, named datatype, and attribute. Previous implementation was wrong following some inaccurate C API reference manual. - Only the following wrappers are modified or added: + H5Lcreate_soft: changed name from newLink to link // Creates a soft link from link_name to target_name. void link(const char *target_name, const char *link_name,...) void link(const H5std_string& target_name,...) + H5Lcreate_hard: changed name from newLink to link // Creates a hard link from new_name to curr_name. void link(const char *curr_name, const Group& new_loc,...) void link(const H5std_string& curr_name, const Group& new_loc,...) // Creates a hard link from new_name to curr_name in same location. void link(const char *curr_name, const hid_t same_loc,...) void link(const H5std_string& curr_name, const hid_t same_loc,...) + H5Ldelete: modified existing functions to add 2nd argument // Removes the specified link from this location. void unlink(const char *link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) void unlink(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) - copyLink and moveLink were only moved from Group to H5Location, no change - Added class LinkCreatPropList - Added overloaded functions H5Location::createGroup to take a link creation property list Group createGroup(const char* name, const LinkCreatPropList& lcpl) Group createGroup(const H5std_string& name, const LinkCreatPropList& lcpl) - Added wrapper for H5Lget_info() to H5Location H5L_info_t getLinkInfo(const H5std_string& link_name,...) Platforms tested: Linux/64 (jelly) Linux/ppc64 (ostrich) Darwin (osx1010test)
* Added C++ wrappers - HDFFV-10149Binh-Minh Ribler2018-03-101-126/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,...) + H5Lcreate_hard: // Creates a hard link from new_name to curr_name. void newLink(const char *curr_name, const Group& new_loc,...) void newLink(const H5std_string& curr_name, const Group& new_loc,...) // Creates a hard link from new_name to curr_name in same location. void newLink(const char *curr_name, const hid_t same_loc,...) void newLink(const H5std_string& curr_name, const hid_t same_loc,...) + H5Lcopy: // Copy an object from a group of file to another. void copyLink(const char *src_name, const Group& dst,...) void copyLink(const H5std_string& src_name, const Group& dst,...) // Copy an object from a group of file to the same location. void copyLink(const char *src_name, const char *dst_name,...) void copyLink(const H5std_string& src_name,...) + H5Lmove: // Rename an object in a group or file to a new location. void moveLink(const char* src_name, const Group& dst,...) void moveLink(const H5std_string& src_name, const Group& dst,...) // Rename an object in a group or file to the same location. void moveLink(const char* src_name, const char* dst_name,...) void moveLink(const H5std_string& src_name,...) Platforms tested: Linux/64 (jelly) Linux/ppc64 (ostrich) Darwin (osx1010test)
* Various code cleanupBinh-Minh Ribler2017-12-041-13/+7
| | | | | | | | | | | Description: - Replaced H5Location::exists with H5Location::nameExists and marked H5Location::exists as deprecated. - Miscellaneous test cleanup for consistency. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* Purpose: Add new C++ wrappersBinh-Minh Ribler2017-03-141-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Iis_valid, H5Ps/get_nlinks, H5Tget_create_plist, H5Oopen, H5Oclose and H5Pset_virtual // Checks if the given ID is valid. static bool isValid(hid_t an_id); // Sets the number of soft or user-defined links that can be // traversed before a failure occurs. void setNumLinks(size_t nlinks) const; // Gets the number of soft or user-defined link traversals allowed size_t getNumLinks() const; // Returns a copy of the creation property list of a datatype. PropList getCreatePlist() const; // Opens an object within a group or a file, i.e., root group. hid_t getObjId(const char* name,...); hid_t getObjId(const H5std_string& name,...); // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; // Maps elements of a virtual dataset to elements of the source dataset. void setVirtual(const DataSpace& vspace, const char *src_fname,...); void setVirtual(const DataSpace& vspace, const H5std_string src_fname,...); Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Description:Binh-Minh Ribler2017-03-031-156/+156
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly) - very minor
* Purpose: Add new wrappersBinh-Minh Ribler2016-12-281-4/+4
| | | | | | | | | | | | | | Description: Added wrappers H5Location::exists() for H5Lexists. Added wrapper H5Object::objVersion() to return the header version of an HDF5 object. Added new class LinkAccPropList to be used by H5Location::exists() Added new exception: ObjHeaderIException for H5Object::objVersion() Rearranged source files in Makefile.am Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Description:Binh-Minh Ribler2016-10-191-18/+6
| | | | | | | | | | | | Removed obsolet macros from C++ API: H5_NO_NAMESPACE, H5_NO_STD, __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test) Jelly
* [svn-r29759] Purpose: Code improvementsBinh-Minh Ribler2016-04-221-3/+3
| | | | | | | | | | | | Description: - Changed object in catch statements to reference - Replaced old-style casts or reinterpret_cast with static_cast - Removed unused name H5Library::need_cleanup - Removed Exception::printError from documentation Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r28138] Add first support for _Bool and make hbool_t a "real" _Bool if ↵Jerome Soumagne2015-10-201-1/+1
| | | | | | | | | | | | | | available Fix tests accordingly and fix misuse of hbool_t in various places Fix initialization of H5Pgcpl/ocpl structs in property decoding routines Tested on: Linux/32 (jam) Linux/64 (platypus) Linux/PPC64 (ostrich) MacOSX/64 10.11
* [svn-r27768] Description:Quincey Koziol2015-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
* [svn-r27572] Removed VMS-specific code from the library.Dana Robinson2015-08-241-61/+0
| | | | | | | | | The only remaining code consists of a few floating-point tests that rely on pre-generated and checked-in VMS files. These have been left alone, even though they will not be possible to recreate, since testing VMS float behavior is still important. Tested on: h5committest
* [svn-r25632] Purpose: Fixed HDFFV-8852Binh-Minh Ribler2014-09-291-1/+1
| | | | | | | | | | | | | | | | Description: H5F_ACC_CREAT was included in the C++ API while the C library doesn't allow it yet. Possibly, in the future, but not now. In addition, the two flags H5F_ACC_RDONLY and H5F_ACC_RDWR were missing from the documentation, causing confusion that appending is not supported. Solution: - Removed H5F_ACC_CREAT from the function until the C library support it - Added H5F_ACC_RDONLY and H5F_ACC_RDWR to the comments to update the documentation Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r23427] Purpose: Fix bug HDFFV-8067Binh-Minh Ribler2013-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | Description: + The C++ test failed with the new PGI compilers versions 12.4 and 12.5 + An exception thrown by an internal function, which was called by a constructor, was not propagating to the test program during the stack unwinding, so it couldn't be caught by the test and the program terminated. + Various trials and errors indicated that the problem is where an STD string converted to a char* being passed to the internal function, but confirmation has not been found yet. It could be a compiler bug. Solution: + Added a try/catch in the constructor around the internal function and re-throw the exception when it is caught. This is a workaround. + Unrelated minor fixes: removed unused variables and MESSAGE's; commented out tvlstr.cpp/test_read_vl_string_attribute because it may be redundant, and commented out H5Tpkg.h inclusion because TEST_ALIGNMENT is not added yet and probably not necessary in the C++ API. Platforms tested: Linux/32 2.6 (jam) with PGI compilers Linux/32 2.6 (jam) with GNU compilers Linux/64 2.6 (koala)
* [svn-r20052] Description:Quincey Koziol2011-02-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up Coverity warnings, and fix some style issues: r19735: Fix for memory leak in test/mf found by valgrind. r19736: Fix memory leak in h5repack. The buffer in copy_objects, when copying the entire dataset at once, was not checked for the presence of a vlen, and vlen storage was never reclaimed. Added check and call to H5D_vlen_reclaim(). r19772: Change H5assert() to if (H5T_VLEN != src->shared->type || H5T_VLEN != dst->shared->type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype") r19774: removed unused priv. r19775: removed unused variables r19778: Fix memory leak comparing for variable length data types. r19834: Fixed memory leaks found by valgrind. Memory errors remain for another day. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on branch)
* [svn-r18335] Description:Binh-Minh Ribler2010-02-261-1/+1
| | | | | | | | | | Removed header file testhdf5.h from C++ tests to eliminate a non-standard problem on OpenVMS. It wasn't essential. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) Ray agreed to test on OpenVMS.
* [svn-r18197] Description:Quincey Koziol2010-01-301-2/+2
| | | | | | | | | Trim trailing whitespace from source code files with this command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
* [svn-r17690] Purpose: Code improvementBinh-Minh Ribler2009-10-201-0/+722
Description: Fixed CommonFG::getComment and CommonFG::getLinkval to provide default values for buffer size to improve usability. Added test file tlinks.cpp, which only contains test for getLinkval and will expand when C++ wrappers for H5L functions are implemented. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew)