Commit Graph

358 Commits

Author SHA1 Message Date
Binh-Minh Ribler
572bc474a6 Added C++ wrappers
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)
2018-05-12 12:39:42 -05:00
Binh-Minh Ribler
c32b738708 C++ API improvement
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)
2018-05-10 13:04:28 -05:00
Binh-Minh Ribler
01b3b7bf47 C++ API improvement
Description:
    - Added another argument, LinkCreatPropList& lcpl, to the CommonFG::createGroup()
      functions for the use of link creation property list.  The new argument has
      a default value.
        Group createGroup(const char* name, size_t size_hint = 0,
                    const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
        Group createGroup(const H5std_string& name, size_t size_hint = 0,
                    const LinkCreatPropList& lcpl = LinkCreatPropList::DEFAULT)
    - Removed memory leaks caused by accidentally invoking p_get_member_type
    (in H5CompType.cpp, user reported via email, maybe no jira issue)
    - Made H5Location::closeObjId static, so no object is needed to close an hdf5 id.
    - Added classes StrCreatPropList, LinkCreatPropList, AttrCreatPropList
      for the C property list classes H5P_STRING_CREATE, H5P_LINK_CREATE,
      and H5P_ATTRIBUTE_CREATE.
Platforms tested:
    Linux/64 (jelly)
    Linux/64 (platypus)
    Darwin (osx1010test)
2018-05-06 23:58:06 -05:00
Allen Byrne
e835063ebf Change CMake min to 3.10 2018-03-09 12:38:48 -06:00
Allen Byrne
ef4aa562dd HDFFV-10392,10393,01385 merge from develop 2018-01-22 11:56:54 -06:00
Allen Byrne
ef2ac07845 Update link target commands 2017-12-21 14:41:48 -06:00
lrknox
2c3bde7f74 Add assignment to get value from environment variable realtimeOutput.
Propagate changes to Makefile.ins with bin/reconfigure.
2017-12-04 16:54:09 -06:00
Binh-Minh Ribler
78ab45cb72 Adding new C++ wrappers
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)
2017-10-17 23:56:16 -05:00
Binh-Minh Ribler
d9e1393600 Addition to PR# 697
This test file was missing from the previous commit.
2017-10-06 14:10:20 -05:00
lrknox
7f758f2eea Merge branch '1.8/master' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into hdf5_1_8 2017-08-25 15:10:42 -05:00
M. Scot Breitenfeld
51b97cc02d generated reconfigure files for configure changes 2017-08-04 09:03:29 -05:00
lrknox
9a31b0748f Disable building of libdynlib* dynamically loaded plugin test libraries
on CYGWIN.
Added known problem entry to RELEASE.txt.
Set version for 1.8.19 release.
Barbara updated contents of README.txt file.
2017-06-14 12:26:55 -05:00
lrknox
16e0eb3c52 Moved libdynlib* plugin test libraries to noist_LT_LIBRARIES with added
flag '-rpath /nowhere' to stop them being installed while keeping them
from linking with libhdf5, etc.
Incremented version to 1.8.19-pre1 and ran bin/release to create tar
and zip files for testing.
2017-06-12 17:04:41 -05:00
Larry Knox
aab593f7d9 Merge pull request #537 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_8 to hdf5_1_8
* 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.
2017-05-25 16:19:11 -05:00
lrknox
00d423af60 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.
2017-05-24 16:30:58 -05:00
Binh-Minh Ribler
2bf8375001 Added test
Description:
    Added another test to invoke the Group constructor, taking an Attribute
    as a location.
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
2017-05-24 00:16:59 -05:00
Binh-Minh Ribler
f323a72861 Purpose: Add new C++ wrappers (HDFFV-10156)
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)
2017-05-18 13:40:20 -05:00
lrknox
583952ed15 Change copyright headers to replace url referring to file to be
removed and replace it with new url for COPYING file.
2017-05-16 10:16:12 -05:00
Binh-Minh Ribler
0f8f929e91 Merge pull request #502 in HDFFV/hdf5 from ~BMRIBLER/hdf5_1_8_bmr:hdf5_1_8 to hdf5_1_8
* commit '8b1a53896565cafca3795d139a37148f89bf928d':
  Add H5Lexists wrappers 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)
  Improvement of class hierarchy Description:     - Moved class Attribute to be derived from class H5Location instead of       IdComponent because an attribute id can be used as loc_id in C APIs.     - Copied wrappers of H5A APIs in H5Location into H5Object because H5A       functions do not take an attribute id as loc_id.  The original wrappers       will be deprecated in future releases.     - Revised comments Platforms tested:     Linux/32 2.6 (jam)     Linux/64 (platypus)     Darwin (osx1010test)
2017-05-15 09:13:25 -05:00
Binh-Minh Ribler
8b1a538965 Add H5Lexists wrappers
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)
2017-05-13 06:00:33 -05:00
lrknox
0ff30fa67c Move libdynlib* test lib files from lib_LTLIBRARIES to dyn_LTLIBRARIES
and other changes to Makefiles and config/conclude.am to eliminate
link errors with new libdynlib*_la_LDFLAGS which were added to stop
libdynlib* files linking to external libraries.
2017-05-10 13:54:18 -05:00
Binh-Minh Ribler
8df5c966e0 Improvement of class hierarchy
Description:
    - Moved class Attribute to be derived from class H5Location instead of
      IdComponent because an attribute id can be used as loc_id in C APIs.
    - Copied wrappers of H5A APIs in H5Location into H5Object because H5A
      functions do not take an attribute id as loc_id.  The original wrappers
      will be deprecated in future releases.
    - Revised comments
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2017-05-10 10:20:28 -05:00
Binh-Minh Ribler
bee3ca7429 Description:
Only format changes: mostly tabs vs. spaces
Platforms tested:
    Linux/64 (jelly)
2017-04-11 14:44:31 -05:00
Allen Byrne
ba2cfde1fd Merge/port changes from develop back to 1.8 for tools and cmake 2017-03-29 16:44:23 -05:00
Allen Byrne
78ea0a0c08 HDFFV-9875 Bring changes from develop branch 2017-02-06 15:30:08 -06:00
Allen Byrne
4f3f30e63d Update CMake required to version 3.2.2 2017-01-18 14:42:39 -06:00
lrknox
1974619efb Update shared object file numbers according to changes in v1.8.18 release.
Update autotools and libtool versions.
Run bin/reconfigure.
2016-11-01 13:30:48 -05:00
Binh-Minh Ribler
7f7248220a Purpose: Fix HDFFV-9532
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)
2016-10-23 10:59:44 -05:00
Allen Byrne
5a8914a6a7 HDFFV-9431: allow test to be run in unique vfd folder.
Pulled from trunk
2016-09-19 10:52:12 -05:00
Allen Byrne
d6d7e62d0b [svn-r30171] HDFFV-9939: convert cmake copy commands to reduce issue with too long command lines on some platforms.
Also, refactor hl/tools/gif3h5 cmake files.
JAVA-1920: add plugin test with plugin that depends on hdf5
2016-07-12 12:16:00 -05:00
Binh-Minh Ribler
91890eb281 [svn-r29787] Purpose: Add new wrapper
Description:
    Added wrapper for H5Tset_nbit: void DSetCreatPropList::setNbit() const.
    Merged from trunk r29786.
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2016-04-25 01:30:42 -05:00
Binh-Minh Ribler
c036aa1575 [svn-r29784] Purpose: Code improvement
Description:
    - Removed ArrayType::rank and ArrayType::dimensions and modified the methods
      ArrayType::getArrayNDims and ArrayType::getArrayDims to always call the
      C functions to get the rank and dimensions.
    - Overloaded ArrayType::getArrayNDims and ArrayType::getArrayDims to provide
      const version and marked the non-const version deprecated.
    Merged from trunk r29782.
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2016-04-24 15:30:27 -05:00
Binh-Minh Ribler
d490c837eb [svn-r29769] Purpose: Code improvements
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)
2016-04-22 17:42:22 -05:00
Binh-Minh Ribler
58803d0832 [svn-r29765] Purpose: Code cleanup
Description:
    - Removed many warnings:
        warning: use of old-style cast
        warning: enumeration value ‘H5D_VIRTUAL’ not handled in switch
        warning: comparison between signed and unsigned
      There are others of the same warnings and they will be taken care of
      in the next release.
    - Made some code reuse between overloads
    Merged from trunk r29340.
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2016-04-22 13:58:08 -05:00
Binh-Minh Ribler
5aea4260b5 [svn-r29761] Purpose: Add function
Description:
    Added member function ArrayType::operator= because ArrayType has
    pointer data members.
    Merged from trunk r29306.
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2016-04-22 10:26:39 -05:00
Binh-Minh Ribler
4d6662e86c [svn-r28926] Purpose: Fix user reported problem
Description:
    User Adam Rosenberger reported a failure when using the member function
    AbstractDs::getArrayType().  This problem was caused by missing
    initialization of the ArrayType's members in some cases.
Solution:
    - Added ArrayType::setArrayInfo() to retrieve rank and dimensions of
      an array and store them in memory for easy access.
    - Re-factored a few functions to use the new function.
    - We'll give him 1.8.16 patch
    Merged from trunk r28905
Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2016-01-18 10:06:51 -05:00
Binh-Minh Ribler
a66eef2cf3 [svn-r27989] Purpose: Partial fix of issues HDFFV-9169 and HDFFV-9167
Description:
    Merged from trunk r27961:

    Added class ObjCreatPropList in "H5OcreatProp.[h/cpp]"

    Added wrappers for H5P[s/g]et_attr_phase_change and H5P[s/g]et_attr_creation_order

    // Sets attribute storage phase change thresholds.
    void setAttrPhaseChange(unsigned max_compact = 8, unsigned min_dense = 6)

    // Gets attribute storage phase change thresholds.
    void getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense)

    // Sets tracking and indexing of attribute creation order.
    void setAttrCrtOrder(unsigned crt_order_flags)

    // Gets tracking and indexing settings for attribute creation order.
    unsigned getAttrCrtOrder()

Platforms tested:
    Linux/32 2.6 (jam)
    Linux/64 (platypus)
    Darwin (osx1010test)
2015-10-07 10:35:21 -05:00
Dana Robinson
67678e9a3f [svn-r27685] Merge of r27572 from trunk
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
2015-09-05 21:05:27 -05:00
Allen Byrne
7470e8114d [svn-r27532] Merge of CMake dual-binary changes from CMake branch to 1.8
Tested: local linux (CMake branch has been tested on Windows)
2015-08-19 15:35:08 -05:00
Mohamad Chaarawi
db4acaf3ab [svn-r27165] Merge 27133 & 27158 from trunk:
- Add a new attribute function characterstic for format:
   * H5_ATTR_FORMAT(X,Y,Z)  __attribute__((format(X, Y, Z)))
 - Rename UNUSED attribute characterstic to H5_ATTR_UNUSED.
 - Rename NORETURN attribute characterstic to H5_ATTR_NORETURN

tested with h5committest.
2015-06-08 16:30:38 -05:00
Binh-Minh Ribler
a586729afb [svn-r26741] Description:
Per user Jason Newton request, the following constructor is added:
        H5File(hid_t existing_id);
    Also, fixed H5File::openFile to close current file first before re-using
    the object.
Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2015-04-06 16:20:11 -05:00
Binh-Minh Ribler
2a2a79742d [svn-r26731] Purpose: Fixed HDFFV-7947
Description:
    When copy constructor or constructor that takes an existing id is invoked,
    the C ref counter stays the same but there is an extra C++ object which
    later is destroyed and may cause the HDF5 id to be closed prematurely. The
    C++ library needs to increment the ref counter in these situations, so that
    the C library will not close the id when it is still being referenced.

    However, the incrementing of ref count left some objects opened at the end
    of the program, perhaps, due to compiler's optimization on cons/destructors.    The constructor, that takes an existing id, needs to increment the counter
    but it seems that the matching destructor wasn't invoked.  The workaround
    is to have a function for each class that has "id" that only sets the id
    and not increment the ref count for the library to use in these situations.
    These functions are "friend" and not public.

    The friend functions are:
        void f_Attribute_setId(Attribute *, hid_t)
        void f_DataSet_setId(DataSet *, hid_t)
        void f_DataSpace_setId(DataSpace *, hid_t)
        void f_DataType_setId(DataType *, hid_t)

    Merged from trunk: r26655
Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam Intel 15.0)
    SunOS 5.11 (emu)
2015-04-05 22:52:35 -05:00
Binh-Minh Ribler
150b85cc44 [svn-r26730] Purpose: Adding new wrappers (HDFFR-9167 partially)
Description:
    Added wrappers for C functions H5P[s/g]et_libver_bounds and wrappers
    for getting object header version

      // Sets bounds on versions of library format to be used when creating
      // or writing objects.
      void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;

      // Gets the current settings for the library version format bounds.
      void getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const;

      // Returns the object header version of an object in a file or group,
      // given the object's name.
      unsigned childObjVersion(const char* objname) const;
      unsigned childObjVersion(const H5std_string& objname) const;

    Merge from trunk r26643

Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam Intel 15.0)
    SunOS 5.11 (emu)
2015-04-05 13:30:20 -05:00
Binh-Minh Ribler
743686ebe1 [svn-r26729] Purpose: Fix bugs
Description:
    - Changed DataType::operator= to simply copy the id of rhs instead of
      calling H5Tcopy because, when the operator= is invoked, a different
      datatype id is created and it won't have the same characteristics as
      rhs', specifically, if the rhs represents a named datatype, "this"
      would still be a transient datatype.
    - Added a DataType constructor that takes a PredType object, and this
      constructor will cause H5Tcopy to generate another datatype id, from a
      predefined datatype.
    - Fixed various mistakes in tests.
    - Fixed typo that caused failure on Windows.
    Merged from trunk r26640 and r26462

Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam/gnu and jam/icc 15)
    SunOS 5.11 (emu)
2015-04-04 23:12:08 -05:00
Larry Knox
083ef61b05 [svn-r26728] Merge trunk reviwions 26669 and 26670.
Removed from configure.ac VPATH section, LONE_COLON check and checks for redundant addition of /usr/include and /usr/lib to compile flags, with reconfigure.

Tested h5committest
2015-04-04 10:27:14 -05:00
Binh-Minh Ribler
2c3ab21057 [svn-r26727] Purpose: Fix warnings HDFFV-8658 cont.
Description:
    Fixed many type conversion warnings and unused variables.

    Merged from trunk r26458, but also combined the fix in r26695 (dsets.cpp)
    to avoid test failure, that was undetected before committing to trunk until
    r26695.
Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam)
    SunOS 5.11 (emu)
2015-04-04 02:47:49 -05:00
Allen Byrne
025d90f573 [svn-r26697] HDFFV-9131: Remove obsolete/unneeded sections. 2015-04-01 15:27:26 -05:00
Allen Byrne
7ebd4c8311 [svn-r26600] Fix CMake target calls to add new parameter 2015-03-26 08:51:01 -05:00
Jerome Soumagne
2bb934857b [svn-r26582] Merge r26509 from trunk
Run reconfigure after merges from autotools_rework branch
2015-03-25 13:07:02 -05:00
Dana Robinson
85beb272c5 [svn-r26395] Merges r26329 from trunk
Removed the configure option that allows selective disabling of individual
internal filters (fletcher32, shuffle, etc.).

This feature mucked up the code with a lot of #ifdefs, saved very little
space and was not scalable to a general scheme for library size reduction.
We've decided to remove the feature while we investigate a more general
scheme for decreasing the library size.

Fixes: HDFFV-9086

Tested on: h5committest
2015-03-08 23:24:02 -05:00