summaryrefslogtreecommitdiffstats
path: root/c++/test/tlinks.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added C++ wrappersBinh-Minh Ribler2018-05-121-3/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: - Added the following wrappers to class H5::H5Location: + 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) + 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,...) - Added using statements to H5::Group for functions that need to be be in both classes, H5Location and CommonFG, until they can be removed. - Removed H5A wrappers from H5Location as they've been in H5Object. - Clean up deprecated items and updated comments. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
* C++ API improvementBinh-Minh Ribler2018-05-101-13/+7
| | | | | | | | | | | | | | | | | | | | Description: - Reorganized some exception classes to reflect the HDF5 object hierarchy and provide extendibility. DataSetIException -> LocationException -> Exception DataTypeIException -> LocationException -> Exception GroupIException -> LocationException -> Exception AttributeIException -> LocationException -> Exception FileIException -> GroupIException -> LocationException -> Exception - Added throwException() to these subclasses and use it in H5Location and H5Object member functions to throw an exception that is specific to the object that invokes the member function. Applications that catch the base exception can continue to do the same. - Many cleanup for inconsistencies in comments/headers. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
* Adding new C++ wrappersBinh-Minh Ribler2017-10-181-44/+35
| | | | | | | | | | | | | | | | Description: - Added overloaded wrappers for H5Oget_info and H5Oget_info_by_name // Retrieves information about an object void getObjectInfo(H5O_info_t *oinfo) const; void getObjectInfo(const char *name, H5O_info_t *oinfo, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; void getObjectInfo(const H5std_string& name, H5O_info_t *oinfo, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const; - Many miscellaneous cleanup for consistent appearance Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Merge pull request #537 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_8 to hdf5_1_8Larry Knox2017-05-251-6/+4
|\ | | | | | | | | | | | | * commit '2fb535ceff613dfd2a02b5b78ba7c3b5df95424b': Remove The HDF Group copyright header from 3rd party file. Remove java/COPYING file - no java directory in this branch. Update text in COPYING files in subdirectories to match changes to copyright notices in source files. Update Copyright notices in acsite.m4 and bin/yodconfigure that were overlooked by chkcopyright. Remove broken and unnecessary urls from comments in hl/fortran/src/H5IMcc.c and hl/src/H5IM.c. Commit bin/reconfigure changes to generated files. Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
| * Change copyright headers to replace url referring to file to belrknox2017-05-161-6/+4
| | | | | | | | removed and replace it with new url for COPYING file.
* | Purpose: Add new C++ wrappers (HDFFV-10156)Binh-Minh Ribler2017-05-181-0/+49
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: Added wrappers for H5Iis_valid, H5Ps/get_nlinks, H5Tget_create_plist, H5Oopen, and H5Oclose // 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 openObjId(const char* name,...); hid_t openObjId(const H5std_string& name,...); // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; // Gets general information about this file. void getFileInfo(H5F_info2_t& file_info) const; Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Add H5Lexists wrappersBinh-Minh Ribler2017-05-131-4/+4
| | | | | | | | | | | Description: Added wrappers H5Location::exists() for H5Lexists. Added new class LinkAccPropList to be used by H5Location::exists() Rearranged source files in Makefile.am Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* Description:Binh-Minh Ribler2017-04-111-154/+154
| | | | | | Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly)
* Merge/port changes from develop back to 1.8 for tools and cmakeAllen Byrne2017-03-291-1/+1
|
* Purpose: Fix HDFFV-9532Binh-Minh Ribler2016-10-231-10/+1
| | | | | | | | | | | | | Description: Removed obsolete macros from C++ API library and tests: H5_NO_NAMESPACE and __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Leave H5_NO_STD to consider retiring H5std_string first. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
* [svn-r29769] 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 Merged from trunk r29759 and r29766 Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
* [svn-r27685] Merge of r27572 from trunkDana Robinson2015-09-061-61/+0
| | | | | | | | | | Remove all VMS-specific code from the library. The exception is the VMS floating-point tests since those are special as VMS floats are odd. Those files will be considered separately. Fixes HDFFV-9495 Tested on: h5committest
* [svn-r25653] Purpose: Fixed HDFFV-4259Binh-Minh Ribler2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: - Used H5I_INVALID_HID instead of 0 to initialized member "id" in classes that represent HDF5 objects. For PropList, H5P_DEFAULT has to be used instead of H5I_INVALID_HID. - Added try/catch block to some dynamically allocating memory code and re-throw the bad_alloc exception with a message informing the location of the failure. (merged from trunk-r25640) Purpose: Fixed HDFFV-8852 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 (merged from trunk-r25632) Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
* [svn-r23485] Purpose: Fix bug HDFFV-8067Binh-Minh Ribler2013-03-291-1/+2
| | | | | | | | | | Description: Applied the fix for HDFFV-8067 and the minor cleanups from the trunk. Platforms tested: Linux/32 2.6 (jam) with PGI compilers Linux/32 2.6 (jam) with GNU compilers Linux/64 2.6 (koala) with ICC compilers SunOS 5.10 (emu)
* [svn-r20053] Description:Quincey Koziol2011-02-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r20052 from trunk to 1.8 branch: 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-r18409] Description:Binh-Minh Ribler2010-03-171-1/+1
| | | | | | | | | | | | | | Removed header file testhdf5.h from C++ tests to eliminate a non-standard problem on OpenVMS. It wasn't essential. Also, moved dsets.cpp from a standalone program into testhdf5.cpp to be consistent with the rest of the tests. Platforms tested: Linux/32 2.6 (jam) FreeBSD/64 6.3 (liberty) SunOS 5.10 (linew) Will ask Ray to test on OpenVMS.
* [svn-r18198] Description:Quincey Koziol2010-01-301-2/+2
| | | | | | | | | Trim trailing whitespace from source code files, with following command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
* [svn-r17695] 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)