Compare commits

...

904 Commits

Author SHA1 Message Date
Elena Pourmal
68d88b2cf7 [svn-r9304] Purpose: Release maintenance
Description: I changed the version number to 1.6.3

Solution: Ran bin/h5vers -s 1.6.3 on eirene

Platforms tested:

Misc. update:
2004-09-22 11:39:14 -05:00
Albert Cheng
047be918c8 [svn-r9303] Updated the Fortran Sample program to use the INCLUDE instead of the
USE statement.
2004-09-22 11:04:24 -05:00
Albert Cheng
6481d1a82e [svn-r9302] Updated with Sample MPIO programs. 2004-09-22 09:42:20 -05:00
Albert Cheng
9636e858cb [svn-r9301] Updated with LLNL machine information. 2004-09-22 08:37:34 -05:00
Albert Cheng
ccbfd8d259 [svn-r9300] Updated with Tflop information. 2004-09-22 08:21:58 -05:00
Albert Cheng
6e9fcb709f [svn-r9299] Updated with LANL machines information. 2004-09-22 08:13:53 -05:00
Frank Baker
f8d297734b [svn-r9296] Description:
Added 4 new Fortran90 subroutines.
Platforms tested:
    Mozilla
2004-09-21 17:15:20 -05:00
Elena Pourmal
a4d1dde47a [svn-r9295] Purpose: Maintenance before the release
Description: Added information about new Fortran functions;
             Documented that Windows installation instruction files
             for F90 and C++ were deleted from the distribution.

Solution:

Platforms tested:

Misc. update:
2004-09-21 17:13:14 -05:00
Frank Baker
243001c468 [svn-r9294] Description:
Fill in sections:
        Bug Fixes since...  -- Documentation
        Documentation -- HDF5 Library documentation
        Supported Configuration Features Summary
    Minor copy edits (spelling corrections only)
2004-09-21 16:47:43 -05:00
Frank Baker
69b9488a31 [svn-r9293] Purpose:
Correct release number in header (1.6. ==> 1.6.3)
2004-09-21 16:26:25 -05:00
Elena Pourmal
e9affeefa5 [svn-r9292] Purpose: Maintenance
Description: Removed entries for
             INSTALL_Windows_withF90.txt INSTALL_Windows_withcpp.txt
             since files were deleted from CVS.

Solution:

Platforms tested: arabica with bin/chkmanifest

Misc. update:
2004-09-21 16:26:02 -05:00
Frank Baker
5ae98779b0 [svn-r9291] Description:
Add links to HDF5 High Level APIs and to HDF5 high level RM
    Add JHI hyperlink
    Other minor formatting adjustments and copy edits
Platforms tested:
    Mozilla
2004-09-21 16:24:54 -05:00
Elena Pourmal
cb9f6774a4 [svn-r9290] Purpose: Maintenance
Description: Removed instruction files for Windows that are
             not needed anymore.  F90 and C++ instrucitons are in the
             INSTALL_Windwos.txt file now.

Solution:

Platforms tested:

Misc. update: Updated MANIFEST file will be cheked in after this one.
2004-09-21 16:23:27 -05:00
Elena Pourmal
2e9f69a5b3 [svn-r9289] Purpose: Maintenance
Description: Updated "Tools" section under "Fixed bugs" section.

Solution:

Platforms tested:

Misc. update:
2004-09-21 11:14:13 -05:00
Elena Pourmal
099ce40c91 [svn-r9288] Purpose: Maintenance
Description: Added information about two sets of SZIP binaries:
             with encoder and without encoder.
2004-09-21 10:51:33 -05:00
John Mainzer
8a57915e8f [svn-r9287] Purpose:
Add recomendation that users add the "-qxlf90=autodealloc" flag to
FFLAGS when building parallel on the IBM SP platform.


Description:

See above.


Solution:

Added the suggestion.  Also cleaned up a few minor typos in passing.


Platforms tested:

none needed -- documentatin change only.


Misc. update:
2004-09-20 16:28:17 -05:00
Frank Baker
363ef14909 [svn-r9286] Purpose:
h5dump -- Add 5 new options
              Add notes prefacing the 4 subsetting options
                   (start, count, stride, block)
Platforms tested:
    Mozilla
2004-09-19 20:24:54 -05:00
Frank Baker
144aecbf93 [svn-r9285] Purpose:
Moved the newly-added "C++ Design Spec" to the
    "HDF5 Library Development Documentation" section of the index page.
Platforms tested:
    Mozilla

Misc. update:
2004-09-19 18:21:53 -05:00
Frank Baker
48b492d4d7 [svn-r9284] Purpose:
Add link to the first draft of the "C++ Design Specification"
    (which is posted on the HDF5 website at
    HDF5/doc_resource/cpplus/cpp_Design_040912.pdf)
Platforms tested:
    Mozilla, Adobe Acrobat Reader, Apple Preview
2004-09-19 18:09:17 -05:00
Frank Baker
3e6fec59f7 [svn-r9283] Description:
Move "Printer-friendly docs" up a bit for improved visibility
    Link HDF logo to HDF website
    Minor modification in notes regarding docs served from NCSA
        (and added such a note to the new UG entry)
    Removed the link to the HDF5 Ref Manual from the "HDF5 and Foreign
        Langauges" heading since that link is no longer appropriate
Platforms tested:
    Mozilla
2004-09-19 17:17:41 -05:00
Frank Baker
16a1163f6b [svn-r9282] Purpose:
Updated "Last modified" line to indicate that the document was
        last modified in July 2004
Platforms tested:
    Mozilla
2004-09-19 17:14:06 -05:00
Frank Baker
23ed135d0a [svn-r9281] Purpose:
Updated docs footer for "Release 1.6.3, September 2004"
Platforms tested:
    Mozilla
2004-09-19 15:56:31 -05:00
Frank Baker
51397b43ba [svn-r9280] Purpose:
Update heading and footer for "Release 1.6.3, September 2004"
Platforms tested:
    Mozilla

Misc. update:
2004-09-19 15:54:30 -05:00
Frank Baker
17bcf55a5b [svn-r9279] Description:
Updated nav bar, with pointer to RM PDF
    Updated docs footer for "Release 1.6.3, September 2004"
Platforms tested:
    Mozilla
2004-09-19 15:51:20 -05:00
Frank Baker
8844285732 [svn-r9278] Purpose:
Footer.lbi -- Change docs footer to
        "Describes HDF5 Release 1.6.3, September 2004"
    NavBar_RM.lbi -- Add link to Ref Manual PDF in RM navigation bar
Platforms tested:
    Mozilla
2004-09-19 15:46:09 -05:00
Frank Baker
55caa464ca [svn-r9277] Purpose:
Formatting update for PDF version of the HDF5 Reference Manual
    for Release 1.6.3.
Platforms tested:
    HTMLdoc, Adobe Acrobat Reader, Mozilla

Misc. update:
2004-09-19 14:16:40 -05:00
Frank Baker
6a22c19d24 [svn-r9276] Purpose:
Formatting update for PDF version
Platforms tested:
     HTMLdoc, Adobe Acrobat Reader, Mozilla
2004-09-19 14:14:17 -05:00
Frank Baker
e9af913810 [svn-r9275] Purpose:
Formatting updates enabling generation of the PDF version
    of the HDF5 Reference Manual for Release 1.6.3.
Platforms tested:
    HTMLdoc, Adobe Acrobat Reader, Mozilla
2004-09-19 14:06:04 -05:00
Xuan Bai
1ff51be807 [svn-r9270] Purpose:
Update.

Description:
Correct some typos in the previous version.

Solution:

Platforms tested:
Not necessay.

Misc. update:
2004-09-17 14:15:25 -05:00
MuQun Yang
a7f691dc8e [svn-r9269] Purpose:
Add information about windows improvement in the release.txt.

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-16 16:34:14 -05:00
Frank Baker
8ebc0cd7f9 [svn-r9266] Purpose:
Removed the Supported Configurations table; it will be revised
    and reinserted prior to the release.  Changes made to the RELEASE.txt
    copy of the table by developers up to this moment will be captured
    in this revision.
2004-09-15 18:06:52 -05:00
Quincey Koziol
7228f44127 [svn-r9265] Purpose:
Cleanup

Description:
    Move bug description into reverse chronological order.
2004-09-15 13:33:09 -05:00
Elena Pourmal
8552b3e571 [svn-r9263] Purpose: Maintenance for 1.6.3 third round of testing
Description: Created test tar ball and changed version to 1.6.3-pre4
             using bin/h5vers script on eirene

Solution:

Platforms tested:

Misc. update:
2004-09-15 12:25:03 -05:00
John Mainzer
a3381d37d8 [svn-r9262] Purpose:
Update release_docs/RELEASE.txt to describe options for dealing
   with installations which insert extra text in output, thereby
   breaking tests which function by comparing output with an exemplar.

   Also update bug fix list for parallel I/O mode confusion bug.


Description:

   See above.


Solution:

   Added discussion of this possible problem, and listed two possible
   solutions:

   1) "setenv HDF5_Make_Ignore yes" and then score "failed" tests
      by hand.

   2) Use the RUNSERIAL environment variable to use a filter script
      to filter out the extra text.


Platforms tested:

   None needed.


Misc. update:
2004-09-15 11:34:37 -05:00
Quincey Koziol
18ba9f93ba [svn-r9260] Purpose:
Bug fix

Description:
    Correct leftover issue from recent changes to dataset region reference
which occurred when 1.4 backward compatibility is turned on.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/1.4 compat
    Configuration not tested by h5committest
2004-09-14 22:14:18 -05:00
Quincey Koziol
b45920cb8b [svn-r9259] Purpose:
Code cleanup

Description:
    Add a couple of new test files to the list of files to clean.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-09-14 22:12:08 -05:00
Frank Baker
16e904e22a [svn-r9255]
Purpose:
    Correct oversight in Release 1.6.0 "New Functions" list.
Description:
    Add H5Pget/set_fclose_degree to Release 1.6.0's "New Functions."
        (Contributes to closing Bugzilla entries 188 and 190.)
    Move H5set_free_list_limits to correct location in same 1.6.0 list.
Platforms tested:
    Mozilla
2004-09-14 12:36:53 -05:00
Frank Baker
5da54649fb [svn-r9254] Purpose:
Fix errors in H5Pget_fclose_degree and H5Pset_fclose_degree.
    Clarify H5Pset_filter and H5Pset_szip.
Description:
    H5Pget_fclose_degree and H5Pset_fclose_degree
        Functions index at top of page:`
            Move H5Pget/set_fclose_degree into "File Access Properties."
            Remove "File Close Properties" section.
        H5Pget_fclose_degree -- Correct parameter description.
        (Contribute to closing Bugzilla entries 188 and 190.)
    H5Pset_filter -- Clarification of terms
    H5Pset_szip -- Add note regarding H5Pset_szip failure if SZIP encoding
       	is disabled in the available copy of the SZIP library.
    Other minor formatting and copy edits.
Platforms tested:
    Mozilla
2004-09-14 12:33:11 -05:00
Pedro Vicente Nunes
1dd5d9e44a [svn-r9253] Purpose:
added info about h5repack and the new h5dump features

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-14 11:12:53 -05:00
Elena Pourmal
e0ef078a93 [svn-r9252] Purpose: Maintenance for the hdf5-1.6.3 release
Description: Updated compilers and system information for the tested platforms.

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-09-14 10:53:02 -05:00
Quincey Koziol
48339a4e26 [svn-r9251] Purpose:
Bug fix

Description:
    Correct typedef for dataset region references to avoid struct alignment
issues on Crays.

Solution:
    Change the typedef for hdset_reg_ref_t from a struct to an array of
unsigned char's of the correct size and propagate the appropriate adjustments
around the code.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Linux 2.4 (verbena) w/fortran
    Cray T90 (subzero) w/fortran
    Cray SV1 (wind) w/fortran & parallel
    Cray T3E (cyclone) w/fortran & parallel
2004-09-14 00:04:28 -05:00
Quincey Koziol
6a9aebbc41 [svn-r9249] Purpose:
Update release notes for Cray T90 support
2004-09-13 23:12:26 -05:00
Quincey Koziol
3a7e970908 [svn-r9248] Purpose:
Update manifest with new files for C++ reference manual directory.
2004-09-13 21:59:19 -05:00
Frank Baker
eea7dc291e [svn-r9247] Purpose:
Add Dependencies and Makefile.in in the directory
    hdf5/doc/html/cpplus_RM/header_files/.
Platforms tested:
    eirene
2004-09-13 14:27:20 -05:00
Frank Baker
1f7898a283 [svn-r9246] Purpose:
Add directory hdf5/doc/html/cpplus_RM/header_files to
    hdf5/doc/html/cpplus_RM/Makefile.in
    and remove same directory from the "public files" list.
Platforms tested:
    eirene
2004-09-13 14:26:29 -05:00
Frank Baker
9af04a05bb [svn-r9245] Purpose:
Add directory hdf5/doc/html/cpplus_RM/header_files to configure.
Platforms tested:
    eirene
2004-09-13 14:24:53 -05:00
Raymond Lu
7dd3ed2f7b [svn-r9244] Purpose: Update document
Misc. update:  Update it for TeraGrid support.
2004-09-13 09:36:42 -05:00
Frank Baker
7db64a9d02 [svn-r9242] Purpose:
Add the directory hdf5/doc/html/cpplus_RM/.
Platforms tested:
    eirene
2004-09-10 16:30:02 -05:00
Frank Baker
f58d981d6f [svn-r9241] Purpose:
Cleanup the file, to make it easier to read.
Platforms tested:
    eirene
2004-09-10 16:27:18 -05:00
Xuan Bai
52b9f5c4f7 [svn-r9240] Purpose:
Bug fix.

Description:
I renamed the SZIP-encode-checking environment variable from H5_SZIP_CAN_ENCODE to HDF5_SZIP_ENCODE.  But I forgot to update the repacktest.bat batch file.  Now repacktest.bat is updated.

Solution:

Platforms tested:
Not necessary.
(Already tested with Visual C++ 6.0 on XP, but forgot to update it into all.zip last time).
(I also checked with Elena before this check-in, and she said OK.  Also this update will not effect any tests under Unix.)

Misc. update:
2004-09-09 22:15:14 -05:00
Frank Baker
8a82aa889f [svn-r9238] Description:
Add Dependencies and Makefile.in in hdf5/doc/html/cpplus_RM/.`
2004-09-09 14:52:43 -05:00
Frank Baker
f422ba9c98 [svn-r9237] Description:
Add C++ RM directory (hdf5/doc/html/cpplus_RM/) and files contained
    therein to the Makefile.in structure.
    Add hdf5/doc/html/cpplus_RM/Dependencies.
2004-09-09 14:48:09 -05:00
Elena Pourmal
518d5ae6a8 [svn-r9236] Purpose: Maintenance for the second round of testing
Description: I created a tar ball and changed version to 1.6.3-pre3

Solution: run bin/h5vers on eirene

Platforms tested: eirene

Misc. update:
2004-09-09 09:38:36 -05:00
Albert Cheng
c7364155af [svn-r9235] Purpose:
Shrink HDF5 parallel test (folded what Kent has done in v1.7 to v1.6.)

Description:
Previously the collective chunk IO tests created and opened four HDF5 files;
it turned out that all collective chunk IO tests can use one file for testing.

Solution:
To use one file for all collective chunk IO tests with trunc option to be set in
H5Fcreate.

Platforms tested:
eirene (no need to use h5committest)
2004-09-09 09:21:01 -05:00
Frank Baker
5bf2422ec6 [svn-r9233] Purpose:
A better sample cause of the potential H5Dcreate failure.
    (An ammendment to the immediately preceding checkin.)
Platforms tested:
    Mozilla
2004-09-08 18:00:51 -05:00
Frank Baker
85f1a65414 [svn-r9232] Purpose:
H5Dcreate may fail if there has been an error in setting up the DCPL.
Description:
    To make sure that it is well noted in Relelase 1.6.3, this is a
    first cut at a generalized description of this potential failure.
    An improved description of the problem remains on the "To Do" list.
Platforms tested:
    Mozilla
2004-09-08 17:40:19 -05:00
Frank Baker
b7ee471d77 [svn-r9230] Description:
H5T_conv_t (appears in H5Tregister description) -- changed datatype
        of the nelmts parameter
    H5Tconvert -- changed datatype of the nelmts parameter
Platforms tested:
    Mozilla
2004-09-08 17:25:07 -05:00
Albert Cheng
03fcb6d13e [svn-r9228] Purpose:
Bug fix.

Description:
The patch for running XML test script had undefined variables that
pmake (IRIX64 native make) would not tolerated.  It is bad to duplicate
codes too.

Solution:
Replaced all the duplicated code with recursive call of make with
a redefined TEST_SCRIPTS.  This has the problem of not calling
the XML tests by default but the XML tests failed in some platforms
including the IRIX64.  This solution has the same effect as before
but cleaner.  Long term fix should be done in h5dump or the XML test
scripts.

Platforms tested:
H5committested.  Also in modi4 using pmake.

Misc. update:
2004-09-08 15:42:09 -05:00
Xuan Bai
49431e72f8 [svn-r9227] Purpose:
Update.

Description:
As HDF5 Fortran DLL does not work with DEC Fortran 6.0, so we do not need to build HDF5 Fortran DLL related projects anymore.

Solution:
Modified hdf5build.bat batch file so HDF5 Fortran DLL related projects will not be built.

Platforms tested:
Minor update, test is not necessay.

Misc. update:
2004-09-08 15:10:17 -05:00
Xuan Bai
9b4a772bae [svn-r9226] Purpose:
Update.

Description:
Update the installation documentation for the following sections:
1. Removed all HDF5 Fortran DLL related information as HDF5 Fortran DLL does not work with DEC Fortran 6.0 at current time.
2. Added a section to described how to test HDF5 C examples with testExamples.bat batch file.
3. Rename H5_SZIP_CAN_ENCODE environment variable as HDF5_SZIP_ENCODE as this environment variable is very easy to get confused with the H5_SZIP_CAN_ENCODE macro in H5pubconf.h.
4. Add some explaination in those sections which may get users confused.

Solution:

Platforms tested:
Not necessary.

Misc. update:
2004-09-08 14:45:37 -05:00
Xuan Bai
9619e0c62a [svn-r9225] Purpose:
New Feature and Update.

Description:
1. Updated installhdf5lib.bat file so that libtest_fortran.lib and libtest_fortrand.lib will NOT be installed;
2. Updated the project settings for projects in HDF5 C examples:
   To be consistant with other HDF5 windows project settings:
   1) replaced zlib.lib in Object/library modules with environment variable HDF5_EXT_ZLIB
   2) replaced szlib.lib in Object/library modules with environment variable HDF5_EXT_SZIP
   Also, to prevent the compiler from failing to find hdf5.lib/hdf5d.lib when HDF5 library has been removed from the original folders, added the installed library hdf5lib path in the Additional library path.
3. Added a new batch file testExamples.bat under hdf5\examples directory for the purpose of testing HDF5 C examples.  An expected C examples tests output file testExample_exp_output.txt was aslo added.

Solution:

Platforms tested:
Visual C++ 6.0 on Windows XP.

Misc. update:
2004-09-08 14:39:40 -05:00
Frank Baker
9de008dcdf [svn-r9223]
Purpose:
    Add h5iget_file_id_f
Platforms tested:
    Mozilla
2004-09-08 12:27:14 -05:00
Albert Cheng
70d3e2cb5b [svn-r9222] Purpose:
Improvement

Description:
Lots of warnings about long long type being a C99 feature.
We want to use the long long type when available and want
to move to C99 standard anyway.
Changed the Version 6 compiler to use -c99 instead of the
old -std1 (C89 only).

Platforms tested:
At LANL QSC machine.
2004-09-08 12:01:44 -05:00
John Mainzer
9b82f95005 [svn-r9219] Purpose:
Fix configure bug that appears on SDSC DataStar


Description:

Two cached "sizeof"s in ./config/powerpc-ibm-aix5.x cause builds
on SDSC Datastar to choke.


Solution:

Comment out the offending "sizeof"s.  Included comments indicating
the reason for the change.


Platforms tested:

copper and SDSC DataStar


Misc. update:

n/a
2004-09-07 15:47:38 -05:00
Pedro Vicente Nunes
bf22056ecd [svn-r9217] Purpose:
bug fix

Description:

The H5O_mtime_decode function was not handling properly the case for the
Code Warrior compiler

Solution:

Platforms tested:
Code Warrior

Misc. update:
2004-09-07 14:42:35 -05:00
Pedro Vicente Nunes
1802494959 [svn-r9216] Purpose:
some text formatting

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-07 13:18:48 -05:00
Pedro Vicente Nunes
17d65263b9 [svn-r9214] Purpose:
added a note about the get_native_integer change

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-07 13:13:34 -05:00
Pedro Vicente Nunes
8798e30eef [svn-r9211] Purpose:
bug fix
add a new test for the native types test



Description:

on the Cray SV1 an INT type was wrongly converted to a SHORT type
by the get_native_integer function

Choose the type based on the precision; this is to support cases
like the Cray SV1, where the size of short is 8 but precision is 32
 (e.g an INT (size 8, prec 64) would be converted to a SHORT
   (size 8, prec 32) if the size was the deciding factor)



   CVS: [describe the bug, or describe the new feature, etc]

   Solution:
   CVS: [details about the changes, algorithm, etc...]
   CVS: [Be as detail as you can since your own explanation is
   CVS: better than others guessing it from the code.]

   Platforms tested:
   linux
   solaris
   aix


Description:

Solution:

Platforms tested:

Misc. update:
2004-09-07 11:40:32 -05:00
Pedro Vicente Nunes
c468f78ec1 [svn-r9210] Purpose:
bug fix

Description:

on the Cray SV1 an INT type was wrongly converted to a SHORT type
by the get_native_integer function

Choose the type based on the precision; this is to support cases
like the Cray SV1, where the size of short is 8 but precision is 32
 (e.g an INT (size 8, prec 64) would be converted to a SHORT
  (size 8, prec 32) if the size was the deciding factor)




Solution:

Platforms tested:
linux
solaris
aix
cray sv1


Misc. update:
2004-09-07 11:39:17 -05:00
Xuan Bai
8976c88c71 [svn-r9207] Purpose:
Minor bug fix.

Description:
h5repack testing batch file repacktest.bat has a minor bug.   This minor bug causes some HDF5 repack testing failures when only gzip is disabled.

The failure reasons is that we only checked whether szip or szip encoder is enabled for the following two tests:
   h5repack test_deflate.h5 -f dset_deflate:SZIP=8,NN
   h5repack test_szip.h5 -f dset_szip:GZIP=1

These two tests should also be skipped when gzip is disabled.

Solution:
Add Checking whether gzip is disabled for the above two tests.  If gzip is disabled, skip the above two tests.

Platforms tested:
Visual C++ 6.0 on Windows 2000 and XP for the following gzip/szip combinations:
1. both gzip and szip enabled
2. only gzip is disabled
3. both gzip and szip are disabled
4. only szip with decoding is disabled.

Misc. update:
h5tinit.c
2004-09-03 16:37:47 -05:00
Xuan Bai
2a8dc0a135 [svn-r9206] Purpose:
Update.

Description:
Add a section in preconditions to ask use uncheck the "TAR file smart CR/LF conversions" option in WinZip setting to prevent some h5dump "false" testing failures.

Solution:

Platforms tested:

Misc. update:
2004-09-03 15:44:32 -05:00
Pedro Vicente Nunes
e9c038fcff [svn-r9205] Purpose:
updated some commnents regarding the latest cray bug fix

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-03 14:29:21 -05:00
Pedro Vicente Nunes
abed0bd5a0 [svn-r9202] Purpose:
bug fix

changed some names of the datsets for the h5repack tests

Description:
the dataset region reference data was not portable between the Cray T3E and other machines



Solution:
this was due to the fact that the  buffer to store the heap ID and index was using a sizeof(int) for its
size

 4 is used instead of sizeof(int) to permit portability between
   the Crays and other machines (the heap ID is always encoded as an int32 anyway)


Platforms tested:
Cray T3E (read data from linux)
linux
solaris
aix



Misc. update:
2004-09-03 14:18:25 -05:00
Pedro Vicente Nunes
a266107f0d [svn-r9201] Purpose:
bug fix

Description:
the dataset region reference data was not portable between the Cray T3E and other machines



Solution:
this was due to the fact that the  buffer to store the heap ID and index was using a sizeof(int) for its
size

 4 is used instead of sizeof(int) to permit portability between
   the Crays and other machines (the heap ID is always encoded as an int32 anyway)


Platforms tested:
Cray T3E (read data from linux)
linux
solaris
aix



Misc. update:
2004-09-03 14:17:50 -05:00
Pedro Vicente Nunes
d0bc7e5274 [svn-r9199] Purpose:
inserted new code warrior project


Description:

Solution:

Platforms tested:

Misc. update:
2004-09-03 10:43:08 -05:00
MuQun Yang
c0838b2ae5 [svn-r9196] Purpose:
Resume previous all.zip.

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-03 10:02:24 -05:00
MuQun Yang
b9101e4195 [svn-r9195] Purpose:
Code warrior support erased previous object setting changes by xuan, we have to
restore it.

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-03 10:00:34 -05:00
Raymond Lu
b6183b2a51 [svn-r9194] Purpose: Update Document
Misc. update:  Update release information for Crays in RELEASE.txt
2004-09-03 09:15:54 -05:00
Frank Baker
8dca875987 [svn-r9193]
Purpose:
    Add H5Zget_filter_info and h5zget_filter_info_f.
    Other minor edits.
Platforms tested:
    Mozilla
2004-09-02 18:01:37 -05:00
Raymond Lu
e05cf04e3f [svn-r9190] Purpose: Update
Misc. update:  Update information of release test for RELEASE.txt
2004-09-02 12:23:31 -05:00
Pedro Vicente Nunes
ec217c4eb9 [svn-r9189] Purpose:
added a new project file for CodeWarrior (the files in the library changed since the last version )

Description:

Solution:

Platforms tested:

Misc. update:
2004-09-02 12:20:42 -05:00
Raymond Lu
9c2e22f136 [svn-r9188] Purpose: Update
Description:  Update RELEASE.txt for 1.6.3 release

Solution:  Added information for Xeon cluster(tungsten)
2004-09-02 09:41:51 -05:00
Xuan Bai
f301c2928b [svn-r9186] Purpose:
Update.

Description:
Update the installation documentation as we convert to the per_external_library naming convention for HDF5 environment variables in Windows.

Solution:

Platforms tested:
Not necessary.

Misc. update:
2004-09-01 17:25:12 -05:00
Xuan Bai
bc7d82ab16 [svn-r9185] Purpose:
New Feature.

Description:
Before this update, we use per_hdf_library convention to set environment variables for gzip and szip compression libraries, for example, HDF5_EXT_LIBS = zlib.lib szlib.lib.

As some of HDF5 dump and repack tests should be skipped when gzip/szip are disabled.  But we found it was very complicated to check whether gzip/szip were disabled in Windows with the per_hdf_library convention.  Using per_external_library naming convention makes the checking much easier.  So we decide to convert to per_external_library naming convention.

A new environment variable H5_SZIP_CAN_ENCODE is added to check whether szip encoding is enabled.

dumptest.bat and repacktest.bat batch files are also updated so these tests which use gzip/szip filters will be skipped when gzip/szip are disabled and will be tested when gzip/szip are enabled.

Solution:
Now we should set the following environment variables:
HDF5_EXT_ZLIB = zlib.lib
HDF5_EXT_SZIP = szlib.lib
HDF5_EXT_ZLIB_DLL = c:\zlib114\dll\zlib.lib
HDF5_EXT_SZIP_DLL = szlibdll.lib
when we want to enable gzip/szip.

Set H5_SZIP_CAN_ENCODE as 1 when szip encoding is enabled and as 0 when szip encoding is disabled.

Platforms tested:
Visual C++ 6.0 on Windows 2000/XP.
(Will test with .NET after this check-in).

Misc. update:
2004-09-01 17:22:33 -05:00
Elena Pourmal
0f60918a11 [svn-r9184] Purpose: Cleaning up the mess
Description: I ran bin/h5vers on verbena instead of eirene;
             as a result configure was messed up.

Solution: Checked out from CVS, reran h5vers to set up version to
          hdf5-1.6.3-pre1 and created a tar ball for testing;
          reran h5vers to set up version to hdf5-1.6.3-pre2 and checked in
          updated files.

Platforms tested: eirene (configure works now)

Misc. update:
2004-09-01 13:06:59 -05:00
Elena Pourmal
d5aff3652b [svn-r9182] Purpose: Maintenance for the hdf5-1.6.3 testing
Description:  After discussing with Albert:
             I changed the version to hdf5-1.6.3-pre1 and created
             a tar ball for the first round of testing.
             Then I changed the version to hdf5-1.6.3-pre2 and
             now I am committing the changes.
             pre1 on ftp is the same as snap6 :-)

Solution:

Platforms tested:

Misc. update:
2004-09-01 11:24:50 -05:00
Elena Pourmal
3be80cc1f0 [svn-r9181] Purpose: Maintenance for the hdf5-1.6.3 testing
Description:  After discussing with Albert:
             I changed the version to hdf5-1.6.3-pre1 and created
             a tar ball for the first round of testing.
             Then I changed the version to hdf5-1.6.3-pre2 and
             now I am committing the changes.
             pre1 on ftp is the same as snap6 :-)

Solution:

Platforms tested:

Misc. update:
2004-09-01 11:15:57 -05:00
Albert Cheng
6c87077c74 [svn-r9180] Purpose:
Text display change

Description:
Changed the test names to much shorter strings for easier
use.

Platforms tested:
No h5committed test.  Only test parallel in eirene.

Misc. update:
2004-09-01 10:16:04 -05:00
John Mainzer
da9fd4bb18 [svn-r9178] Purpose:
Fix parallel bug reported by Thomas Guignon, in which different
processes became confused as to whether they were doing collective
or individual I/O.


Description:
When one process had a point selection, and another didn't, the
first concluded that the I/O was independant, while the second
presumed that it was collective.  A hang resulted.


Solution:
Get all processes involved in an I/O to compare notes.  If all
agree that the I/O is collective, they proceed with same.  If
any think the I/O should be independant, all use independant
I/O.

Note that this is an interrim fix -- the correct solution is to
support collective I/O on point selections.  This will take a
while.


Platforms tested:
copper

h5committested

Eirene (serial and parallel)

In the parallel test on Eirene, I encountered a bug in h5repacktst.
However the problem vanished on recompile.  Since I couldn't reproduce
it elsewhere, I went ahead with the checkin.

Given my druthers, I would have liked to study the code more
carefully before this check-in.  However, there is some time pressure.

The new code implementing the consensus check must not be executed
unless MPI is initialized, and there is a communicator associated
with the file.  I think my guards against this case are adequate,
but if we run into a hang or an illegal instruction error, this
change should be suspect.


Misc. update:
2004-08-31 17:12:07 -05:00
HDF Admin
2202352d28 [svn-r9177] Snapshot version 1.6 release 3 (snap5) 2004-08-29 21:02:51 -05:00
Frank Baker
448da32994 [svn-r9176]
Purpose:
    Corrected function name in "Functions with Changed Syntax"
        H5FDset_fapl_multi --> H5Pset_fapl_multi
Platforms tested:
    Mozilla
2004-08-27 14:55:35 -05:00
Xuan Bai
15a195b4df [svn-r9175] Purpose:
Bug fix.

Description:
There was a minor bug in the hdf5check.bat batch file I checked in last night.  We should search check_results.txt instead of hdf5_results.txt for failed tests.

Solution:
Change hdf5_results.txt to check_results.txt.

Platforms tested:
Kent tested the bug fix on Windows XP.

Misc. update:
2004-08-27 14:21:05 -05:00
MuQun Yang
900d6b4109 [svn-r9174] Purpose:
Add a little more descriptions for users who don't want to build HDF5 with
external compression libraries like szip or gzip.

Description:

Solution:

Platforms tested:

Misc. update:
2004-08-27 14:06:50 -05:00
Albert Cheng
85074943fe [svn-r9171] Purpose:
"bug fix" sort of.

Description:
The current mpicc at TG-NCSA recognizes uint64_t but not
int64_t.  hdf5 code rightly assumes when the unsigned type
is defined, the corresponding signed type should be valid
too.  So, when it detected uint64_t is valid, it went ahead
using int64_t which ended in compiling failure.

Solution:
Changed the detection to check on int64_t instead.  This does
not change any logic, just goes around the mpicc compiler error
at TG-NCSA.

Platforms tested:
h5committested and tested at TG-NCSA (pp) too.

Misc. update:
2004-08-27 13:36:44 -05:00
MuQun Yang
4766cfd583 [svn-r9170] Purpose:
Re-order the addition of two windows install docs to MANIFEST.

Description:
MANIFEST has been updated when two new windows installed files are checked in.
However, daily tests show check of MANIFEST failed. It seems that the order of the file makes difference.
Change the order of the two install files in the MANIFEST. See whether it will fail again.

Solution:

Platforms tested:

Misc. update:
2004-08-27 09:24:35 -05:00
Xuan Bai
4ab8e6ece8 [svn-r9169] Purpose:
Update.

Description:
Add HDF5 timing tests into hdf5check.bat batch file.
hdf5check.bat batch file will generate a new file tests_results under HDF5 directory to dispaly whether all HDF5 tests passed or not, if failed, which tests failed (the check_results.txt which includes detailed HDF5 libraries and tools tests results will also be generated at the same time).

Solution:

Platforms tested:

Misc. update:
Windows 2000/XP.
2004-08-26 22:18:45 -05:00
Xuan Bai
c7e907a359 [svn-r9167] Purpose:
Add two new document files for windows support.

Description:

Solution:

Platforms tested:

Misc. update:
2004-08-26 18:07:33 -05:00
Xuan Bai
2bad6974f2 [svn-r9166] Purpose:
New documentations for Windows support.

Description:
Three documentations:
1. INSTALL_Windows.txt has been largely modified to prepare for 1.6.3 release.
2. INSTALL_Windows_Short.txt has been added to provide for users a quick and easy building, testing, and installing HDF5 products on Windows.
3. INSTALL_Windows_From_Command_Line.txt has been added to provide for users who would like to build HDF5 through command line on Windows.

Correspondingly, INSTALL_Windows_withcpp.txt and INSTALL_Windows_withf90.txt will be depreciated in the future since the new INSTALL_Windows.txt includes the instruction to build, test, and install HDF5 products with C++ and Fortran APIs.

Solution:

Platforms tested:
No need.

Misc. update:
2004-08-26 18:04:21 -05:00
Frank Baker
0b7973c292 [svn-r9165]
Purpose:
    H5Pset_fapl_multi -- syntax has changed in (one parameter datatype)
Platforms tested:
    Mozilla
2004-08-26 15:42:59 -05:00
Frank Baker
9795b68ae5 [svn-r9163]
Purpose:
    Correct hyperlinks to two functions
Platforms tested:
    Mozilla
2004-08-26 14:38:44 -05:00
Frank Baker
8180c44531 [svn-r9160]
Purpose:
    Add H5Premove_filter
    H5Pset_chunk bug fix
    Further SZIP revisions
Description:
    H5Premove_filter -- added this function, incuding Fortran
    H5Pset_chunk -- specified units of chunk size as "dataset elements"
        Fixes Bugzilla #110.
    H5Pset_szip revisions and clarifications
        improved description of bits_per_pixel settings
            (at high-level in "Description" with details in "Notes")
        clarify meaning of "pixel" in HDF5/SZIP context
        describe potential H5Dcreate failure more explicitly
            in case of mistaken use of H5Pset_szip
        clarify discussion of H5_SZIP_EC_OPTION_MASK versus
            H5_SZIP_NN_OPTION_MASK suitability
        mention current SZIP setting for maximum number of blocks
            per scan line
Platforms tested:
    Mozilla
2004-08-26 12:15:06 -05:00
Xuan Bai
d00e416732 [svn-r9159] Purpose:
New feature.

Description:
Before this update, to link HDF5 with zlib and szip libraries and DLLs,
zlib.lib szlib.lib were added into Object/library modules in more than
50 windows projects settings; c:\zlib114\dll\zlib.lib szlibdll.lib were
added into Object/library modules in hdf5dll project settings.

With the above settings, if we want to disable zlib and/or szip libraries
and DLLs from HDF5, we have to remove zlib.lib szlib.lib from Object/library
modules in more than 50 projects settings; c:\zlib114\dll\zlib.lib szlibdll.lib
also need to remove from hdf5dll project settings.

The above operations should be done for both release and debug versions.
So it is really very unconvenient to disable zlib and/or szip libraries and DLLs.

Solution:
Add HDF5_EXT_LIBS environment variable and replace zlib.lib szlib.lib
in Object/library modules with $(HDF5_EXT_LIBS)

Add HDF5_EXT_LIBS_DLL environment variable and replace c:\zlib114\dll\zlib.lib
szlibdll.lib in Oject/library modules with $(HDF5_EXT_LIBS_DLL).

If we want to enable both zlib and szip, set
HDF5_EXT_LIBS = zlib.lib szlib.lib
HDF5_EXT_LIBS_DLL = c:\zlib114\dll\zlib.lib szlibdll.lib

If we want to enable zlib and disable szip, set
HDF5_EXT_LIBS = zlib.lib
HDF5_EXT_LIBS_DLL = c:\zlib114\dll\zlib.lib

If we want to disable zlib and enable szip, set
HDF5_EXT_LIBS = szlib.lib
HDF5_EXT_LIBS_DLL = szlibdll.lib

If we want to disable both zlib and szip, set
HDF5_EXT_LIBS =
HDF5_EXT_LIBS_DLL =

Platforms tested:
Tested with Microsoft Visual C++ 6.0/DEC Fortran 6.0 and .NET on Windows XP and
Visual C++ 6.0/DEC Fortran 6.0 on Windows 2000 for all the possible 4 zlib/szip
enable/disable combinations:
1. Enable both
2. Enable zlib and disable szip
3. Disable zlib and enable szip
4. Disable both

Misc. update:
2004-08-25 23:00:51 -05:00
Elena Pourmal
fd7afc2d4b [svn-r9157]
Purpose: Maintenance

Description: First attempt to bring up INSTALL file up-to-date.

Solution: Read and fix.

Platforms tested: N/A

Misc. update:
2004-08-25 16:50:38 -05:00
Quincey Koziol
928ddb9463 [svn-r9156] Purpose:
Bug fix (sorta)

Description:
    Change reading of "missing" chunks from datasets with undefined fill
values to not overwrite the application buffer with random garbage from
memory.  Note that this is almost the same, since whatever garbage the
application had in those locations will still be there...

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    IRIX64 6.5 (modi4)
    h5committested
2004-08-25 03:30:36 -05:00
Elena Pourmal
76b1ae5950 [svn-r9153]
Purpose: Maintenance/bug fix

Description: On OSF1 C++ compilation failed complaining about stdint.h file
             being missing.

Solution: By Binh-Minh's suggestion: include stdint.h file only when
          __cpluplus is NOT defined. inttypes.h is used by C++ compiler;
          it is more common than stdint.h

Platforms tested: OSF1 (lemieux), Solaris 2.8 (sol), AIX 5.1 (copper)

Misc. update:
2004-08-24 22:41:49 -05:00
Elena Pourmal
2f6b3eadf7 [svn-r9152]
Purpose: Maintenance

Description:  Added new test for h5iget_file_id_f and  brought back
              Quincey's test for h5premove_filter_f from 1.7 branch

Solution:

Platforms tested: OSF1 (lemieux), Solaris 2.8 (sol), AIX 5.1 (copper)

Misc. update:
2004-08-24 22:38:18 -05:00
Elena Pourmal
a01d41a74c [svn-r9151]
Purpose: Maintenance

Description:  Added new functions h5iget_file_id_f and h5premove_filter_f

Solution:

Platforms tested: OSF1 (lemieux), Solaris 2.8 (sol), AIX 5.1 (copper)

Misc. update:
2004-08-24 22:37:37 -05:00
Elena Pourmal
01fd9a0163 [svn-r9150]
Purpose: Maintenance/bug fix

Description: On OSF1 machine at PSC HDF5 configuration failed for
             C library; the failure was due to the $ARCH compiler flag that
             was replace by "OSF1" string confusing the compiler.

Solution: REmoved $ARCH from the compiler flags.

Platforms tested: OSF1 (lemieux), Solaris 2.8 (sol), AIX 5.1 (copper)

Misc. update:
2004-08-24 22:36:20 -05:00
Frank Baker
e2ed7dc26a [svn-r9147]
Purpose:
    Add H5Iget_file_id
Platforms tested:
    Mozilla
2004-08-24 15:46:50 -05:00
Pedro Vicente Nunes
d07edb2123 [svn-r9145] Purpose:
h5repack tests

Description:
modified a test file generation contents, for more easy debugging
(generated just one reference dataset and one region reference )

Solution:

Platforms tested:
linux
solaris
aix

Misc. update:
2004-08-24 14:18:40 -05:00
Frank Baker
6a9e054486 [svn-r9144]
Purpose:
    Add H5Fget_name
    Add H5Fget_filesize
    Minor correction in HTML coding of H5Fget_freespace
Platforms tested:
    Mozilla
2004-08-24 14:01:00 -05:00
Albert Cheng
91d35f09f8 [svn-r9142] Purpose:
Code cleanup.

Removed bunch of old options (r,w,v,i,b,e) that are no longer valid
or useful after adopting the general test interface.  Moved the test
of sizeof MPI_Offset into the test routine itself.

Platforms tested:
Eirene and Sol using pp mode.
2004-08-23 19:08:35 -05:00
Albert Cheng
6bedc7a729 [svn-r9140] Purpose:
Bug fix.

Description:
The return value of TestPrivateParser() was not tested, thus program
would keep on going incorrectly even if errors were detected in
TestPrivateParser.

Solution:
Check the return and exit accordingly.

Platforms tested:
Tested in Eirene and Sol in both serial and pp modes.
2004-08-23 18:35:23 -05:00
Frank Baker
df7f7f48e2 [svn-r9138]
Description:
    Correct syntax on two new functions.
    Revise C++ notes.
Platforms tested:
    Mozilla
2004-08-23 15:21:53 -05:00
Pedro Vicente Nunes
31a5595bd5 [svn-r9136] Purpose:
new test for h5repack

Description:
added a test that generates and copies a file with a dataset with fill value
(this is to test the property list function H5Pequal)


Solution:

Platforms tested:
linux
solaris
aix

Misc. update:
2004-08-23 13:42:04 -05:00
HDF Admin
03c1156cd9 [svn-r9135] Snapshot version 1.6 release 3 (snap4) 2004-08-22 21:02:22 -05:00
Frank Baker
2543070d31 [svn-r9132]
Purpose:
    Added notes regarding C++ changes, including mention of the C++ RM.
    Entries appear in "New Functions" and "Functions with changed Syntax."

Platforms tested:
    Mozilla
2004-08-20 17:38:09 -05:00
James Laird
ce7473dee5 [svn-r9131]
Purpose:
Update to Changes.html

Description:
Added Fortran function for H5Z_get_filter_info (h5z_get_filter_info_f).

Misc. update:
2004-08-20 17:16:20 -05:00
Elena Pourmal
cdc33df1a8 [svn-r9125] Purpose: Maintenance
Description: Added support for PGI Fortran compiler on Linux64 (x86_64)

Solution:

Platforms tested: AMD OPteron box at AMD, Sunnyvale and verbena
                  with PGI and gcc compilers

Misc. update:
2004-08-19 20:03:37 -05:00
Xuan Bai
77ecfceede [svn-r9123] Purpose:
Update.

Description:
Minor update on hdf5check.bat.

Solution:

Platforms tested:
Windows 2000/XP.

Misc. update:
2004-08-19 15:37:28 -05:00
Pedro Vicente Nunes
cc034573b1 [svn-r9120] Purpose:
new feature

Description:
added a check that the chunk size must be smaller than pixels per block in SZIP request
prints a message and exits, if not met

Solution:

Platforms tested:
linux
solaris
aix

Misc. update:
2004-08-19 14:08:39 -05:00
Raymond Lu
9a16096082 [svn-r9118] Purpose: Minor Bug Fix
Description:  In H5O_fill_new_decode and H5O_fill_new_encode, macros UINT32DECODE
and UINT32ENCODE were used to decode and encode message size, which is ssize_t.

Solution:  Changed to INT32DECODE and INT32ENCODE.

Platforms tested:  Tested v1.7 on fuss - very simple change.
2004-08-19 09:29:54 -05:00
Albert Cheng
19cb3b5ae7 [svn-r9116] Purpose:
feature

Description:
Another revamp of the test interface.
TestInit: is used to register Test Program name, test program specific
   Usage and option parsing routines.
TestUsage: will invoke extra usage routine if provided.
TestParseCmdLine: will invoke extra option parsing routine if provided.
GetTestSummary() and GetTestCleanup() replaces the previous Summary and
CleanUp arguments of TestParseCmdLine.

test/testhdf5, test/ttsafe.c, testpar/t_mpi.c, testpar/testphdf5.c:
   All have been updated to use the new Test Routines.

testpar/t_mpi.c:
   Also a fix of a compiler optimization bug when pgcc in Linux is
   used to compile it.  Changed buf[] and expected to unsigned char
   type to avoid a bug that failed to do sign-extension.

Platforms tested:
"h5committested"
Also tested thread-safe option in eirene.
2004-08-19 01:34:59 -05:00
John Mainzer
d3e91f2689 [svn-r9114] Purpose:
Fix bug/feature which caused testphdf5 to fail when run with more than
32 processes.

Description:
32 process limit was a hard coded constant.

Solution:
Modified most of the routines in t_mdset.c to adapt dynamically to
the current number of processes.  In passing, I also tidied up a
few memory leaks.

Platforms tested:
copper with a scattering of numbers of processes from 4 to 32, and all
numbers of processes from 32 to 64 inclusive.

h5committested

serial and parallel tests on Eirene


Misc. update:
2004-08-18 18:04:22 -05:00
Raymond Lu
d86efabc13 [svn-r9107] Purpose: Bug fix
Description:  In H5O_fill_new_decode, it tries to read message size(-1) when fill
value is undefined for version 1.  During UINT32DECODE, if the machine is 64-bit,
a value 0x00000000ffffffff is returned, which is like a valid value.

Solution:  Don't decode message size if fill value is undefined, simply assign
-1 to message size.

Platforms tested:  h5committest.
2004-08-18 13:45:29 -05:00
Pedro Vicente Nunes
200f4c079f [svn-r9105] Purpose:
bug fix

Description:
the option CHUNK:NONE (remove chunking )  was not setting the layout to contiguous


Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-08-17 14:53:57 -05:00
MuQun Yang
907dbc770a [svn-r9103]
Purpose:
Bug fix.

Description:
1. The IF-block of skipping collective chunk IO tests when the number of
processes is greater than some number essentially skipped all parallel tests.
2.  John tested at copper with the number of processor = 64 and collective
     chunk IO tests passed, so we increase the number of precessor =24 to 64 for
    skipping the test.

Solution:
1. change the IF block flow so that it only skips collective chunk IO tests when
   the number of process is greater than 64.

Platforms tested:
copper(only parallel test, no needs to test oh other platforms).

Misc. update:
2004-08-17 13:40:33 -05:00
Quincey Koziol
8d40aa83cf [svn-r9102] Purpose:
Bug fix

Description:
    1 - Dataset contiguous storage cache information had a bug where it was
possible to try to access invalid cache information if the cache wasn't filled
the first time it attempted to loop through the list of offset/length vectors.

    2 - Additionally, the contiguous storage cache information was being used
in certain circumstances from the chunked dataset I/O code path, which was
generally fatal since the chunk storage and contiguous storage information
were stored together in a union.


Solution:
    1 - Avoid special case of first trip through loop over offset/length
I/O vectors and always check for the contiguous storage sieve buffer buffer
being NULL.

    2 - Change the union containing the chunk and contiguous storage cache
information into a struct, allowing both to be used at the same time.


Platforms tested:
    FreeBSD 4.10 (sleipnir)
    h5committested
2004-08-17 02:30:23 -05:00
Albert Cheng
f69b447fab [svn-r9099] Purpose:
Bug fix

Description:
The examples would compile even if some header file were not
installed.  That was because the CPPFLAGS has -I... components
that included the src directories.

Solution:
The h5cc or h5pcc commands should have all the necessarily
library include directories covered.  Changed CPPFLAGS to
search only the examples source directory for local header
files.

Platforms tested:
No h5committest tests which do not check examples.
Hand tested it in sol.
2004-08-16 17:48:59 -05:00
Xuan Bai
fdb18b7e22 [svn-r9098] Purpose:
New feature.

Description:
Add two new batch files for HDF5 building and testing on Windows.

Solution:
1. Add hdf5build.bat: build hdf5 from command line, which has four opitions:
       hdf5build                       build c library and tools only
       hdf5build enablecpp             build c/c++ libraries and tools
       hdf5build enablefortran         build c/fortran libraries and tools
       hdf5build enableall             build c/c++/fortran libraries and tools
2. Add hdf5bt.bat: this batch file calls hdf5build.bat and hdf5check.bat to
   build and test hdf5 from command line.  It also has four options:
       hdf5bt                       build and test c library and tools only
       hdf5bt enablecpp             build and test c/c++ libraries and tools
       hdf5bt enablefortran         build and test c/fortran libraries and tools
       hdf5bt enableall             build and test c/c++/fortran libraries and tools

Platforms tested:
Windows 2000/XP.

Misc. update:
2004-08-16 17:25:41 -05:00
Xuan Bai
2a8b7d7bfd [svn-r9096] Purpose:
New Feature.

Description:
Add several new batch files for hdf5 windows tests.

Solution:
1. Add install_dll.bat: copy hdf5 dlls to windows system directory.
2. Add install_cppdll.bat: copy hdf5 cpp dlls to windows system directory.
3. Add install_f90dll.bat: copy hdf5 fortran dlls to windows system directory.
4. Add hdf5check.bat: test hdf5 from command line, which has four opitions:
       hdf5check                       test c library and tools only
       hdf5check enablecpp             test c/c++ libraries and tools
       hdf5check enablefortran         test c/fortran libraries and tools
       hdf5check enableall             test c/c++/fortran libraries and tools
5. Update testhdf5tools, dumptest, difftest, lstest, importest, repacktest.

Platforms tested:
Windows 2000/XP.

Misc. update:
2004-08-16 11:56:55 -05:00
Binh-Minh Ribler
e30878da87 [svn-r9094] Purpose: Updating RM
Description
    Added the rest of the C++ examples to the RM.

Platforms tested:
    Verified on Windows
2004-08-15 22:36:49 -05:00
Binh-Minh Ribler
21041c8d56 [svn-r9093] Purpose: Removing unused files
Description
    Removed these lines because the files were there by mistake:
	./doc/html/cpplus_RM/page1.html
	./doc/html/cpplus_RM/pages.html

Misc. update:
2004-08-15 22:20:42 -05:00
Binh-Minh Ribler
1eea438567 [svn-r9092] Purpose: Adding files for C++ API RM
Description:
    Added these lines
	./c++/src/config_cpp_doc
	./c++/src/h5c++.in
	./c++/src/header.html
	./c++/src/header_files/filelist.xml
	./c++/src/header_files/image001.jpg
	./c++/src/header_files/image002.jpg

Misc. update:
2004-08-15 22:14:35 -05:00
Binh-Minh Ribler
3bacab3bb5 [svn-r9091] Purpose: File addition for RM
Description:
    Adding configuration file and data for the C++ API reference manual.
    cpp_doc_config is the configuration file, that is used by Doxygen to
        generate the RM.
    header.html and header_files are input to produce different page
        header than the default.

Platforms tested:
    Verified on Windows.

Misc. update:
2004-08-15 15:50:04 -05:00
Binh-Minh Ribler
6af12ac282 [svn-r9090] Purpose: File removal
Description:
    These files were removed because they were included in the C++ RM
    set by accident.

Platforms tested:
    Verified on Windows.

Misc. update:
2004-08-15 14:16:30 -05:00
Albert Cheng
29dd55a197 [svn-r9087] Purpose:
Feature

Description:
Added --private option which is for individuals making a private
release version.  It sets the SubRelease string to the date of
release.   This should be sufficient to distinguish releases
provided one does not make two private releases on the same
day.

Platforms tested:
No h5committest since it does not test this feature.
Hand tested it in Eirene.
2004-08-14 19:18:24 -05:00
Albert Cheng
88c4523ac2 [svn-r9085] Purpose:
Bug fix

Description:
Updated it to use the new TestParseCmdLine() syntax.

Platforms tested:
"h5committested" and in eirene with threadsafe enabled.
2004-08-14 16:03:48 -05:00
Binh-Minh Ribler
460927cf81 [svn-r9084] Purpose: Fix minor problem
Description:
    Added an argument to the call to TestParseCmdLine because its
    prototype has just been changed.

Platforms tested:
    Linux 2.4 (eirene)
2004-08-14 00:13:50 -05:00
Albert Cheng
cb7a720fac [svn-r9082] Purpose:
Feature

Description:
Updated to use the new syntax of TestParseCmdLine().

Platforms tested:
On eirene both serial and parallel.
2004-08-13 17:06:44 -05:00
Albert Cheng
fa2f99e642 [svn-r9080] Purpose:
Feature

Description:
Changed TestParseCmdLine to accept an optional extra_parse()
function provided by indidivual test application.  Extra_parse()
can handle extra options special to that test application.

Updated testhdf5.c to use the new syntax of TestParseCmdLine().

Platforms tested:
On eirene both serial and parallel.
2004-08-13 16:59:51 -05:00
MuQun Yang
7d636b8269 [svn-r9078] Purpose:
For collective chunk IO test, only let the main process(process 0) generate
the "skipped message".

Description:

Solution:

Platforms tested:
linux 2.4
Too trivial to use h5committest.

Misc. update:
2004-08-13 08:51:45 -05:00
MuQun Yang
6ce8bab631 [svn-r9075] Purpose:
Parallel HDF5 Collective chunk IO testing message added

Description:
collective chunk IO tests have been verified with the number of process greater than 24 and
the test is very slow with big number of process.

That may cause confusions to users who run collective chunk IO tests.


Solution:
To avoid possible confusions, A if-block will be used to check whether the number of process
is greater than 24. If yes, the collective chunk tests will be skipped and a message will be printed out.

Platforms tested:
To trivial for h5committest,testing platform: eirene.

Misc. update:
2004-08-13 07:53:13 -05:00
Raymond Lu
7de4101d12 [svn-r9074] Purpose: bug fix
Description:  The test tried to read a dataset of H5T_STD_I32LE type and verify with the size
of H5T_NATIVE_INT in function test_misc20(), line 3376.  This will fail on some machines like
Crays where the size of H5T_NATIVE_INT is 8 bytes.

Solution:  changed from H5T_NATIVE_INT to H5T_STD_I32LE.

Platforms tested:  Crays - very simple change.
2004-08-12 10:27:13 -05:00
MuQun Yang
4dfae9e897 [svn-r9072] Purpose:
To make collective chunk IO test more general

Description:
Previous collective chunk IO test only works with number of processor less than 4.
In case people would like to test with more processors, more general tests need to be used.

Solution:
The following changes have been made:
1. Change the way to use discontiguous hyperslab selection to work with larger number of processors,
2. Increase size of data array
Now, I can test with processor number = 12; however, the fourth test is very slow to the independent IO write and read.


Platforms tested:
eirene(only parallel test codes are modified, no need to test on other platforms).

Misc. update:
2004-08-12 00:02:59 -05:00
Xuan Bai
03ddea6cda [svn-r9070] Purpose:
Update.

Description:
Binh-Minh checked in two new c++ source codes and two new head files.
Add these files to Windows projects.

Solution:
Add H5VarlenType.cpp, H5VarlenType.h, H5ArrayType.cpp, and H5ArrayType.h
to hdf5_cpp and hdf5_cppdll projects in Windows.

Platforms tested:
Visual C++ 6.0 on Windows XP/2000.
(will test with .NET on XP after this check-in).

Misc. update:
2004-08-11 20:38:28 -05:00
Albert Cheng
407feb412a [svn-r9067] Purpose:
Cleanup and bug fix.

Description:
Bug fix:
the checking of dobig test was done in the wrong place
such that tests added after it would be run even for the -b option.
Moved the dobig test checking to AFTER all tests are added.

Cleanup:
Removed old code now that the new way is working fine.

Platforms tested:
Tested in Eirene parallel only.

Misc. update:
2004-08-11 13:12:06 -05:00
Robert E. McGrath
82af9859ef [svn-r9065] Purpose:
Bug fix

Description:
Wrong value returned for error

Solution:
Return correct value

Platforms tested:
verbena

Misc. update:
2004-08-11 12:45:51 -05:00
Albert Cheng
ebd477c930 [svn-r9063] Purpose:
Improvement and fix.

Description:
Improvement: allow user defined RUNSERIAL and RUNPARALLEL settings.
Added hdf5_cv_gettimeofday_tz cached value.

Platforms tested:
Janus (Tflops).

Misc. update:
2004-08-11 12:20:00 -05:00
James Laird
1b47c2a677 [svn-r9062]
Purpose:
Bug fix

Description:
Fixed configure script so that gettimeofday test uses cached variables

Platforms tested:
sleipnir, copper, arabica, verbena

Misc. update:
2004-08-10 20:51:50 -05:00
MuQun Yang
92f2899160 [svn-r9061] Purpose:
remove the line with all_withf90.zip.

Description:
all_withf90.zip is no longer needed due to merging of fortran projects to all.zip

Solution:

Platforms tested:

Misc. update:
2004-08-10 19:52:22 -05:00
MuQun Yang
393a51eb92 [svn-r9060] Purpose:
Windows projects that generated HDF5 fortran wrapper libraries and tests  are merged into all.zip. all_withf90.zip is no longer needed.

Description:

Solution:

Platforms tested:

Misc. update:
2004-08-10 19:35:41 -05:00
Binh-Minh Ribler
68674a90ad [svn-r9057] Purpose: Clean up test code
Description:
    Corrected the way to initialize several const char*, because I accidentally
    used std::string's initialization for them.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
2004-08-10 15:47:44 -05:00
HDF Admin
3069dd3d88 [svn-r9055] Snapshot version 1.6 release 3 (snap3) 2004-08-08 21:03:21 -05:00
Quincey Koziol
f9e414bc75 [svn-r9054] Purpose:
Bug fix

Description:
    Correct possible core dump when a datatype conversion function is
registered with the library after a compound datatype has been converted
(having it's type conversion information cached by the library).  The compound
datatype must have been created by inserting the fields in non-increasing
offset order to see the bug.

Solution:
    Re-sort the fields in the compound datatypes before recalculating the
cached information when performing the conversion on them.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    h5committested
2004-08-08 17:12:21 -05:00
Albert Cheng
5a7fcfa213 [svn-r9051] Purpose:
Feature

Description:
Added a feature such that if the test name starts with '-', do not run it
by default.

Platforms tested:
Eirene both serial and parallel.

Misc. update:
2004-08-07 22:01:03 -05:00
Frank Baker
6936f40fb8 [svn-r9044]
Purpose:
    Removing 2 extraneous lines from the "C++ Ref Manual" section.
    (Corrects an error introduced yesteday.)
2004-08-06 22:19:51 -05:00
Binh-Minh Ribler
0da9b3db8d [svn-r9043] Purpose: Clean up tests
Description:
    Replaced cout's with cerr's.
    Cleanup various places in the tests to make them more consistent.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)

Misc. update:
2004-08-06 17:24:32 -05:00
Binh-Minh Ribler
619d3b02d1 [svn-r9042] Purpose: Clean up code and update documentation
Description:
    Removed an internal class from RM.
    Removed an extra default constructor DataSpace().
    Added header files H5ArrayType.h and H5VarLenType.h to some cpp files;
        there files were missing from last checkin.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)

Misc. update:
2004-08-06 17:19:41 -05:00
Quincey Koziol
f7d9933431 [svn-r9041] Purpose:
Update for 1.6.3 release
2004-08-06 16:19:08 -05:00
Quincey Koziol
8cf233090f [svn-r9040] Purpose:
Code cleanup

Description:
    At user's suggestion, convert some "naked" standard library calls to use
the HD*() macros.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-08-06 14:30:00 -05:00
Quincey Koziol
88997338e6 [svn-r9038] Purpose:
Code cleanup/bug fix

Description:
    Check for _O_BINARY being defined instead of O_BINARY, since we actually use
_O_BINARY.  (Note that this only affects Windows)

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Not tested w/h5committest
2004-08-06 14:05:24 -05:00
Frank Baker
8a4404945b [svn-r9033]
Description:
    RM_H5Front.html
        Add link to new C++ Ref Manual
        (and delete link to superseded old C++ Interfaces document)
    index.html
        Restructure page in attempt to reduce cluttered appearance
        Revise "HDF5 User's Guide" section
        Rework "HDF5 Ref Manual" and "Foreign Languages" sections,
            with particular attention to the new C++ RM
        Replace links to two outdated Parallel HDF5 documents with
            link to a much more current page on the HDF website
            (and move link into the "at NCSA" column)
        Add emphasis to "Tools" link
Platforms tested:
    Mozilla, Safari
2004-08-05 18:13:45 -05:00
Albert Cheng
ee5ce4a27f [svn-r9030] Purpose:
Bug fix (Failures when dataset size >= 1 GB, reported by Bill Loewe.)

Description:
In the IBM AIX system using 32bit mode, if a dataset size was 1GB or
larger, when the "end" of the dataset was selected, MPI would complain
it could not keep the Upper bound of a datatype within the range of
MPI_Aint.  This was because the old algorithm would derive the selection
with extent of each row first.  After all dimensions were processed,
it then calculate the start position and just displace the whole
MPI derived type.  So, the final MPI type was actually the start
position plus the whole dataset.  Since the start can be as big as
the whole dataset, this made the final derived twice as big as 1GB.
That would hit the 2GB MPI_Aint range limit in the 32 bit mode.

Solution:
Use a different algorithm to include the start position in the
defining of MPI type for each dimension.  When all dimensions
are processed, the MPI type represents the selection exactly.

Platforms tested:
h5committested

Misc. update:
2004-08-05 17:32:35 -05:00
Frank Baker
1276bcc432 [svn-r9029]
Purpose:
    Adding the files for the  C++ Reference Manual.
2004-08-05 16:40:39 -05:00
Frank Baker
c17fb6fa1d [svn-r9028]
Purpose:
    Adding C++ Reference Manual to 1.6 release branch.
    This manual is automatically generated
    by doxygen from the C++ source code.
Platforms tested:
    Mozilla, Safari, IE 5
2004-08-05 16:22:19 -05:00
Frank Baker
db1239f17d [svn-r9027]
Purpose:
    Adding C++ Reference Manual to 1.6 release branch.
    This manual is automatically generated
    by doxygen from the C++ source code.
Platforms tested:
    Mozilla, Safari, IE 5
2004-08-05 16:14:10 -05:00
Quincey Koziol
94fb43379a [svn-r9025] Purpose:
Bug fix

Description:
    Correct buffer overrun in "multi" VFL driver that was writing past the
end of the "driver name" buffer when encoding the driver info block for the
file's superblock.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-08-05 13:44:28 -05:00
Quincey Koziol
462efe1cc7 [svn-r9017] Purpose:
Code cleanup

Description:
    Clean up ifdef's and close leaked ID.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-08-05 00:01:54 -05:00
Binh-Minh Ribler
7aeee0a929 [svn-r9015] Purpose: Adding info regarding C++ API changes. 2004-08-04 16:49:13 -05:00
Elena Pourmal
28ab722e86 [svn-r9013]
Purpose: Small bug fix

Description: When SZIP filter is present but encoding is not enabled
             test_misc21 and h5repack tests failed.

Solution: Those tests should not run in this situation at all.
          Used conditonal compilation to disable the tests.

Platforms tested: sol (today I will enable the daily tests with the szip library
                  that doesn't have encoder for few other platforms)

Misc. update:
2004-08-04 15:24:42 -05:00
Xuan Bai
71e29531eb [svn-r9011] Purpose:
New feature.

Description:
Before this update, windows tool testing batch file outputs 2 files.
One shows whether each test passed or failed.  Another file includes the
information from FC command about the difference between the expected output
and actual output.

Now the two output files are merged into one.  When a test passes, the
output file will just show that the test passes.  When a test fails, the
output file will show that the test fails and the difference between the
expected output and actual output from FC command will be included right
below the failed test.

Solution:
Updated dumptest, difftest, lstest, importtest, and repacktest batch files
so that when a test fails, the output from FC command will be redirected to
the file that shows whether a test passes or fails.

Platforms tested:
Windows 2000 and XP.

Misc. update:
2004-08-04 13:11:22 -05:00
Robert E. McGrath
0335f6948a [svn-r9008] Purpose:
Fixed errors in tmisc22.

Description:
Fixed errors.
Also made the test dataset smaller to speed up the test.

Solution:

Platforms tested:

Misc. update:
2004-08-04 10:40:37 -05:00
Frank Baker
8885c892be [svn-r9007]
Purpose:
    In "Intro to HDF5" Example #5, corrected the anticipated output listed in
        a code comment.
    Fixes Bugzilla entry #112.
Platforms tested:
    Mozilla
2004-08-03 17:57:40 -05:00
Robert E. McGrath
ac207ffe07 [svn-r9005] Purpose:
Some tests for SZIP bits per pixel

Description:
Test setting SZIP bits per pixel from the datatype

Solution:
Test many offset+precision combiations.

Platforms tested:
verbena,arabica,hirdls

Misc. update:
2004-08-03 17:08:53 -05:00
Robert E. McGrath
e39f5dc559 [svn-r9004] Purpose:
Fix to feature added yesterday

Description:
Needed additional check on the SZIP bits per pixel parameter

Solution:
if (precision > 24 && precision < 31) precision = 32
if (precision > 32 && precision < 64) precision = 64

Platforms tested:
arabica,verbena,hirdls

Misc. update:
2004-08-03 17:07:12 -05:00
Xuan Bai
89405db2ea [svn-r9002] Purpose:
Update.

Description:
Before this update, hdf5_fortran release and debug libraries
share the same name hdf5_fortran.lib;
hdf5_f90cstub release and debug libraries share the same name
hdf5_f90stub.lib;
libtest_fortran release and debug libraries share the same name
libtest_fortran.lib.
Rename the debug libraries for the above three projects to distinguish
the release and debug libraries.
hdf5 library installation batch file installhdf5lib.bat does not
install hdf5 fortran libraries.

Solution:
1. Rename the hdf5_fortran debug library as hdf5_fortrand.lib.
2. Rename the hdf5_f90cstub debug library as hdf5_f90cstubd.lib.
3. Rename the libtest_fortran debug library as libtest_fortrand.lib.
4. Update installhdf5lib.bat so that hdf5 fortran libraries will
   also be installed.

Platforms tested:
Visual C++ 6.0 on Windows XP and 2000.
(will test with .NET on XP after this check-in.)

Misc. update:
2004-08-03 16:24:26 -05:00
Xuan Bai
eb06a7c95b [svn-r9000] Purpose:
New feature.

Description:
Add two new windows projects and one new testing batch file.
Update two testing batch files.

Solution:
1. Add a new project h5diffdll, which will generate h5diff dll tool.
2. Add a new windows project h5repackdll, which will generate h5repack dll tool.
3. Add a new hdf5 tool testing batch file -- testhdf5tools.bat, which
   calls h5dump, h5diff, h5ls, h5import, and h5repack tools.  Now all the available
   hdf5 tools can be tested with one batch file.
4. Updated difftest.bat and repacktest.bat testing batch files.

Platforms tested:
Visual C++ 6.0 on Windows XP and 2000.
(will test with .NET on XP after this check-in.)

Misc. update:
2004-08-03 12:09:22 -05:00
Quincey Koziol
71ffe29679 [svn-r8998] Purpose:
Bug fix

Description:
    Correct assertion and fix minor bug with encoding of "older" style
layout information which is updated by writing data to a previously empty
dataset.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-08-02 22:37:26 -05:00
Quincey Koziol
2ac16dbb1c [svn-r8996] Purpose:
Code cleanup

Description:
    Clean up some temporary files.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/C++
    Not tested by h5committest
2004-08-02 21:48:53 -05:00
Quincey Koziol
2df5bf7e31 [svn-r8995] Purpose:
Bug fix

Description:
    Add H5FDmpi.h to the list of public headers.

Platforms tested:
    FreeBSD 4.10 (sleipnir)  w/C++
    Not tested by h5committest
2004-08-02 21:23:38 -05:00
Frank Baker
f709fe884f [svn-r8993]
Purpose:
    Removed second versions of h5dread_f and h5dwrite_f, as that version
        of the FORTRAN subroutine is no longer required and has been removed
        from the API.
    This closes Bugzilla entry #92, which complained of a parameter
        description error in the second version.
Platforms tested:
    Mozilla
2004-08-02 16:57:32 -05:00
Frank Baker
d46c6a80ce [svn-r8992]
Purpose:
    Correct typo in code example.
    Corrects Bugzilla bug #197
Platforms tested:
    Mozilla
2004-08-02 15:01:35 -05:00
Robert E. McGrath
2a36f1b1d2 [svn-r8990] Purpose:
Add missing feature. Strongly requested by NASA.

Description:
Add support for 'n-bit' data in SZIP filter.

Solution:
When precision < (size*8) use precision at the BPP for SZIP.

Platforms tested:
verbena,arabica,hirdls (SGI 64bit)

Misc. update:
2004-08-02 14:37:51 -05:00
Quincey Koziol
34cbb564af [svn-r8989] Purpose:
Backport feature

Description:
    Backport Kent's collective chunk I/O work to date into the release branch.

    Also, minor code cleanups, etc.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    IRIX64 6.5 (modi4)
    h5committested
2004-08-02 12:56:37 -05:00
cvs2svn
af7def1357 [svn-r8988] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-08-02 12:56:37 -05:00
Quincey Koziol
ded3a312e7 [svn-r8986] Purpose:
Update manifest

Description:
    Add a couple of missing files.
2004-08-02 09:11:07 -05:00
Quincey Koziol
8a594dbff5 [svn-r8985] Purpose:
Bug fixes & code cleanups

Description:
    Backport MPI-I/O changes from the development branch to the release
branch in preparation for bringing Kent's collective chunk I/O changes back.

    Removed last vestiges of FPHDF5 from this branch, as it was never working
here.

    Various code cleanups & syncrontizations to better align with development
branch code and reduce diffs.

    Regenerate dependencies.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    IRIX64 6.5 (modi4)
    h5committested
2004-08-02 09:10:07 -05:00
cvs2svn
529c7b27c7 [svn-r8984] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-08-02 09:10:07 -05:00
HDF Admin
f8b2efd52d [svn-r8980] Snapshot version 1.6 release 3 (snap2) 2004-08-01 21:02:15 -05:00
Binh-Minh Ribler
75d5d0ec17 [svn-r8978] Purpose: Update MANIFEST
Description:
    Added these lines
        ./c++/src/H5ArrayType.cpp
        ./c++/src/H5ArrayType.h
        ./c++/src/H5VarLenType.cpp
        ./c++/src/H5VarLenType.h
2004-08-01 00:31:11 -05:00
Binh-Minh Ribler
8db2c48438 [svn-r8977] Purpose:
Add new files

Description:
    Added H5VarLenType.cpp and H5ArrayType.cpp to LIB_SRC
    Added H5VarLenType.h and H5ArrayType.h to PUB_HDR

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)

Misc. update:
2004-08-01 00:22:54 -05:00
Binh-Minh Ribler
3eb4dc3b4f [svn-r8976] Purpose:
Add more C++ wrappers and documentation

Description:
    Added class VarLenType to provide wrapper for:
        H5Tvlen_create

    Added wrapper for H5Tis_variable_str to DataType class

    Tests for the new wrappers will follow soon.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    New files will be added to Windows projects

Misc. update:
2004-08-01 00:16:39 -05:00
Binh-Minh Ribler
c8c0400412 [svn-r8975] Purpose:
Add more C++ wrappers and documentation

Description:
    Added class ArrayType to provide wrapper for:
        H5Tarray_create
        H5Tget_array_ndims
        H5Tget_array_dims

    Test for the new wrappers will follow soon.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    New files will be added to Windows projects.

Misc. update:
2004-08-01 00:14:36 -05:00
Binh-Minh Ribler
464c27172b [svn-r8974] Purpose: Updated documentation
Description:
    Removed an internal function from RM and made minor correction on
    its main page.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
2004-07-31 00:06:20 -05:00
Binh-Minh Ribler
fddc43caad [svn-r8973] Purpose: Updated documentation
Description:
    Updated various function headers for the RM as reviewing progresses.
    Rearranged functions in header files for more sensible look of the RM.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (verbena)
2004-07-30 23:54:08 -05:00
James Laird
e8671d70c3 [svn-r8972]
Purpose:
Updated RELEASE.txt for previous bug fixes
2004-07-30 12:42:42 -05:00
Quincey Koziol
2f28978053 [svn-r8970] Purpose:
Bug fix.

Description:
    Address two problems:
        - The computation of the scanline in the szip filter was being
            performed in the "can apply" callback routine instead of the
            "set local" routine.
        - The routine which allocated all the chunks for an entire dataset
            (which is invoked when the allocation time is early or late,
            rather than incremental) wasn't recording a failed filter in
            the information for the chunk, causing the library to believe
            that the chunk had the filter applied when it really hadn't.

Solution:
    - Move the scanline computation to the "set local" callback.

    - Record the filter mask with each chunk created when allocating them.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/szip
    Too obscure to require h5committest
2004-07-29 22:34:17 -05:00
Elena Pourmal
fab82e54da [svn-r8968] Purpose: Maintenance
Description: Added support for Absoft Fortran compiler

Solution: Modified configuration file to check which Fortran compiler is used
          and set appropriate flags.

Platforms tested: verbena with pgf90 and Absoft f95 compilers.

Misc. update:
2004-07-29 16:35:06 -05:00
Elena Pourmal
232e5f7366 [svn-r8967] Purpose: Maintenance
Description: Added support for Absoft Fortran compiler

Solution: Modified configuration file to check which Fortran compiler is used
          and set appropriate flags.

Platforms tested: verbena with pgf90 and Absoft f95 compilers.

Misc. update:
2004-07-29 16:11:02 -05:00
Xuan Bai
4b8a6687f6 [svn-r8965] Purpose:
Update.

Description:
Update new source code into windows project and rename hdf5_cpp debug version library.

Solution:
1. Add hdf5\c++\src\H5CppDoc.h into the head files for hdf5_cpp and hdf5_cppdll projects.
2. Rename hdf5_cpp debug version library from hdf5_cpp.lib to hdf5_cppd.lib to distinguish
   it from the hdf5_cpp release version library hdf5_cpp.lib.

Platforms tested:
Microsoft Visual C++ 6.0 on Windows 2000/XP.
(will test with .NET on Windows XP after this check-in.)

Misc. update:
2004-07-28 23:34:24 -05:00
Quincey Koziol
5f8a9d5dd2 [svn-r8963] Purpose:
Bug fix

Description:
    Allow I/O on extendible chunked datasets with (currently) zero-sized
dimensions to proceed harmlessly instead of dumping core on an assertion.

Solution:
    Removed assertion and added checks to avoid problem situation in H5TB_end

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/ & w/o parallel
    Too minor to require h5committest
2004-07-27 22:22:14 -05:00
Quincey Koziol
d9235366bb [svn-r8961] Purpose:
Bug fix

Description:
    Clean up new testfile from earlier checkin.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-07-27 22:16:34 -05:00
Quincey Koziol
33cf994614 [svn-r8959] Purpose:
Bug fix

Description:
    Always write fill values to chunks when initializing entire B-tree and
any filters are defined.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Solaris 2.7 (arabica)
    Too minor to require h5committest
2004-07-27 15:41:59 -05:00
Elena Pourmal
1b77f23dc2 [svn-r8955]
Purpose: Maintenance on MAC OSX

Description: Added support for the Absoft Fortran compiler.

Solution:

Platforms tested: MAC OSX with xlf and f95 absoft compilers;
                  xlf is set to be the default compiler.

Misc. update:
2004-07-27 13:51:15 -05:00
James Laird
52563e6fa8 [svn-r8954]
Purpose:
Bug fix

Description:
When a simple dataspace is created, its extent should be set before using it,
or it will silently function as a NULL dataspace.

Solution:
Added checks on user-supplied dataspaces.  Now dataspaces without extents set
will throw errors; users must explicitly set a dataspace to be NULL.

Platforms tested:
sleipnir, windows
2004-07-27 11:56:19 -05:00
Binh-Minh Ribler
6dae05b645 [svn-r8952] Purpose: Adding file
Description
    Added file c++/src/H5CppDoc.h.
2004-07-26 17:38:30 -05:00
Binh-Minh Ribler
1382bb2b20 [svn-r8951] Purpose: Adding file
Description
    Added file H5CppDoc.h.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (verbena)
    The new file will be added to windows project soon.

Misc. update:
2004-07-26 17:36:49 -05:00
Binh-Minh Ribler
954e4f4817 [svn-r8950] Purpose: Updated documentation
Description:
    Updated various function headers for the RM.
    Added DOXYGEN_SHOULD_SKIP_THIS to selectively un-display some
        info, that shouldn't be needed by application users.
    Added mainpage to the RM via the new file H5CppDoc.h

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (verbena)
    The new file will be added to windows project soon.

Misc. update:
2004-07-26 17:35:18 -05:00
Frank Baker
231d363a5c [svn-r8949]
Purpose:
    H5Pset_szip -- major rewrite
    H5Dcreate -- added a note regarding SZIP

Description:
    H5Pset_szip -- Rrestructured and rewrote H5Pset_szip Description and
        Notes to explain SZIP usage more completely, to capture limitations
        and potential pitfalls, to offer a tunign suggestion, and to
        segregate discussion of SZIP parameters that may be of interest to
        users familiar with SZIP in other environments.
        Updated parameter discussion in Description and Parameter sections.
        Described ways in which erroneous SZIP setup can cause H5Dcreate
        to fail.
    H5Dcreate -- Added note to see the H5Pset_szip RM entry if H5Dcreate
        fails and SZIP compression is to be used with the dataset.

Platforms tested:
    Mozilla
2004-07-26 16:36:30 -05:00
Quincey Koziol
35d0fabefd [svn-r8948] Purpose:
Bump version # after making snapshot
2004-07-26 00:56:38 -05:00
Quincey Koziol
631e94869b [svn-r8947] Purpose:
Code cleanup, sorta

Description:
    Added ifdef sections for "H5_USING_PURIFY" in various places in the code,
which are designed to reduce the spurious "uninitialized memory read" warnings
from purify which are actually OK.  Note that this macro will have to be
turned on by adding it to the CFLAGS for the build - I didn't think it was
important enough to add a configure flag for.

    Also, the changes in H5HG.c optimize the walks through the objects in a
heap to only look at the 'used' entries instead of all the 'allocated' entries.

Platforms tested:
    Solaris 2.7 (arabica) w/purify
    Not tested by h5committest
2004-07-25 23:41:52 -05:00
Quincey Koziol
881ba16bca [svn-r8945] Purpose:
Code optimization

Description:
    Eliminate duplicated call to H5T_detect_class()

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-25 23:33:34 -05:00
Quincey Koziol
8b866d0e85 [svn-r8942] Purpose:
Code optimization

Description:
    Changed calloc() calls to malloc() calls allocating background buffers
during dataset writes, since the background buffer information will be read
from disk anyway, overwriting any existing values.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-25 23:30:06 -05:00
HDF Admin
acdd4e1d3f [svn-r8940] Snapshot version 1.6 release 3 (snap0) 2004-07-25 21:22:15 -05:00
Albert Cheng
062decfdce [svn-r8939] Purpose:
Updated the library version to 1.6.3-snap0.
2004-07-23 13:43:50 -05:00
James Laird
8d843938ba [svn-r8937]
Purpose:
Bug fix

Description:
Modification time test (mtime) would die silently on some systems.  This is
because the code is very system-dependant (it relies on getting the current
time and the timezone from the OS).

Solution:
mtime test now uses TEST_ERROR macro to print "FAILED" and to output where the
failure occurred.  Configure script is a little smarter about whether
gettimeofday() function returns the timezone correctly.
Further bugs will need to be addressed on a system-by-system basis.

Platforms tested:
sleipnir, arabica, verbena, copper, windows (VC7)
2004-07-23 12:24:59 -05:00
Elena Pourmal
12ee450f70 [svn-r8935]
Purpose: Bug fix

Description: While working on the SZIP documentation with Frank, I realized
             that when scanline was less than 4k and bigger than pixels_per_block,
             it was not adjusted if number_of_blocks_per_scanline was bigger
             than max_number_of_blocks_per_scanline.

Solution: Fixed the code. Unfortunately it didn't help with the problem
          I had using h5repack with DOQGROD.he5 file.

Platforms tested: copper

Misc. update:
2004-07-22 18:38:45 -05:00
Albert Cheng
77ac102e43 [svn-r8934] Purpose:
Improvement

Description:
Removed "-D__GNUC__" which was a patch for previous version.
It is no longer needed.
Also moved the debug flags "-w2 and -Wall" to DEBUG_CXXFLAGS
so that they are used for debug mode only.
Also adjust CXXFLAGS setting so that -std=c99 is added only
if user has not preset CXXFLAGS.  This allows users the option
of not using it.

Platforms tested:
Tested in tg-NCSA only since that is the only ia64 platform
around.

Misc. update:
2004-07-22 17:35:25 -05:00
Albert Cheng
ba5b63d231 [svn-r8933] Purpose:
Feature

Description:
Added a configure summary at the end.

configure: generated from configure.in.

Platforms tested:
No h5committest by tested by hand in tg-ncsa.

Misc. update:
2004-07-22 17:27:40 -05:00
Xuan Bai
a12aaab67f [svn-r8931] Purpose:
Update.

Description:
Update dumptest batch file.

Solution:
Removed one h5dump testing to match with h5dump testings on Unix.

Platforms tested:
Microsoft Visual C++ 6.0 on Windows XP and 2000.

Misc. update:
2004-07-22 14:53:43 -05:00
James Laird
475718eb24 [svn-r8930] Purpose:
Code cleanup

Description:
Fixed reserved.c test to use h5_fileaccess/h5_fixname/h5_cleanup.
Updated RELEASE.txt for previous bug fix

Platforms tested:
sleipnir, verbena
2004-07-22 11:30:00 -05:00
James Laird
795cb2b1ed [svn-r8929] Purpose:
Code cleanup

Description:
Fixed reserved.c test to use h5_fileaccess/h5_fixname/h5_cleanup.
Updated RELEASE.txt for previous bug fix


Platforms tested:
sleipnir, verbena
2004-07-22 11:29:45 -05:00
Xuan Bai
184a7aba5e [svn-r8926] Purpose:
Update.

Description:
Update hdf5 testing batch files.

Solution:
1. Updated dumptest.bat, difftest.bat, lstest.bat, and repacktest.bat files
to match with correspondent testings on Unix.
2. Added one new batch file mask.bat, which will be called by lstest.bat to
mask off time information(this time information shows the local timezone and
has to be masked off.)

Platforms tested:
Microsoft Visual C++ 6.0 on Windows XP and 2000.
(will test with .NET on XP after this check-in.)

Misc. update:
2004-07-21 22:04:36 -05:00
Elena Pourmal
a013116c4d [svn-r8919]
Purpose: Maintenance

Description: Documented SZIP change.

Solution:

Platforms tested:

Misc. update:
2004-07-21 16:04:08 -05:00
Elena Pourmal
031fa6696d [svn-r8918]
Purpose: Improvement

Description: HDF5 Library set pixels_per_scanline parameter to the size of the chunk's
             fastest changing dimension.  As a result, fastest changing dimension
             of the chunk could not be bigger than 4K and smaller than pixels_per_block
             value and szip compression couldn't be used for many real datasets.

Solution: Reworked algorithm how HDF5 sets pixels_per_scanline value; only chunks
          with the total number of elements less than pixels_per_block value are rejected.
          There is no restriction on the size of the chunk's fastest changing
          dimension anymore.
          Modified the test according to the new algorithm.

Platforms tested: verbena, copper, sol

Misc. update:
2004-07-21 15:56:22 -05:00
Elena Pourmal
c106102b9a [svn-r8917]
Purpose: Improvement

Description: HDF5 Library set pixels_per_scanline parameter to the size of the chunk's
             fastest changing dimension.  As a result, fastest changing dimension
             of the chunk could not be bigger than 4K and smaller than pixels_per_block
             value and szip compression couldn't be used for many real datasets.

Solution: Reworked algorithm how HDF5 sets pixels_per_scanline value; only chunks
          with the total number of elements less than pixels_per_block value are rejected.
          There is no restriction on the size of the chunk's fastest changing
          dimension anymore.

Platforms tested: verbena, copper, sol

Misc. update:
2004-07-21 15:55:44 -05:00
Albert Cheng
4e98e2d19a [svn-r8914] Purpose:
Bug fix and feature.

Description:
The setenv was done in runtest but it has the effect will linger
onto the next test.  So, if the first test sets $CXX to a certain
value, it lingers on the all following tests of the same host.
This is usually not desired.

Solution:
Move the actual setenv code to snapshot.  Runtest now just parses them
and pass along the setenv request to snapshot.

Platforms tested:
no h5comittest which does not really test the change.
Hand tested in eirene with Tg-NCSA.

Misc. update:
2004-07-21 15:16:01 -05:00
Pedro Vicente Nunes
7dc938f649 [svn-r8911] Purpose:
bug fixes

Description:

the return error code for a  function was not initialized.
in HP-UX  it happened that this variable was initialized to -1
causing the function to return with an error condtion
solution : initialized the variable to 0

the name of the dataset was printed after the differences in verbose mode
and report when differences were found
solution : check first if differences were found and then
print the name of dataset and differences
in verbose mode always print the name first


Solution:

Platforms tested:
linux
HP-UX
solaris
AIX

Misc. update:
2004-07-21 12:50:11 -05:00
Pedro Vicente Nunes
c157f86368 [svn-r8908] Purpose:
updated documentation and usage message

Description:
updated the html documentation for the new h5diff modes
added a section for h5repack

Solution:

Platforms tested:
linux

Misc. update:
2004-07-20 16:44:55 -05:00
Pedro Vicente Nunes
c911905f27 [svn-r8903] Purpose:
h5diff and h5repack changes

Description:
h5diff
introduced the following four modes of output:
 Normal mode: print the number of differences found and where they occured
  Report mode: print the above plus the differences
   Verbose mode: print the above plus a list of objects and warnings
    Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found)

    h5repack
     added an extra parameter for SZIP filter (coding method)
     the new syntax is
     -f SZIP=<pixels per block,coding>
     (pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN')
     Example of use:
     ./h5repack -i file1 -o file2 -f SZIP=8,NN -v

     updated usage messages, test scripts and files accordingly



Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-07-20 14:20:01 -05:00
Quincey Koziol
f75ed67d2b [svn-r8902] Purpose:
Bug fix

Description:
    Allow buffer parameter to H5Dread & H5Dwrite to be NULL if there are no
elements to transfer.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-20 12:11:38 -05:00
James Laird
7547be91e5 [svn-r8900]
Purpose:
Bug Fix

Description:
H5Sset_extent_simple causes errors if used to reduce a space's maxdims to zero.

Solution:
H5Sset_extent_simple now cleans up the pointer.  Added a regression test.

Platforms tested:
sleipnir (very minor change)
2004-07-20 11:28:56 -05:00
James Laird
1b0b9048b7 [svn-r8898]
Purpose:
Bug Fix

Description:
Trying to create the root group or the working group ("/" or ".") fakes out
HDF5 so that it neither creates a group nor returns an error.

Solution:
H5G_namei now throws an error if it was supposed to insert but didn't.

Platforms tested:
sleipnir, Visual Studio 7 (very minor change)
2004-07-19 19:52:28 -05:00
Binh-Minh Ribler
b79142ca2b [svn-r8895] Purpose: Fixing typos
Description:
    Class name was left in function prototypes by mistake.  Removed it.

Platforms tested:
    HPUX 11.00 (kelgia)
    Linux 2.4 (eirene)
2004-07-17 00:27:47 -05:00
Binh-Minh Ribler
0f985ebb0a [svn-r8894] Purpose: Fixing platform specific problem
Description:
    Some platforms don't support std, and I missed handling that
    situation in my last change for these files.

Solution:
    Added 'using' statement where appropriate.

Platforms tested:
    HPUX 11.00 (kelgia)
    Linux 2.4 (eirene)
2004-07-17 00:24:58 -05:00
Quincey Koziol
f81bf3b56f [svn-r8893] Purpose:
Code cleanup

Description:
    Clean up a bunch of warnings and bring new code better inline with current
library coding practice.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest

Misc. update:
2004-07-16 15:48:45 -05:00
Xuan Bai
c1666563b7 [svn-r8891] Purpose:
Update.

Description:
Due to the source codes change, added 2 new projects to the Windows workspace and updated source
codes for several Windows projects.  Updated 2 HDF5 tool testing batch files.

Solution:
1. Added 2 new projects reserved and reserveddll to the Windows workspace.  These two projects include
the new source code reserved.c.
2. Added H5RC.c and H5RCPrivate.h to hdf5 and hdf5dll projects.
3. testh5repack_filers.c and testh5repack_layout.c were removed from HDF5 1.6 branch by Prdro.  Removed
these 2 files from h5repacktst project.
4. Pedro updated h5dump and h5repack testings.  Updated dumptest.bat and repacktest.bat batch files to
match with current h5dump and h5repack testings in Unix.

Platforms tested:
Microsoft Visual C++ 6.0/.NET on Windows XP.
Microsoft Visual C++ 6.0 on Windows 2000.

Misc. update:
2004-07-16 10:33:48 -05:00
Binh-Minh Ribler
5bc3314c9b [svn-r8890] Purpose: Code cleanup
Description:
    Renamed some private functions appropriately.
    Moved some functions from Group into the base class CommonFG for
        H5File to use too.
    Updated function headers as progressively reviewing the generated RM.
    Also, fixed a daily test failure on kelgia by adding #ifndef H5_NO_STD
        to H5IdComponent.h.  I tried to test on kelgia before my checkin
        last time, but something was not right in my environment, and I
        wasn't able to test.  I did test on three platforms though.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    Windows XP
2004-07-16 00:30:03 -05:00
Albert Cheng
909b3f6bea [svn-r8887] Purpose:
Improvement.

Description:
Moved the "-Wall -g -O0" to DEBUG_CFLAGS so that they are
used only in development mode.

Platforms tested:
Tested in TG-NCSA since this change affects ia64 platform only.

Misc. update:
2004-07-15 17:47:25 -05:00
Albert Cheng
a6889aa255 [svn-r8885] Purpose:
Bug fix

Description:
It uses the value of $ARCH as a gcc option but the linux clusters
at NCSA define $ARCH as environment variable with values that are
not a valid compiler option.  That caused the configure to fail
because it was not able to compile at all.

Solution:
Change ARCH to lower case $arch (convention dictates environment
variables are upper cases.)  Also preset $arch to null and do not
honor any pass it values.

Platforms tested:
Attempted to run h5committest but sol was failing due to /tmp
filled.  Copper failed in parallel test but that could be a
system problem since it was totally loaded.  Verbena failed in
h5diff which has nothing to do with the change.
Tested in TG_NCSA (gcc and ecc)--both failed in h5diff.  Again,
nothing to do with the change.  So, it is safe to commit this
change.

Misc. update:
2004-07-15 16:56:54 -05:00
Pedro Vicente Nunes
a8994e3c71 [svn-r8883] Purpose:
bug fix, new feature

Description:
fixed  bug in the parse function:
  cases where we have an already inserted name but there is a new name also
    example:
      -f dset1:GZIP=1 -l dset1,dset2:CHUNK=20x20
        dset1 is already inserted, but dset2 must also be (it was not)


	added a CHECK_SZIP symbol to enable/disable checking of library related szip parameters
	added the print of the filter name in verbose mode (confirms visually that the filter was applied )



Solution:

Platforms tested:
linux
aix
solaris

Misc. update:
2004-07-15 15:05:05 -05:00
James Laird
d59d7be140 [svn-r8880]
Purpose:
Bug fix

Description:
Replaced "unsigned long long" with hsize_t in H5MF
Added "return 0" at end of reserved.c test (duh!).

Platforms tested:
arabica, sleipnir
2004-07-15 10:34:48 -05:00
James Laird
d89d73048a [svn-r8876]
Purpose:
Bug Fix

Description:
If an HDF5 file grows larger than its address space, it dies and is unable to
write any data.  This is more likely to happen since users are able to change
the number of bytes used to store addresses in the file.

Solution:
HDF5 now throws an error instead of dying.  In addition, it "reserves" address
space for the local heap and for object headers (which do not allocate space
immediately).  This ensures that after the error occurs, there is enough address
space left to flush the entire file to disk, so no data is lost.
A more complete explanation is at /doc/html/TechNotes/ReservedFileSpace.html

Platforms tested:
sleipnir, copper (parallel), verbena, arabica, Windows (Visual Studio 7)

Misc. update:
2004-07-14 14:32:51 -05:00
Quincey Koziol
f0fe9b0114 [svn-r8875] Purpose:
Bug fix

Description:
    Correct problems with "resurrecting" a dataset in a file.  (This occurs
when a dataset which is open gets unlinked from the group hierarchy (making it
"dead" and marked for deletion in the file) and then is re-linked to the group
hierarchy).  Note that the current solution applies only to datasets, further
work will fix this for groups and named datatypes also.
    Also, fix the "debug" routines to be a little more helpful in certain
situations.
    Additionally, fix a locking bug in the symbol table node splitting routine
which could be [one of] the cause[s] of the file corruption in flexible
parallel operation.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    h5committested
2004-07-14 14:08:37 -05:00
Binh-Minh Ribler
b67740452b [svn-r8873] Purpose: Adding test for new wrappers
Description:
    Added test_file_name for new wrappers
        H5File::getFileName
        H5Object::getFileName
    Also, replaced macro VERIFY with template function verify_val to
    verify read data/info and did some minor cleanup.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    Windows XP
2004-07-14 00:16:16 -05:00
Binh-Minh Ribler
87a59c6f1c [svn-r8872] Purpose: Fixing bug
Description:
    DataType::commit had incorrect parameter, H5Object.  Changed
    it to CommonFG, for H5File and Group.
    The change caused additional header files needed for several
    other cpp files.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    Windows XP


Misc. update:
2004-07-14 00:11:52 -05:00
Binh-Minh Ribler
2eaa20781d [svn-r8871] Purpose: Adding wrapper for new C API
Description:
    Added wrappers for H5Fget_name:
        H5File::getFileName
        H5Object::getFileName

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    Windows XP
2004-07-14 00:06:33 -05:00
Pedro Vicente Nunes
fa3be978e5 [svn-r8870] Purpose:
updated some comments

Description:

Solution:

Platforms tested:
linux

Misc. update:
2004-07-13 15:36:59 -05:00
Quincey Koziol
e240c00154 [svn-r8868] Purpose:
Bug fix

Description:
    Fix error in chunked dataset I/O where data written out wasn't read
correctly from a chunked, extendible dataset after the dataset was extended.

    Also, fix parallel I/O tests to gather error results from all processes,
in order to detect errors that only occur on one process.

Solution:
    Bypass chunk cache for reads as well as writes, if parallel I/O driver is
used and file is opened for writing.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-13 13:42:50 -05:00
Quincey Koziol
0b2827f9ce [svn-r8866] Purpose:
Code optimization

Description:
    Re-work the insertion of a new child into an existing node, to exploit
some speedups for adding the rightmost child, since this is a very common case
when appending records to an unlimited size dataset.

    Also, hoist the checks for the tree's 'K' value into a field in the shared
information about the tree, instead of re-calculating them all the time.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-13 12:44:05 -05:00
Pedro Vicente Nunes
81f50b436d [svn-r8864] Purpose:
new file for the h5repack tests

Description:

Solution:

Platforms tested:

Misc. update:
2004-07-13 12:06:14 -05:00
Pedro Vicente Nunes
45cd1e2e8b [svn-r8863] Purpose:
h5repack changes

Description:
there were some requests to change some minor h5repack features
h5repack only made a warning about a non available filter in verbose mode ( -v )
without -v it kept silent, and users sometimes missed this warning

the request was that it should print this warning always. so, the new format, is e.g

./h5repack -i test_szip.h5 -o out.h5
Warning: dataset </dset_szip> cannot be read, SZIP filter is not available

due to this, and to avoid a lot of these messages in the shell test script, I modified
the script h5repack.sh so that it detects the presence of all filters in the environment
(previously it only detected SZIP)
the test files were also divided in more files , to make the script code easier to
follow


Solution:

Platforms tested:
linux
AIX (without SZIP)
solaris (without gzip and SZIP)


Misc. update:
2004-07-13 10:21:16 -05:00
Quincey Koziol
9e7fcd24e3 [svn-r8862] Purpose:
Code optimization

Description:
    Avoid calling vector comparison routine when operating on 1-D chunks.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-12 11:50:49 -05:00
Quincey Koziol
d50d5cae24 [svn-r8861] Purpose:
Correct typo in file format for compact layout information
2004-07-12 11:50:31 -05:00
Binh-Minh Ribler
10bae2c875 [svn-r8857] Purpose: Adding more C++ wrappers and documentation
Description:
    Added documentation and C++ wrappers for many C APIs to:
        H5PropList.*
        H5FaccProp.*
        H5DcreatProp.*
        H5DxferProp.*
        H5DataType.*
        H5Group.*
    Tests will follow soon.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
2004-07-11 00:27:00 -05:00
Binh-Minh Ribler
83ff4069fd [svn-r8856] Purpose: Fixing bug# 133
Description:
    Added a check before decrementing reference counter in
    RefCounter::decrement.  Changed the check for counter's
    value before returning, in RefCounter::noReference.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)

Misc. update:
2004-07-11 00:25:22 -05:00
Quincey Koziol
34d1d056c9 [svn-r8854] Purpose:
Code optimization

Description:
    Refactor B-tree code to extract all common information for a B-tree into a
shared structure that is pointed to by all the nodes in tree (instead of being
included in each node).

    Also re-order B-tree node comparison checks for chunked datasets to
check for >= the upper node first, since the comparison is a bit "heavy" and
this check is more likely to succeed when you are adding records to the
dataset.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
    (also, recent h5dump commits have broken testing...)
2004-07-09 21:28:11 -05:00
Pedro Vicente Nunes
ce2c695798 [svn-r8851] Purpose:
h5dump new tests

Description:
added new tests for the print of array indices (nested objects, several ranks)

Solution:

Platforms tested:

Misc. update:
2004-07-09 09:58:50 -05:00
Quincey Koziol
93f724cecf [svn-r8848] Purpose:
Code cleanup & small optimization

Description:
    Eliminate redundant recomputation of native key pointer offsets.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    too minor to require h5committest
2004-07-08 21:38:24 -05:00
Quincey Koziol
6beaf50c8f [svn-r8846] Purpose:
Bug fix

Description:
    The "shared" raw B-tree node can get freed before all the B-tree nodes
had been flushed out to disk and released by the cache.

Solution:
    Implement a simple reference counting wrapper for objects in the library
and use it to hold the shared raw B-tree nodes so they aren't freed before all
references to them in memory are released.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir)
    IRIX64 6.5 (modei4)
2004-07-08 21:06:32 -05:00
cvs2svn
9437a26865 [svn-r8845] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-07-08 21:06:32 -05:00
Binh-Minh Ribler
65cf95ab06 [svn-r8843] Purpose: Fixing minor bug
Description:
    Changed call to H5File::getFileSize according to C library and
    removed CHECK for this call because failure will be handled by
    exception.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    C tests are having problems, but I did run the C++ tests.

Misc. update:
2004-07-08 19:42:11 -05:00
Binh-Minh Ribler
3062c4dd1e [svn-r8842] Purpose: Adding documentation with doxygen and fixing minor bug
Description:
    Added function headers with doxygen.
    Changed H5File::getFileSize according to C library.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    C tests are having problems, but I did run the C++ tests.

Misc. update:
2004-07-08 19:38:49 -05:00
Pedro Vicente Nunes
636fc2be4a [svn-r8841] Purpose:
bug fix

Description:
when printing array indices , the calculation of the current column was not done
correctly

Solution:

Platforms tested:
linux
AIX
solaris

Misc. update:
2004-07-08 16:51:12 -05:00
Frank Baker
3b01516da6 [svn-r8839]
Purpose:
    Version 3 of document, from August 2003
2004-07-08 16:21:09 -05:00
Elena Pourmal
3eeb0d9d54 [svn-r8835]
Purpose: Maintenance

Description: Added h5fget_name_f and h5fget_filesize_f subroutines and tests.

Solution: N/A

Platforms tested: arabica (32-bit), sol (64-bit).
                  Will test on copper after this check-in.


Misc. update:
2004-07-08 11:42:36 -05:00
Binh-Minh Ribler
e8cb6650ca [svn-r8830] Purpose: Remove files
Description:
    Removed c++/examples/*.h5

Platforms tested:
    Not necessary
2004-07-07 23:16:15 -05:00
Binh-Minh Ribler
7361049db1 [svn-r8829] Purpose: Update Makefile.in
Description:
    Removed macro H5_FILES from Makefile.in so that output files from the
    example programs will not be installed.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    I also tried to test on Linux 2.4 (eirene) but there was a failure
    in the C test.
2004-07-07 23:14:18 -05:00
Pedro Vicente Nunes
d4777031e9 [svn-r8827] Purpose:
one of the test files (tfilters.h5) changed contents

Description:

Solution:

Platforms tested:
linux
solaris

Misc. update:
2004-07-07 17:10:23 -05:00
Pedro Vicente Nunes
d02acc8f60 [svn-r8825] Purpose:
h5dump new tests

Description:
added more tests for the escape/not escape feature for string data (with vlen, with
compound, with char data)

Solution:

Platforms tested:

Misc. update:
2004-07-07 16:41:16 -05:00
Quincey Koziol
8d7e8124f1 [svn-r8824] Purpose:
Code optimization

Description:
    Since the raw B-tree nodes are the same size and only used when reading in
or writing out a B-tree node, move raw B-tree node buffer from being per node
to a single node that is shared among all B-tree nodes of a particular tree,
freeing up a lot of space and eliminating lots of memory copies, etc.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-07 16:25:33 -05:00
Raymond Lu
2afbcb2f0e [svn-r8819] Purpose: Potential bug fix
Description:  In H5Fget_filesize, file size was returned as haddr_t.

Solution:  Return file size as hsize_t and parameter for Fortran.

Platforms tested:  eirene
2004-07-07 13:04:16 -05:00
Binh-Minh Ribler
c889f67f9c [svn-r8815] Purpose: Remove files
Description:
    These data files are generated by the example programs and shouldn't
    need to be in the CVS.  Removed them.

Platforms tested:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)


Misc. update:
2004-07-06 21:16:43 -05:00
Pedro Vicente Nunes
01c549696d [svn-r8814] Purpose:
corrected a wrong dataset name in the test script

Description:

Solution:

Platforms tested:
linux (small)

Misc. update:
2004-07-06 16:08:13 -05:00
Pedro Vicente Nunes
69302997ac [svn-r8811] Purpose:
update one file

Description:
one file used for the h5dump tests had changed contents

Solution:

Platforms tested:
linux (small)

Misc. update:
2004-07-06 14:00:12 -05:00
Pedro Vicente Nunes
10289819c7 [svn-r8810] Purpose:
h5dump new tests

Description:
added new tests for the -p option, superblock, file contents, fill values, array indices.

Solution:

Platforms tested:
linux
AIX
solaris

Misc. update:
2004-07-06 13:28:13 -05:00
Quincey Koziol
46e30acda1 [svn-r8808] Purpose:
Code optimization

Description:
    Don't copy layout information, just point to existing information.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-05 14:20:03 -05:00
Quincey Koziol
2cc37b9460 [svn-r8806] Purpose:
Code optimization & bug fix
    CVS: [is this a bug fix? feature? ...]

Description:
    Speed up "fast comparison" lookups in trees by a factor of 2-3x

    Correctly handle "fast comparisons" for unsigned values (esp. hsize_t).

Solution:
    Mostly removing if statements and redundant assigns, etc.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-05 12:09:56 -05:00
HDF Admin
208f5631d3 [svn-r8804] Snapshot version 1.6 release 2 (post8) 2004-07-04 20:56:05 -05:00
Quincey Koziol
22d442825b [svn-r8802] Purpose:
Code optimization

Description:
    Set up datatype ID for dataset's datatype on disk.  This allows us to avoid
repeatedly copying the datatype when an ID is needed.

    Also, clean up a few warnings in various other places.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-03 15:05:19 -05:00
Elena Pourmal
513012e673 [svn-r8798]
Purpose: Maintenance

Description: H5_SZIP_CHIP_OPTION_MASK was deleted from the list
             of the available parameters for the H5Pset_szip function.

Solution: Updated Fortran source, tests and documentation
          to reflect this change.

Platforms tested: arabica (too small for h5committest)

Misc. update:
2004-07-02 21:37:59 -05:00
Frank Baker
e29eb9c99d [svn-r8795]
Purpose:
    Added Fortran90 subroutine h5sget_select_bounds_f.

Platforms tested:
    Mozilla
2004-07-02 16:53:39 -05:00
Pedro Vicente Nunes
3897645d92 [svn-r8793] Purpose:
Description:
for the file contents dump and for hardlinks, one arrow "->" is printed, followed
by the first  found name for that object
options for not printing specific types of objects were postponed


Solution:

Platforms tested:
linux
AIX
solaris

Misc. update:
2004-07-02 15:46:16 -05:00
Frank Baker
9c19127e54 [svn-r8789]
Purpose:
    To more carefully describe the behavior of H5Pset_external.

Description:
    Add notes that first H5Pset_external call sets the dataset as EXTERNAL
    and identifies the first file in the series of external files that
    will hold the dataset; subsequent calls identify additional files;
    all external files must be declared before the dataset is created;
    and the library will create files that don't yet exist on the system
    at the time that H5Dwrite is called to write data to that file.
    Also a few copy edits.

Platforms tested:
    Mozilla
2004-07-02 10:50:02 -05:00
Pedro Vicente Nunes
d100f26a7c [svn-r8788] Purpose:
bug fix

Description:
the original code that showed a name for HARDLINK was reassigning that name to a name
made in the dump traversal (made by concatenation by nested objects)


Solution:
removed this reassigmnet
now the name showed after HARDLINK is always the first name found for that object
(this object is printed once interely; subsequent printings show the word HARDLINK
and the first name )

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-07-02 10:31:30 -05:00
Frank Baker
ee3fbc240d [svn-r8787]
Purpose:
    SZIP and general filter updates

Description:
    Added SZIP to the introductory paragraphs and as appropriate in
        the Fortran subroutine descriptions.
    Revised the introductory discussion, which had focussed on
        one compression filter, to allow for multiple filters of
        different types.
    Added list of distributed filters to intro.
    Also some copy edits and minor formatting.

Platforms tested:
    Mozilla, Safari
2004-07-01 18:45:19 -05:00
Frank Baker
6f0f86aa3f [svn-r8785]
Purpose:
    Corrected copyright link.

Platforms tested:
    Mozilla
2004-07-01 18:07:12 -05:00
Frank Baker
dcb8bc3f1c [svn-r8784]
Description:
    Added "API Changes" section for Release  1.6.3.
    Includes templates and an incomplete scattering of initial entries.

Platforms tested:
    Mozilla
2004-07-01 17:19:40 -05:00
Quincey Koziol
5ccfe5a724 [svn-r8783] Purpose:
Code cleanup

Description:
    Clean up almost all warnings from Windows builds.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-07-01 15:03:10 -05:00
Pedro Vicente Nunes
700a3f0b3c [svn-r8780] Purpose:
bug fix

Description:
an if statment was wrongly placed before a swith-case statment, causing the
fall to the next case
this error was only detected by the C99 compiler (gcc 3.44)

Solution:
put if after the case

Platforms tested:
sleipnir with gcc 3.4
linux

Misc. update:
2004-07-01 09:59:46 -05:00
Pedro Vicente Nunes
23ea43d9c8 [svn-r8776] Purpose:
changed the name of the dataset for the link file contents example, it was confusing

Description:

Solution:

Platforms tested:
linux (small change)

Misc. update:
2004-06-30 14:45:31 -05:00
James Laird
10834e1e8f [svn-r8775]
Purpose:
Fixed a bug that broke daily tests.
SZIP now always uses K13 compression.

Description:
When configured with the --srcdir option, dsets test would look for
a test file in the same directory as the test, instead of in the
directory that contains the source files.

SZIP never needs to use CHIP compression, so the option to set this flag
instead of K13 compression has been removed.



Platforms tested:
Copper
2004-06-30 14:12:22 -05:00
Pedro Vicente Nunes
822af258c7 [svn-r8774] Purpose:
bug fix

Description:
the indentation was not made properly for nested objects when printing array indices

Solution:
added the indentation to h5tools_simpple_prefix

Platforms tested:
linux
AIX
solaris

Misc. update:
2004-06-30 13:57:23 -05:00
Raymond Lu
ddb825f2a8 [svn-r8771] Purpose: Update for new function.
Description:  Forgot to add new function H5Fget_name for MPE.

Solution:  Simple define color_H5Fget_name as 'red' in this file.

Platforms tested:  Very simple change.  No test needed.
2004-06-30 11:53:56 -05:00
Raymond Lu
e0d268380a [svn-r8770]
Purpose:  New feature and its test

Description:  Added API H5Fget_name.  It returns the name of file by object ID(file, group, dataset, named datatype, attribute) which belongs to the file.  filename.c tests this function.


Platforms tested:  h5committest

Misc. update:  MANIFEST, RELEASE.txt
2004-06-30 11:41:14 -05:00
cvs2svn
f0eb18d140 [svn-r8769] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-06-30 11:41:14 -05:00
Binh-Minh Ribler
09dd5e1625 [svn-r8764] Purpose:
Adding documentation with doxygen and fixing warnings

Description
    Added function headers with doxygen to H5Exception.cpp.
    Removed two extra functions, H5Object::Reference, being added by
    mistake and fixed some compilation warnings.

Platforms:
    Linux 2.4 (eirene)
    SunOS 5.7 (arabica)
2004-06-29 23:26:29 -05:00
Xuan Bai
25d4f9b024 [svn-r8763] Purpose:
Temporary bug fix.

Description:
h5dump debug and debug dll testings failed for the following 2 tests:
TOOLTEST thlink.h5.xml --xml thlink.h5
TOOLTEST tmany.h5.xml --xml tmany.h5
in Windows.  These are known unsolved failures.  To run the auto-compile,
auto-test for hdf5 in Windows, these 2 tests need to be turned off temporarily.

Solution:
Turn off the above h5dump 2 tests temporarily.

Platforms tested:
Windows XP/Visual C++ 6.0 and .NET>

Misc. update:
2004-06-29 22:40:46 -05:00
Quincey Koziol
eb0f44eee9 [svn-r8761] Purpose:
Code cleanup & small bug fix

Description:
    Regenerate dependency files

    Add htri_t as separate type from hbool_t for code tracing purposes.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    too minor to require h5committest
2004-06-29 16:03:52 -05:00
Pedro Vicente Nunes
1e6d66909c [svn-r8759] Purpose:
h5dump new feature

Description:
added the dump of unamed datatypes for the file contents
added a colon as separator for the indices array option

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-06-29 12:50:04 -05:00
Nat Furrer
3ee761cfa8 [svn-r8757]
Purpose:
Added an HDF5 file for testing purposes.

Description:

Solution:

Platforms tested:

Misc. update:
2004-06-29 12:08:16 -05:00
Nat Furrer
122b313734 [svn-r8756]
Purpose:
Fixed the problem with 1.6 daily tests.

Description:
Changed the directory the Makefile uses to find h5repack.sh.  It is now
./ instead of ${srcdir}.  Hopefully, this should fix the problem.

Solution:

Platforms tested:
  Copper

Misc. update:
2004-06-29 10:45:13 -05:00
Quincey Koziol
ab97da906a [svn-r8755] Purpose:
Update format info

Description:
    Clarify description of filter mask flags for chunked datasets.
2004-06-28 15:27:51 -05:00
Nat Furrer
6d682a5a28 [svn-r8753]
Purpose:
Handled SZIP without the encoder present.

Description:
It is now an error for a user to try to create, extend, or write to a
dataset without the encoder present in their SZIP library.
Added H5Zget_filter_info to provide users with a way to query HDF5
about the presence (or lack thereof) of the SZIP encoder.

Platforms tested:
  Windows
  Verbena
  Arabica
  Copper

Misc. update:
2004-06-28 14:46:03 -05:00
Raymond Lu
903580837a [svn-r8751] Purpose: Bug fix
Description:  Forgot to add H5Fget_filesize to H5MPprivate.h for MPE.

Solution:  Define color_H5Gget_filesize as "red".

Platforms tested:  Tested v1.7 on copper.  Simple change.
2004-06-28 09:52:34 -05:00
Pedro Vicente Nunes
7438a71a0b [svn-r8748] Purpose:
dumper new feautures

Description:
1) added options for not printing : datasets, groups, datatypes, links
2) added a section for the user block
3) in the traversal routine, added the printing of an arrow for soft links and the word HARDLINK for hardlinks
   the print of the file contents is made during traversal , instead of at the end of it (this is helpful
    for very large files, where the wait time can be very long)
4) changed the description of the fill value properties
5) added a colon after the printing of the array indices



Solution:

Platforms tested:
linux
AIX
solaris

Misc. update:
2004-06-28 09:05:16 -05:00
Pedro Vicente Nunes
a9c3f57785 [svn-r8747] Purpose:
dumper new feautures

Description:
1) added options for not printing : datasets, groups, datatypes, links
2) added a section for the user block
3) in the traversal routine, added the printing of an arrow for soft links and the word HARDLINK for hardlinks
   the print of the file contents is made during traversal , instead of at the end of it (this is helpful
    for very large files, where the wait time can be very long)
4) changed the description of the fill value properties
5) added a colon after the printing of the array indices



Solution:

Platforms tested:

Misc. update:
2004-06-28 09:04:29 -05:00
Binh-Minh Ribler
5935247f99 [svn-r8745] Purpose:
Fixing minor bug

Description
    The new function H5File::getFileSize was missing a return statement.
    Added it.

Platforms:
    SunOS 5.7 (arabica)
2004-06-27 22:14:46 -05:00
Binh-Minh Ribler
3fe2e8a513 [svn-r8744] Purpose:
Add documentation with doxygen

Platforms:
    Linux 2.4 (eirene)
    I need to check in these files now to prevent loss of effort, but
        will check out and test on 2 more platforms asap.
2004-06-27 20:34:49 -05:00
Raymond Lu
9b84be1422 [svn-r8743] *** empty log message *** 2004-06-25 10:16:15 -05:00
Raymond Lu
c95b683457 [svn-r8742] Purpose: New feature and bug fix.
Description:  1. A new API function H5Fget_filesize was added to return the actual size
of an opened file.  2. In H5Gpublic.h, object types are defined as integers in v1.4
instead of H5G_obj_t in v1.6.  In titerate.c, H5G_obj_t couldn't be recognized if compatibility
with v1.4 is enabled.

Solution: 1.  Call H5FDget_eof to return file size in H5Fget_filesize.  2. When compatibility with
v1.4 is enabled, define variable as integer instead of H5G_obj_t.

Platforms tested:  h5committest.

Misc. update:  RELEASE.txt
2004-06-25 10:15:27 -05:00
Frank Baker
cdf28fd58f [svn-r8738]
Purpose:
    Bugfix and clarification

Description:
    H5Pget_driver -- removed H5FD_DPSS from valid drivers list;
        DPSS is long gone.
    H5Pset_shuffle -- clarified value and use of shuffle filter.

Platforms tested:
    Mozilla
2004-06-24 17:12:59 -05:00
Quincey Koziol
1dc234fd96 [svn-r8737] Purpose:
Code cleanup

Description:
    Some code cleanups before starting serious optimization efforts.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel
    Solaris 2.7 (arabica)
    Too minor to require h5committest
2004-06-24 14:41:22 -05:00
Pedro Vicente Nunes
38b0c5f558 [svn-r8734] Purpose:
cleaned compiler  warnings

Description:

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-06-24 08:24:40 -05:00
Quincey Koziol
09ee6ebc4c [svn-r8733] Purpose:
Code cleanup

Description:
    Reduce compiler warnings on SGI IRIX

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    SGI IRIX6 (Cheryl's machine)
    Too minor to require full h5committest
2004-06-23 12:57:16 -05:00
Quincey Koziol
d6bb759cbd [svn-r8729] Purpose:
Code cleanup

Description:
    Add more testfiles to the "clean" targets

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    h5committest
2004-06-23 10:31:03 -05:00
Quincey Koziol
79184f310f [svn-r8727] Purpose:
Code cleanup & addition

Description:
    Add new warnings for gcc 3.4.x

    Re-work production mode compile flags to work better.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    h5committest
2004-06-23 10:30:22 -05:00
Quincey Koziol
0eb01e1a42 [svn-r8726] Purpose:
Refactor bug fix

Description:
    Make bug fix for detecting the type of a soft link more general by
    registering an "isa" function for soft links.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-06-23 09:04:11 -05:00
Raymond Lu
a782fe28ed [svn-r8724] *** empty log message *** 2004-06-22 16:52:14 -05:00
Raymond Lu
da4021c41d [svn-r8723] Purpose: Bug fix and test.
Description:  Function H5Gget_objtype_by_idx failed to handle soft link
object.  The library returned object type by calling H5G_get_type through
H5B_iterate.  But H5G_get_type only deals with objects with valid header
address which soft link doesn't have.


Solution:  In H5G_node_type, make soft link a special case by checking if
the object type is H5G_CACHED_SLINK.  Also added a test of soft and hard links
to titerate.c


Platforms tested:  eirene and copper(tested h5committest for v1.7)
2004-06-22 16:51:41 -05:00
Pedro Vicente Nunes
bb5ed44dd6 [svn-r8717] Purpose:
h5dump new features

Description:
the storage layout output format  had some changes
same for the user defined filter
add an option (-y) for not printing the array indices (default is print indices )
the option for escaping non printable characters covers all characters (default is not escape)
add tests for the new options


Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-06-22 10:36:56 -05:00
cvs2svn
ad9a4a2d97 [svn-r8716] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-06-22 10:36:56 -05:00
HDF Admin
1bb801fe2f [svn-r8710] Snapshot version 1.6 release 2 (post7) 2004-06-20 20:56:21 -05:00
Robert E. McGrath
25a80ea2dc [svn-r8708] Purpose:
This fixes bug mozilla_145

Description:
Output from h5dump is truncated on SGI

Solution:
Revise h5tools_str_append.

Changed the check for the return value from vsnprintf to handle
overflows correctly.

Added a special check for the case where HAVE_VSNPRINTF is not
defined. (Windows doesn't have this function.)  Will abort() if
memory is overwritten.  This overflow appears to be rare, but
if we get reports of hitting this abort() we can try a more
robust solution for platforms lacking vsnprintf.

Platforms tested:
arabica
verbena
hirdls (IRIX64 serial)
windows 2000

Misc. update:
2004-06-18 12:52:24 -05:00
Xuan Bai
5d2983abf6 [svn-r8701] Purpose:
Update.

Description:
Update hdf5 tools testing batch files in Windows.

Solution:
Update hdf5 import and repack testing batch files: importtest.bat and repacktest.bat.

Platforms tested:

Misc. update:
2004-06-17 12:27:15 -05:00
Raymond Lu
0ed0224142 [svn-r8700] *** empty log message *** 2004-06-17 11:53:36 -05:00
Raymond Lu
ec6ff32ec7 [svn-r8699] Purpose: Bug fix and new test.
Description:  A user reported a bug on Windows when writing data of array data
type of compound type with variable-length type.  I didn't see any problem on
Unix.  But Purify revealed some memory errors and leaks.

Solution:  Fixed memory leaks and added new test for it.

Platforms tested:  h5committest.
2004-06-17 11:53:26 -05:00
Quincey Koziol
65370b8417 [svn-r8697] Purpose:
Code optimizations

Description:
    Eliminate memset() call in H5S_set_extent_simple().

    Use malloc() instead of calloc in H5B<mumble>.

    Change global heap code to track heap objects that are in use in order to
allocate new objects more quickly and also to avoid memset() and calloc() calls.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-16 13:57:18 -05:00
Quincey Koziol
a7f0ce8fc5 [svn-r8695] Purpose:
Code optimization

Description:
    Avoid memcpy() when setting up new chunk coordinates

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-15 11:12:49 -05:00
Quincey Koziol
49c1c57ee1 [svn-r8693] Purpose:
Code optimization

Description:
    Avoid making copy of default vlen allocation info when default DXPL is
used.  Just retarget pointer to point to default info directly.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-15 11:03:34 -05:00
Quincey Koziol
a0fe318aac [svn-r8691] Purpose:
Code optimization

Description:
    Be smarter about copying hyperslab selection data and avoid memcpy() calls.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-15 09:59:22 -05:00
Pedro Vicente Nunes
33a566ea9b [svn-r8689] Purpose:
h5dump new feature

Description:
add processing of tab characters (in the context of the new CR/LF option )

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-06-15 09:37:04 -05:00
Quincey Koziol
d66de6e699 [svn-r8687] Purpose:
Code optimization

Description:
    Eliminate memcpy() when using default DXPL by pointing at existing
default object, instead of copying it.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-14 15:40:02 -05:00
Quincey Koziol
1b919a11da [svn-r8685] Purpose:
Bump version # after making snapshot for user.
2004-06-14 14:51:46 -05:00
Quincey Koziol
ffbd43d88b [svn-r8684] Purpose:
Code optimization

Description:
    Use 'size_t' instead of 'hsize_t' to track the number of elements in
memory buffers, especially for type conversion.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-14 14:33:08 -05:00
Raymond Lu
3247aa351e [svn-r8682] Purpose: Take out unnecessary step
Description:  I put function call of H5T_lock in H5T_open in last checkin.  It's
unnecessary.

Solution:  Take out.

Platforms tested:  eirene(simple change).
2004-06-14 14:00:54 -05:00
Quincey Koziol
69a63b02bc [svn-r8680] Purpose:
Code optimization

Description:
    Detect when a default property list is being used and just copy over the
default VL allocation properties, instead of querying for them.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-13 20:23:54 -05:00
Quincey Koziol
17850cf50b [svn-r8678] Purpose:
Code cleanup & optimization

Description:
    Remove old structures that used a union to store information about the
dataspace extent and just store the information directly in the dataspace
extent itself.

    Remove ifdef'd references to permutation ordering in dataspaces.  We'll
definitely need more than this code if/when we implement this feature.

    Change allocation of dataspace information from calloc() to malloc().

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-13 19:33:58 -05:00
Quincey Koziol
6ed61e5dda [svn-r8676] Purpose:
Code optimization

Description:
    Using existing dataspace extent copying routine instead of duplicating the
code (more slowly).
    Also, back-port improvements to the dataspace message reading which clean
up the clean and centralize operations.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-13 15:12:55 -05:00
Quincey Koziol
737f79b5da [svn-r8674] Purpose:
Code optimization

Description:
    Revised dataspace selections to use a more "object oriented" mechanism
to set the function pointers for each selection and selection iterator.  This
reduces the amount and number of times that dataspace selection info has to
be copied.

    Additionally, change hyperslab selection information to be dynamically
allocated instead of an inline struct.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-13 14:09:35 -05:00
Quincey Koziol
6e2c92c082 [svn-r8671] Purpose:
Code optimization

Description:
    Avoid a memory copy by directly reading from the variable-length sequence
buffer when there is no type conversion on the way to disk.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-12 22:12:17 -05:00
Quincey Koziol
0a12b3ae33 [svn-r8669] Purpose:
Code optimization

Description:
    Avoid running conversion routine when it's a noop.

    Also, pick a minimum size for the variable-sized sequence conversion
buffer, instead of allocating lots of small buffers.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
2004-06-12 21:23:44 -05:00
Quincey Koziol
7dfe108b53 [svn-r8667] Purpose:
Code optimization

Description:
    Restructure conversion loop of variable-length objects to avoid walking
through memory backwards and allocating as many temporary buffers.  (This uses
the optimized method used in the atomic type conversions).
    Also bring back another optimization for variable-length datatypes that
avoids querying the DXPL so many times.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-12 20:01:46 -05:00
Quincey Koziol
a3668504d9 [svn-r8665] Purpose:
Code optimization

Description:
    Allow global heap collections to grow in size (up to a 64K limit) if they
are able to.  This allows them to grow to a more reasonable size than the 4K
minimum size.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-12 17:33:00 -05:00
Raymond Lu
8735902ea3 [svn-r8663] *** empty log message *** 2004-06-11 16:06:29 -05:00
Raymond Lu
2a59a4ca3d [svn-r8662] Purpose: bug fix
Description:  After compound datatype with variable-length string in the fields is committed
to file, when it's read back, the size is messed up.

Solution:  change the size when it's committed to file by calling H5T_set_loc.

Platforms tested:  h5committest and arabica

Misc. update:  RELEASE.txt
2004-06-11 16:06:16 -05:00
Pedro Vicente Nunes
bec53eb4ce [svn-r8660] Purpose:
bug fix

Description:
a prototype for a new function used by h5tools_str.c was accidently left in that file
the c++ compiler treats this as an error


Solution:
removed the prototype, and pointed to the correct one (in h5tools_ref.h )

Platforms tested:
Free BSD (c++)
linux



Misc. update:
2004-06-11 10:06:36 -05:00
Quincey Koziol
8376ccdd97 [svn-r8658] Purpose:
Code cleanup

Description:
    Add more files that should be removed to the clean & distclean targets.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    Too minor to require h5committest
2004-06-11 09:14:40 -05:00
Quincey Koziol
af155fcfb3 [svn-r8657] Purpose:
Code optimization

Description:
    Eliminate redundant memory allocation for type conversion of variable-length
sequences.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
2004-06-11 09:08:04 -05:00
Xuan Bai
747ff12449 [svn-r8654] Purpose:
Update.
Description:
1. Update toolslib and toolslibD projects in Windows.
2. Update hdf5diff, hdf5ls, hdf5import, and hdf5repack batch testing files in Windows.

Solution:
1. Add new source file h5tools_ref.c and head file h5tools_ref.h into toolslib and toolslibD projects.
2. Update hdf5diff, hdf5ls, hdf5import, and hdf5repack batch testing files to match with the
   corresponding tests in Unix.  Also now the outputs from these batch files will directly
   show whether these tests pass or fail.

Platforms tested:
Windows XP/Visual C++ 6.0

Misc. update:
2004-06-10 22:16:51 -05:00
Quincey Koziol
0e1d8e3977 [svn-r8652] Purpose:
Code optimization

Description:
    Eliminate redundant memset() when creating chunk map structure.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
2004-06-10 16:35:04 -05:00
Pedro Vicente Nunes
3382eea1da [svn-r8650] Purpose:
h5dump update

Description:
updated the h5dump test file generator so that it coincides with the 1.7 branch

Solution:

Platforms tested:
linux (small change)


Misc. update:
2004-06-10 16:04:13 -05:00
Quincey Koziol
b795b5bf2e [svn-r8649] Purpose:
Code optimization

Description:
    Eliminate some operations through temporary variables in H5F_addr_encode.
Eliminate some redundant memset()'s of structures that will be completely
overwritten in the variable-length datatype code.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
2004-06-10 16:02:48 -05:00
Pedro Vicente Nunes
f4492a33c1 [svn-r8643] Purpose:
h5dump new features

Description:
added the code for print strings with new line and display the path of references (new source files h5tools_ref.c and .h )
added a test suite in testh5dump.sh.in for
( note : to create testh5dump.sh , one must redo ./configure; this detects the availability of filters
and generates  testh5dump.sh accordingly)
1) storage layout
2) fill value
3) print reference with path
4) print strings with new lines
5) filters



Solution:

Platforms tested:
linux
solaris
AIX


Misc. update:
2004-06-10 11:20:29 -05:00
Pedro Vicente Nunes
2a7d7e5121 [svn-r8642] Purpose:
bug fix

Description:
one of the h5diff tests was reading the wrong hdf5 file

Solution:
substituted for the correct file

Platforms tested:
linux (small change)

Misc. update:
2004-06-10 10:12:34 -05:00
Xuan Bai
02d3fef648 [svn-r8641] Purpose:
Update.

Description:
Update some Windows project source files as Quincey renamed several files in CVS.

Solution:
Quincey renamed the following files in CVS:
     H5Fcompact.c -> H5Dcompact.c                                                                                        H5Fcontig.c  -> H5Dcontig.c                                                                                         H5Fistore.c  -> H5Distore.c                                                                                         H5Fseq.c     -> H5Dseq.c                                                                                       hdf5, hdf5dll, and hdf5_cf90stub project files were updated to reflect the change.

Platforms tested:
Windows XP/Visual C++ 6.0.

Misc. update:
2004-06-09 17:56:01 -05:00
Quincey Koziol
c4d6057361 [svn-r8640] Purpose:
Code optimization

Description:
    Call malloc() instead of calloc() for data structure that we completely
initialize.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
2004-06-09 14:55:50 -05:00
Quincey Koziol
d79a4d6a38 [svn-r8637] Purpose:
Code optimization

Description:
    Don't allocate conversion buffer larger than the user's buffer.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    too minor to require h5committest
2004-06-09 13:07:39 -05:00
Quincey Koziol
9df18ff5bb [svn-r8634] Purpose:
Bug fix

Description:
    Correct path to new testh5dump.sh, now that it's generated.

Platforms tested:
    FreeBSD 4.10 (sleipnir) w & w/o srcdir
    Too minor to require h5committest
2004-06-09 13:06:19 -05:00
Quincey Koziol
896cd2e17d [svn-r8633] Purpose:
Update release notes
2004-06-09 09:01:49 -05:00
Quincey Koziol
cf3dbfc245 [svn-r8631] Purpose:
Bug fix

Description:
    Correct potential file corruption from mis-setting the metadata accumulator
address. (Bugfix contributed by Sean Monner <seanm@quadrus.com>)

Solution:
    When the new metadata overlaps with the end of the metadata accumulator and
the accumulator grows in size, don't reset the address of the accumulator, since
it hasn't moved.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-06-09 08:57:47 -05:00
Quincey Koziol
82187ebb09 [svn-r8629] Purpose:
Update shell scripts

Description:
    Switch to generating the testh5dump.sh script at configure time, so we can
determine which filters are available to test.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too small to require h5committest
2004-06-09 08:48:23 -05:00
cvs2svn
0b8cbb89e1 [svn-r8628] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-06-09 08:48:23 -05:00
Quincey Koziol
5c2b09a88c [svn-r8626] Purpose:
Code optimization

Description:
    Avoid pushing errors on error stack when an object is not found in a B-tree.
Sometimes we are just checking if the object exists before we insert it into
the B-tree and the higher levels in the library should be responsible for
determining if not finding the object in B-tree is really an error.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    too minor to require h5committest
2004-06-08 10:26:04 -05:00
Quincey Koziol
8b6abe7b2d [svn-r8624] Purpose:
Code optimization

Description:
    Use default dataset transfer property list for internal metadata I/O
operations when parallel I/O is disabled.  This avoids multiple copies of
the properties being made when the information is not needed.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel)
2004-06-08 09:33:29 -05:00
HDF Admin
9889d390c5 [svn-r8621] Snapshot version 1.6 release 2 (post5) 2004-06-06 20:58:40 -05:00
Quincey Koziol
6a672a783b [svn-r8619] Purpose:
Fix makefiles, dependencies & manifest after source file rename.
2004-06-05 14:33:13 -05:00
Quincey Koziol
95eeb50f0f [svn-r8617] Purpose:
Rename these files

Description:
    Since these files contain functions that are part of the dataset information
now, rename them to H5D<foo>.c
2004-06-05 14:12:03 -05:00
Quincey Koziol
9cd4e394db [svn-r8615] Purpose:
Refactor code

Description:
    Move chunk and contiguous cached raw data from file information to dataset
information.  This simplifies a number of internal interfaces, aligns the
code with it's purpose better and should allow more optimizations to the
chunked data I/O performance.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir)
    h5committest
2004-06-05 14:06:29 -05:00
Quincey Koziol
60c6500fad [svn-r8614] Purpose:
Refactor code

Description:
    Move chunk and contiguous cached raw data from file information to dataset
information.  This simplifies a number of internal interfaces, aligns the
code with it's purpose better and should allow more optimizations to the
chunked data I/O performance.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir)
    h5committest
2004-06-05 14:06:24 -05:00
Xuan Bai
085f120d19 [svn-r8612] Purpose:
Update

Description:
Update the dumptest batch file for Windows.

Solution:
This new dumptest batch file can directly show whether each dump test passed or failed, while the former
version can only show whether there is any difference between the expected and actual output files with
fc command.

Platforms tested:
Windows XP/Visual Studio C++ 6.0.

Misc. update:
2004-06-03 23:04:18 -05:00
Raymond Lu
689cc09294 [svn-r8610]
Misc. update:  Update information about opaque type fix.
2004-06-03 17:00:36 -05:00
Raymond Lu
24ccbea9f3 [svn-r8608] Purpose: more test.
Description:  Test if datatype operation can handle opaque type without any tag.


Platforms tested:  h5committest.
2004-06-03 13:33:14 -05:00
Raymond Lu
7d9e9bced3 [svn-r8607] Purpose: bug fix.
Description:  After an opaque datatype is created, if no tag is attached, some operations will have
trouble to deal with null string of tag.

Solution:  Initialize opaque's tag as empty string when it's created.

Platforms tested:  h5committest.
2004-06-03 13:31:37 -05:00
Quincey Koziol
b4ac48552d [svn-r8601] Purpose:
Code optimization & cleanup

Description:
    Don't recompute the internal index value for looking up the chunk in the
hash table, just use the value already computed from iterating through the
chunks.

    Also, back-port some of the various cleanups to the source code from the
development branch, to make diffing the code easier.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-31 15:01:29 -05:00
Raymond Lu
fbe777b67a [svn-r8599] Purpose: Bug fix.
Description:  One of the CFLAGS -D__GNUC__ caused problem for ecc 8.
It was added because there was conflicting definition for int64_t
in /usr/include/stdint.h and /usr/include/sys/types.h when ecc was updated to
7.1.  Since those two files have been updated, the problem is no longer there.

Solution:  take the flage -D__GNUC__ out.

Platforms tested:  ecc on titan, the only place concerned.
2004-05-28 15:59:50 -05:00
Xuan Bai
b0cde675fe [svn-r8598] Purpose:
Update.

Description:
Add new files added by Quincy Koziol into Windows Workspace.  Update the dumptest and deleteline batch files.

Solution:
1. Add H5DTest.c and H5Dpkg.h to the sourde and header files of hdf5 and hdf5dll projects.
2. Updated deleteline batch file.  Compared with the former version, the deleteline batch file running time
is reduced greatly and the output from the deleline batch file looks much better.
3. Updated h5dump tests under Windows to match with the new boot block and file contents tests added by
Pedro Vicente under Unix.

Platforms tested:
Window XP Visual C++ 6.0, DEC FORTRAN 6.0

Misc. update:
2004-05-28 13:31:47 -05:00
MuQun Yang
daa241c422 [svn-r8597] Purpose:
bug fix

Description:
Somehow in the function error_msg, a #ifdef WIN32 combine the stdout and stderr into a stdout for windows platforms. This will cause the confused output of dumper test on windows.
Erase this macro.

Solution:
See above.

Platforms tested:
windows XP with MSVS 6.0 by xuan.
No need to test on other platforms.

Misc. update:
2004-05-28 11:11:37 -05:00
Quincey Koziol
6e6760216b [svn-r8592] Purpose:
Code optimization & bug fix

Description:
    When dimension information is being stored in the storage layout message
on disk, it is stored as 32-bit quantities, possibly truncating the dimension
information, if a dimension is greater than 32-bits in size.

Solution:
    Fix the storage layout message problem by revising file format to not store
dimension information, since it is already available in the dataspace.

    Also revise the storage layout data structures to be more compartmentalized
for the information for contiguous, chunked and compact storage.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    Solaris 2.7 (arabica)
    h5committest
2004-05-27 15:26:32 -05:00
cvs2svn
66be6f05d4 [svn-r8591] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-05-27 15:26:32 -05:00
Pedro Vicente Nunes
fd07138459 [svn-r8585] Purpose:
bug fix

Description:
the output of fill values was lacking indentation

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-05-26 15:52:38 -05:00
Pedro Vicente Nunes
4ba7a0e373 [svn-r8583] Purpose:
added 2 new tests (boot block and file contents)

Description:

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-05-26 14:54:03 -05:00
Pedro Vicente Nunes
02e561fa97 [svn-r8580] Purpose:
bug fix

Description:
the output of array indices for the array datatype case was not done correctly

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-05-26 12:36:19 -05:00
Pedro Vicente Nunes
7912d54d4d [svn-r8577] Purpose:
bug fix

Description:
a variable declaration  was left outside a #ifdef for version 1.4

Solution:

Platforms tested:
linux

Misc. update:
2004-05-26 10:37:21 -05:00
Pedro Vicente Nunes
b770b9065d [svn-r8575] Purpose:
the new output for h5dump files

Description:

Solution:

Platforms tested:

Misc. update:
2004-05-25 16:22:46 -05:00
Pedro Vicente Nunes
c62c0eb9d2 [svn-r8574] Purpose:
h5dump new features

Description:

added the code for new features. dump of
1) filters
2) storage layout
3) fill value
4) comments
5) file super block
6) file contents
7) array indices


Solution:

Platforms tested:
linux
AIX
solaris


Misc. update:
2004-05-25 15:45:01 -05:00
Frank Baker
9edb2fcc8d [svn-r8572]
Purpose:
    Bugfixes in H5Gset_comment, h5gget_comment_f, and h5gset_comment_f.
    (Follow-on to the H5Gget_comment bugfix of last week.)

Description:
    Changed C parameter descriptions to indicate the following:
        'loc_id' can be file, group, dataset, or named datatype.
        'name' can be '.' if 'loc_id' fully describes the object.
        'name' is ignored if 'loc_id' is a dataset or named datatype.
    Modified h5gget_comment_f and h5gset_comment_f notes accordingly.
    Copy edits in H5Gget/set_comment and h5gget/set_comment_f.

Platforms tested:
    Safari
2004-05-25 12:36:18 -05:00
Frank Baker
6d1993fdf4 [svn-r8567]
Purpose:
    H5Gget_comment bugfix

Description:
    H5Gget_comment:  Changed "Description" text and "Parameters"
    descriptions to indicate the following:
        'loc_id' can be file, group, dataset, or named datatype.
        'name' can be '.' if 'loc_id' fully describes the object.
        'name' is ignored if 'loc_id' is a dataset or nemed datatype.
    Also corrected the fact that the 'name' parameter description
        referred to setting the comment rather than retriving it.

Platforms tested:
    Safari
2004-05-21 16:14:13 -05:00
Albert Cheng
7e5b1ce185 [svn-r8564] Purpose:
Improvement

Description:
Break up the C99 integer types detection into even smaller
sub-module routines.  This has dropped the compile time (with
optimization) from 94 seconds to 6 seconds.

Platforms tested:
h5committested.

Misc. update:
2004-05-21 13:50:04 -05:00
Quincey Koziol
c385536b9e [svn-r8561] Purpose:
Bug fix

Description:
    Add prototypes for H5S_select_serial_size() and H5S_select_serialize()
that were causing the library to fail when built with C++ compiler.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/CC=g++
    Only affects C++ builds, so no h5committest
2004-05-21 09:52:19 -05:00
Xuan Bai
d765d42718 [svn-r8559] Purpose:
New Feature.

Description:
1. A new Fortran C stub for static library hdf5_f90cstub project was added.
2. A new h5importtst project was added into the workspace for h5import test.
3. 4 new hdf5 auto test tolls in Windows were added.

Solution:
1. Removed all the *.c files in hdf5_fortran project and put them into the new created
Fortran C stub project hef5_f90cstub.  Now hdf5_fortran project only inlcudes *.f90 files.
The dependency of hdf5_fortran was changed from hdf5 to hdf5_f90cstub.
2. Add a new h5importtst project into the workspace with h5importtest.c
3. 4 new hdf5 auot test tools: h5diff, h5ls, h5import, and h5repack were created for hdf5
auto tests in Windows.  H5dump auto test tools was also updated.

Platforms tested:
Windows XP with Microsoft Visual C++ 6.0 and DEC Fortran 6.0.

Misc. update:
2004-05-20 22:26:42 -05:00
Albert Cheng
b195382de7 [svn-r8557] Purpose:
Code cleanup

Description:
Changed local variables declaration to static to please compilers.

Platforms tested:
Tested by generating H5Tinit.c and verified it was same as before.
Tested in TG_NCSA.
2004-05-20 18:04:26 -05:00
Albert Cheng
f53197332d [svn-r8551] Purpose:
Updated.
2004-05-20 14:02:14 -05:00
Albert Cheng
61f3aed0ec [svn-r8550] Purpose:
Bug fix.

Description:
Removed an extra
!DEC$ ENDIF
from previous checkin.

Platforms tested:
Tested in TG-NCSA only since it was the one detected and
complained about the source error.

Misc. update:
2004-05-20 13:52:23 -05:00
Albert Cheng
bc2386faeb [svn-r8549] Purpose:
Improvement.

Description:
Some compilers, e.g., Intel C v7.0, took a long time to compile
with optimization when a module routine contains many code lines.
Divide up all those types detections macros into subroutines, both
to avoid the compiler optimization error and cleaner codes.

Platforms tested:
h5committested.
2004-05-20 13:46:25 -05:00
Albert Cheng
664d327923 [svn-r8547] Purpose:
Bug fix.  Backed out the byte order detection code. It was not
compatible with v1.6.

Platforms tested:
Tested in TG_NCSA.

Misc. update:
2004-05-20 13:15:13 -05:00
Albert Cheng
9f93209aee [svn-r8546] Purpose:
Folded byte order detection from v1.7 to this.

Platforms tested:
No test because it has been tested in v1.7.
Will be tested in changes to be committed immediately.

Misc. update:
2004-05-20 12:08:53 -05:00
Quincey Koziol
70686065d0 [svn-r8543] Purpose:
Code optimization

Description:
    Expand the use of macros to inline trivial function pointer lookup and
calls to reduce the overall number of functions invoked during normal operation
of the library.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    Too minor to require h5committest
2004-05-20 10:31:12 -05:00
Pedro Vicente Nunes
aec19e771d [svn-r8540] Purpose:
new features

Description:
added the generation of a new file for the new h5dump tests

Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-05-18 15:47:57 -05:00
HDF Admin
0660f8b63b [svn-r8530] Snapshot version 1.6 release 2 (post4) 2004-05-16 04:47:27 -05:00
Quincey Koziol
8f0a7d9465 [svn-r8519] Purpose:
Code optimization

Description:
    Don't make a separate allocation for the selection offset - incorporate
it into the selection structure as a fixed size array.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-13 18:26:04 -05:00
Quincey Koziol
f3b26a8ce9 [svn-r8514] Purpose:
Code optimization

Description:
    Eliminate some trivial functions with macros that perform the same
operation.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-13 16:02:33 -05:00
Quincey Koziol
19704681e1 [svn-r8512] Purpose:
Code optimization

Description:
    Defer creating the span trees for hyperslab selections until they are
actually needed (which may be never, in certain circumstances).

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-13 15:33:20 -05:00
Xuan Bai
f0c2b247e2 [svn-r8511] Purpose:
Update

Description:
Restore the default dependency settings of all project.

Solution:
By default, only c library will be tested. Unchecked the dependencies setting of all project on C++ project files. Users can check Fortran and C++ project files for Fortran and C++ tests.

Platforms tested:
Windows XP, Visual C++ 6.0, DEC Fortran 6.0, and .NET.

Misc. update:
2004-05-13 13:50:23 -05:00
Quincey Koziol
948a94f2be [svn-r8506] Purpose:
Code optimization

Description:
    Eliminate many redundant lookups to check for no-op type conversion by
remembering that a type conversion path is the no-op path.

    Also, don't allow non-no-op conversions which happen to be no-ops on a
particular machine (such as int<->long conversions on machines where int and
long are the same size and format, etc.) to replace the default no-op
conversion.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-12 13:40:29 -05:00
Albert Cheng
820a21f61f [svn-r8500] Purpose:
Improvement

Description:
The MPI atomicity and file_sync tests may hang if a filesystem
is not able to support the operation.  This will block the
whole tests.  PHDF5 is not using either features.  So, removed
them from the default tests.

Platforms tested:
Only in eirene using pp.  Copper is still down.
2004-05-10 14:46:07 -05:00
Quincey Koziol
eb0f0ad287 [svn-r8497] Purpose:
Code optimization

Description:
    Further reduce the number of copies we make of a hyperslab selection for
chunked I/O, especially when we are only going to throw the old selection away
for a new one.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
2004-05-08 14:10:01 -05:00
MuQun Yang
f646f060ea [svn-r8478] Purpose:
bug fix

Description:
1. hdf5_fortrantype.f90 was missing from the merged all.zip, fortran failed.
2. A redundant libtest_fortrandll was attached in all.dsw.

Solution:
1. Add the missing f90 function.
2. remove the redundant project file.


Platforms tested:
windows 2000 intel fortran

Misc. update:
2004-05-03 16:52:32 -05:00
Quincey Koziol
5719061f35 [svn-r8475] Purpose:
Code optimization

Description:
    Improved LRU algorithm for locating blocks of the correct size in the
block free-list

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor for h5committest
2004-05-03 15:42:32 -05:00
Quincey Koziol
19f9a72e54 [svn-r8473] Purpose:
Code optimization

Description:
    Reduce amount of information allocated/freed for chunk cache.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/paralell)
    too minor to require h5committest
2004-05-03 14:53:09 -05:00
Quincey Koziol
3231afc0de [svn-r8471] Purpose:
Code optimization

Description:
    Eliminate the B-tree "split_ratios" as a parameter and pull it from the
DXPL instead.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-05-03 13:53:45 -05:00
Xuan Bai
5fc9dec1df [svn-r8470] Purpose:
New feature
Description:
Previously we have two windows .zip files for hdf5.  One for c/c++ and one for fortran.  That added double maintenance work and also bug-driven.
Solution:
Use on merged all.zip.
By default, only c library will be tested.
Users can check fortran and c++ project files for fortran and c++ tests.
Detailed project list to be check will be provided in windows doc.
Platforms tested:
Window XP VS 6.0 C++, Dec Fortran
Window XP .Net (c/c++ only)
Misc. update:
2004-05-03 13:05:34 -05:00
Quincey Koziol
449a55b634 [svn-r8463] Purpose:
Code optimization

Description:
    Eliminate redundant B-tree lookups for chunk information.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-05-01 23:26:05 -05:00
Quincey Koziol
cb4b2ad153 [svn-r8461] Purpose:
Code optimization

Description:
    Reduce the number of times the number of elements in a selection is
computed.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-05-01 14:19:46 -05:00
Quincey Koziol
050ff9dc1a [svn-r8459] Purpose:
Code optimization

Description:
    Move the element size for the selection into the selection iterator instead
of always passing it as a parameter.

    Also, eleminate another 64-bit multiply for "all" selections.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-05-01 13:16:22 -05:00
Quincey Koziol
9850d99297 [svn-r8458] Purpose:
Code optimization

Description:
    Stop straddling the line and always use elements instead of bytes to
determine how how I/O to perform on a selection.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-05-01 11:10:25 -05:00
Quincey Koziol
67eb0968e1 [svn-r8455] Purpose:
Code optimization

Description:
    Eliminate more 64-bit multiplies by remebering the size of contiguous
datasets as well as chunked datasets.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 22:28:55 -05:00
Quincey Koziol
f202e3dba4 [svn-r8453] Purpose:
Code optimization

Description:
    Eliminate more redundant 64-bit multiplies

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 22:02:47 -05:00
Quincey Koziol
61667c35e0 [svn-r8451] Purpose:
Code optimization

Description:
    Eliminate frivolous 64-bit multiply.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 21:21:35 -05:00
Quincey Koziol
32d4f1041e [svn-r8449] Purpose:
Code optimization

Description:
    Remove extraneous memcpy()

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 20:09:29 -05:00
Quincey Koziol
715316db66 [svn-r8447] Purpose:
Code optimization

Description:
    Remove redundant error checking.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor too require h5committest
2004-04-30 19:50:16 -05:00
Quincey Koziol
fbc0aaa0f7 [svn-r8445] Purpose:
Code optimization

Description:
    Avoid dividing the chunk coordinates at the top levels of the chunk I/O
routines, only to multiply them at the bottom of the routines.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 19:13:04 -05:00
Quincey Koziol
1eabcda339 [svn-r8443] Purpose:
Code cleanup

Description:
    Remove bogus "#undef NDEBUG" at top of file, which was blocking compiler
flags from setting NDEBUG properly.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 19:11:13 -05:00
Quincey Koziol
56eca2e488 [svn-r8442] Purpose:
Code cleanup/optimization

Description:
    Don't clear the error stack when calling H5open(), it's unnecessary.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 19:10:21 -05:00
Quincey Koziol
ebd1db61fc [svn-r8438] Purpose:
Code cleanup

Description:
    Refactor code to eliminate duplication of setup & calls to H5B_find to
locate information about a chunk on disk.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 10:40:13 -05:00
Quincey Koziol
a58adc04a7 [svn-r8436] Purpose:
Code optimization

Description:
    Hoist some if statements out of a loop in vector comparision routines that
are called very frequently by chunking code.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-30 09:11:43 -05:00
Quincey Koziol
ce62590144 [svn-r8433] Purpose:
Code optimization.

Description:
    Use free-list pool of blocks for allocating chunk buffers, when there are
no filters in the pipeline.  The avoids calling malloc/free so much.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-29 09:43:57 -05:00
Xuan Bai
95cb80c7a6 [svn-r8431] Purpose:
bug fix and Update

Description:
Fixed the bug in the dump test file dumptest.bat on Windows platform.
From now on, the following lines at the beginning of the expected output file:
#####################################################
Expected Output for '??????????????????'
#####################################################
will be deleted before the expected output file is compared with the actual output file by "fc" command.

Solution:
h5repack and h5repacktst project were added into the workspace.
Dump test batch file dumptest.bat was updated to call deleteline.bat file before comparing the expected and actual output files.
A new batch file deleteline.bat was added.  The deleteline.bat file is used to delete a certain number of lines at the beginning of a given file.

Platforms tested:
Windows XP VS 6.0

Misc. update:
2004-04-28 16:56:54 -05:00
Albert Cheng
e91728b3e7 [svn-r8429] Purpose:
Slight improvement.

Description:
Show directory name at the beginning and ending of running
make check in a directory.  Together with the time stamp,
it will be easier to see how much time it takes to run all
the tests in one directory.

Platforms tested:
Eirene only.

Misc. update:
2004-04-28 16:54:39 -05:00
Quincey Koziol
948120dac1 [svn-r8421] Purpose:
Correct typo in H5Pcreate() information
2004-04-26 06:49:10 -05:00
HDF Admin
2195eeafb8 [svn-r8419] Snapshot version 1.6 release 2 (post3) 2004-04-25 21:12:57 -05:00
Quincey Koziol
7bb8094745 [svn-r8417] Purpose:
Code cleanup

Description:
    Remove "NEW_HYPERSLAB_API" code from release branch, since it was leftover
from when we branched the 1.6 branch from the main development trunk and will
never be activated in the 1.6 branch.  (And I'm tired of maintaining it in
both branches when I'm optimizing the library :-)

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Linux 2.4 (verbena) w/FORTRAN
    too minor to require full h5committest
2004-04-23 22:50:22 -05:00
Pedro Vicente Nunes
af184d7e8c [svn-r8414] Purpose:
bug fix

Description:
added compability for the 1.4 version

Solution:

Platforms tested:
free BSD
linux

Misc. update:
2004-04-23 16:25:33 -05:00
Xuan Bai
507ab9cafb [svn-r8410] Purpose:
bug fix

Description:
The source file (h5diff.c, h5trav.c, and h5trav.h) path for h5diff and h5difftst was wrong.
can not find h5difftst.c
h5diff and h5difftst missed some files.
Solution:
Added the following files to h5diff:
h5diff_array.c, h5diff_attr.c, h5diff_dset.c, h5diff_main.c, h5diff_util.c, h5tools_filters.c, h5trav_table.c
H5diff settings/C/C++/Preprocessor/Additional include directories: add ..\..\tools\lib

Added the following files to h5difftst:
test5diff.h, test5diff_attr.c, test5diff_basic.c, testh5diff_dset.c, testh5diff_main.c, testh5diff_util.cRemoved h5difftst.c from h5difftst

Platforms tested:
Windows XP MS VS 6.0

Misc. update:
2004-04-22 15:24:06 -05:00
Quincey Koziol
253ee36580 [svn-r8409] Purpose:
Code optimization

Description:
    Instead of dynamicly allocating various arrays for various pieces of
information about a selection or selection iterator, just use fixed size
array of size H5S_MAX_RANK (as the rest of the library does).

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    h5committest
2004-04-22 15:21:51 -05:00
Quincey Koziol
6010b691f9 [svn-r8407] Purpose:
Code optimization

Description:
    Make calculation of "all" selection sequence length information more
efficient.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    h5comittest
2004-04-22 15:18:53 -05:00
Albert Cheng
26b7c31a6b [svn-r8405] Description:
Added color definition for the two new added API.

Platforms tested:
Tested in Copper with MPE option.

Misc. update:
2004-04-22 14:21:15 -05:00
Pedro Vicente Nunes
935f19ec99 [svn-r8403] Purpose:
bug fix

Description:
a missd?\127?\127ing declaration of the new function H5I_get_file_id
was causing a eror on free bsd

Solution:
aadd the declaration

Platforms tested:
linux

Misc. update:
2004-04-22 11:04:53 -05:00
MuQun Yang
9cf79f5a13 [svn-r8402] Purpose:
trival bug fix
Description:
one empty folder all_withWInDEbug was generated when compiling HDF5.
It should not be there.

Solution:
Remove the intemediate file.

Platforms tested:
windows 2000

Misc. update:
2004-04-22 09:53:40 -05:00
MuQun Yang
0eeb50005c [svn-r8401] Purpose:
macro change

Description:
$FOODEC cannot be recognized by DEC visual fortran.
change it back to $DEC.

Solution:

Platforms tested:
windows 2000 visual fortran, doesn't need to be tested on other platforms since it is
windows specific.

Misc. update:
2004-04-22 09:50:57 -05:00
MuQun Yang
1555c1ae0a [svn-r8400] Purpose:
$FOODEC macro cannot be recongnized by visual fortran.

Description:
The $DEC is the keyword that Dec visual fortran can recongnize.

Solution:
Use shell script by Elena to change $FOODEC to $DEC in all .f90.

Platforms tested:
windows 2000 visual fortran
Since this change only happens on the specific macro for windows, it doesn't need to be tested on other platforms.

Misc. update:
2004-04-22 09:46:20 -05:00
Quincey Koziol
478865258b [svn-r8399] Purpose:
Update depenvy files after h5repack import & add dependency file to h5repack
directory.
2004-04-20 12:15:02 -05:00
Pedro Vicente Nunes
324c2883fd [svn-r8398] Purpose:
Description:

Solution:

Platforms tested:

Misc. update:
2004-04-19 19:23:00 -05:00
Pedro Vicente Nunes
365ca1225d [svn-r8397] Purpose:
h5repack in 1.6

Description:

2 functions we re added to /src:
H5Premove filter and H5Iget_file_id



Solution:

Platforms tested:
linux
solaris
AIX

Misc. update:
2004-04-19 19:19:46 -05:00
cvs2svn
beb0079ae1 [svn-r8396] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-04-19 19:19:46 -05:00
Quincey Koziol
c39de522e9 [svn-r8394] Purpose:
Code optimization

Description:
    Avoid clearing the error stack unless necessary.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-19 15:23:15 -05:00
Quincey Koziol
793f7c72dc [svn-r8388] Purpose:
Bug fix

Description:
    Fix small problem with 1.4 backward compatibility

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/1.4 backward compatibility
2004-04-19 10:11:29 -05:00
Albert Cheng
721c3fb6b6 [svn-r8387] Purpose:
Bug fix.

Description:
LOGFILE was showing both hostname and srcdirname when srcdirname is used.
Fixed it.

Platforms tested:
Tested in LANL QSC.
2004-04-18 23:05:08 -05:00
Quincey Koziol
d09b08ce39 [svn-r8384] Purpose:
Code cleanup

Description:
    Clean up lots of warnings based on those reported from the SGI compilers
as well as gcc.

Platforms tested:
    SGI O3900, IRIX64 6.5 (Cheryl's SGI machine)
    FreeBSD 4.9 (sleipnir) w/ & w/o parallel
    h5committest
2004-04-17 23:10:36 -05:00
Quincey Koziol
0343b61666 [svn-r8382] Purpose:
Fix typo in file name.
2004-04-17 21:56:22 -05:00
Quincey Koziol
8b0d7dc95a [svn-r8381] Purpose:
Added new files

Description:
    Added backward compatibility test for new version of dataspace information.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest

Misc. update:
2004-04-17 15:33:56 -05:00
Quincey Koziol
014319c704 [svn-r8380] Purpose:
Added new files

Description:
    Corrected code to issue an error when an attribute's dataspace is not able
to be understood by the library.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest

Misc. update:
2004-04-17 15:33:31 -05:00
Quincey Koziol
458a45b433 [svn-r8379] Purpose:
Added new files

Description:

Solution:

Platforms tested:

Misc. update:
2004-04-17 15:32:52 -05:00
Quincey Koziol
d50379c758 [svn-r8373] Purpose:
Code optimization

Description:
    Instead of re-initializing the default stride & block arrays to have values
of '1' in each position each time we perform a hyperslab selection, create
static constant arrays with '1's in them.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-17 14:22:09 -05:00
Quincey Koziol
8c13598a4a [svn-r8371] Purpose:
Code optimization

Description:
    Don't copy hyperslab span information as much.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-17 13:25:48 -05:00
Albert Cheng
9c38fa3e32 [svn-r8369] Purpose:
Bug fix.

Description:
Not all machines (like Sun and AIX) support fabsl() and fabsf() used
in test/dtypes.c.  Changed the coding to use macro names HDfabsl and
HDfabsf.  Also set the two macros to use ABS for now so that they will
work for all machines. (need more portable fixes which would involve
configure.)

Platforms tested:
h5committested. (also tested in LANL QSC and Theta).
2004-04-17 12:16:15 -05:00
Quincey Koziol
4ff7021a37 [svn-r8367] Purpose:
Code optimization

Description:
    Compute value for array instead of using memset(), since we are looping
through the array indices anyway.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-17 11:06:32 -05:00
Quincey Koziol
ebc1ff3f52 [svn-r8365] Purpose:
Code optimization

Description:
    Eliminate memset() calls to clear structures that we completely initialize

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-17 11:05:16 -05:00
Quincey Koziol
97dc0abb96 [svn-r8363] Purpose:
Code optimization

Description:
    Remove redundant function call by re-using value we already know.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-17 11:04:02 -05:00
Albert Cheng
7c0d250a8d [svn-r8361] Purpose:
Updated with long double to double fix.
2004-04-16 16:33:17 -05:00
Albert Cheng
eb266def02 [svn-r8359] Purpose:
bug fix.

Description:
On LANL QSC, test/dtypes "sw long double -> double" had failed when the
long double values were too small, smaller than the minimum double normalized
floating number.  The hw in QSC converts them mostly to 0 but occasionally,
it converts to the some non-zero values which are still <= the minimum
double normalized number.  But the conversion verification did not like
them and flagged them as errors.

Solution:
Added code to check if the src value is already smaller than the minimum
number the float class can hold.  When that happens and if both hw and sw
conversion results are <= the minimum number, then accepts them as okay
because if the src is smaller than the dst minimum number, an underflow
has occured.

Platforms tested:
Tested in LANL QSC and Theta.
2004-04-16 16:24:51 -05:00
Elena Pourmal
d01acbbddd [svn-r8358] Purpose: Bug fix
Description: Fortran parallel test was using h5dwrite_f function
             with the wrong parameter type.

Solution: Fixed.

Platforms tested: copper parallel; sequential was tested yesterday
                  I run out of time yesterday and didn't
                  test parallel ;-)

Misc. update:
2004-04-16 08:56:33 -05:00
Elena Pourmal
508b06e286 [svn-r8357]
Purpose: Maintenance

Description: Fortran functions h5dwrite/read_f and h5awrite/read_f
             were overloaded with the dims parameter being of type
             INTEGER. It was a design flaw. dims should be of type
             INTEGER(HSIZE_T). Overloading was done to assure backward
             compatibility of 1.4.* branch with hdf5 1.2.* branch.

             We promised to remove the old function with INTEGER dims
             in 1.6.0. It was removed from the documentation but
             was not removed from the source code.

Solution: Finally cleaned up the code.

Platforms tested: Windows 2000 with DEC Fortran, LInux with Intel Fortran,
                  Solaris 2.7 32/64-bit mode.

Misc. update:
2004-04-15 16:59:05 -05:00
Albert Cheng
da3f980be5 [svn-r8356] Purpose:
updated.
2004-04-14 13:38:26 -05:00
Albert Cheng
098043014b [svn-r8355] Purpose:
feature

Description:
H5check_version will print warning messages if the version does not
match or if the lib version string is not consistent, even when
$HDF5_DISABLE_VERSION_CHECK is set to 1.  This will mess up
tests that try to match output.

Changed it so that if $HDF5_DISABLE_VERSION_CHECK is set to 2, no
warning about version mismatch is printed.
The lib version string warning is suppressed if $HDF5_DISABLE_VERSION_CHECK
is set to any non-zero value.


Platforms tested:
h5committested.
2004-04-14 13:38:11 -05:00
Quincey Koziol
10579b3641 [svn-r8346] Purpose:
Code optimization

Description:
    Eliminate memory allocations for I/O vectors when using the default
vector size.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-13 13:30:13 -05:00
Quincey Koziol
acaf0a0107 [svn-r8341] Purpose:
Code optimization

Description:
    Remove another dataspace copy, in certain circumstances.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-10 13:02:24 -05:00
Quincey Koziol
3910acb2be [svn-r8340] Purpose:
Code optimization

Description:
    Remove a memcpy() from a commonly called routine and replace a multiplication
with a series of additions.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-04-10 12:12:49 -05:00
Quincey Koziol
3270d9e488 [svn-r8338] Purpose:
Code optimization

Description:
    Avoid another extraneous dataspace copy.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-04-10 11:05:23 -05:00
Quincey Koziol
5c361b5968 [svn-r8336] Purpose:
Code optimization

Description:
    Change algorithm to directly use coordinates describing a chunk's position
in a dataspace instead of creating a dataspace with the chunk's position
selected.  This reduces the number of copies of dataspaces we need to keep
around.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-04-10 09:45:02 -05:00
Quincey Koziol
849bcede8e [svn-r8329] Purpose:
Code optimization

Description:
    Check for only performing I/O on a single chunk and re-use memory dataspace,
instead of re-creating the same dataspace & selection the hard way.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-04-08 13:19:06 -05:00
Quincey Koziol
3aedef4328 [svn-r8327] Purpose:
Code optimization

Description:
    Eliminate more dataspace copying, etc.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-04-08 11:59:38 -05:00
Quincey Koziol
f2a3dd6a53 [svn-r8325] Purpose:
Correct typo in comment
2004-04-08 11:58:36 -05:00
Quincey Koziol
8761f20ae8 [svn-r8322] Purpose:
Code optimization

Description:
    Reduce the number of dataspace copies made when performing I/O on chunked
datasets.

Platforms tested:
    Solaris 2.7 (arabica)
    too minor to require h5committest
2004-04-08 09:10:38 -05:00
Quincey Koziol
ad62490f6c [svn-r8317] Purpose:
Code optimization

Description:
    Query the dataset creation and transfer properties less often.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.9 (sleipnir) w/parallel
    h5committested
2004-04-07 14:10:59 -05:00
Quincey Koziol
dedb402f2e [svn-r8313] Purpose:
Code optimization

Description:
    Eliminate unnecessary allocation and point at existing data structure
instead.

Platforms tested:
    Solaris 2.7 (arabica)
    too minor to require h5committest
2004-04-06 13:51:30 -05:00
Quincey Koziol
9cf3bf50b6 [svn-r8310] Purpose:
Code optimization

Description:
    Fix H5S_select_hyperslab to use arrays on the stack instead of dynamically
allocating them each time.

Platforms tested:
    Solaris 2.7 (arabica)
    too small to require h5committest
2004-04-06 11:57:34 -05:00
Quincey Koziol
e696bc826a [svn-r8308] Purpose:
Code optimization

Description:
    Fix H5S_select_copy so it doesn't call calloc() for allocating memory that
will be immediately overwritten.

Platforms tested:
    Solaris 2.7 (arabica)
    too small to require h5committest
2004-04-06 11:38:02 -05:00
Quincey Koziol
6612950317 [svn-r8306] Purpose:
Code optimization

Description:
    Minor tweaks on the optimized offset/length sequence generator to improve
performance by reducing the number of 64-bit multiplies and calls to memcpy().

Platforms tested:
    Solaris 2.7 (arabica)
    too minor to require h5committest
2004-04-06 11:14:16 -05:00
Quincey Koziol
8174e4c286 [svn-r8304] Purpose:
Code optimization

Description:
    Compute the size of a chunk once, when the layout information is set,
    instead of each time I/O is performed on the chunk.

Platforms tested:
    h5committest
    Solaris 2.7 (arabica)
2004-04-06 08:37:48 -05:00
Quincey Koziol
fc152eff1c [svn-r8302] Purpose:
Code optimization

Description:
    Move handling for free list arrays that have no maximum size to separate
    set of routines and optimize computations for free list arrays with maximum
    size to avoid re-computing sizes all the time.

Platforms tested:
    h5committest
    Solaris 2.7 (arabica)
2004-04-06 08:13:05 -05:00
Albert Cheng
3a0524dfa9 [svn-r8300] Purpose:
Cleanup

Description:
Removed FPHDF configure and test file since it is not implemented
in v1.6.

Platforms tested:
Only tested in Sol parallel.

Misc. update:
Update MANIFEST.
2004-04-05 18:39:04 -05:00
Albert Cheng
740a672798 [svn-r8299] Purpose:
Code cleanup (sort of)

Description:
Added SetTest() to handle test controls.

Platforms tested:
h5committested.
2004-04-03 16:43:20 -05:00
Albert Cheng
79e7ccdd03 [svn-r8293] Purpose:
feature

Description:
Change testphdf5 to use the common test program syntax.
Needed to change the protocols of all test programs to
fit the requirement of the common test syntax.

Platforms tested:
"h5committested".
Also tested in sol with PP mode.
2004-04-01 18:00:11 -05:00
Albert Cheng
44b990001f [svn-r8291] Purpose:
Feature.

Description:
Added GetTestParameters() to provide Test Parameters to
individual test programs.

Platforms tested:
"h5committested"
2004-04-01 17:51:42 -05:00
Albert Cheng
310a684fc2 [svn-r8290] Purpose:
Feature

Description:
Added to AddTest() a generic parameters pointer argument to
allow some extra parameters for some tests.  E.g., test file
names can be customized during runtime and passed into the
test routines.

Platforms tested:
"h5committested".
2004-03-31 09:23:54 -05:00
Quincey Koziol
0180863320 [svn-r8288] Purpose:
Bug fix/code cleanup

Description:
    Copy Robb's feature in SSlib that checks that the name of the function
    used in the FUNC_ENTER macro is actually the name of function.

    Fixed a bunch of typos & copy-n-pasto's for functions with incorrect names.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest
2004-03-30 15:45:20 -05:00
Quincey Koziol
b3e1ba5816 [svn-r8280] Purpose:
Clarify note about the --with-pthread flag.
2004-03-24 21:53:37 -05:00
Quincey Koziol
e991aa94e8 [svn-r8278] Purpose:
Update flags necessary for compiling the library with thread-safety
turned on.
2004-03-24 21:46:27 -05:00
Albert Cheng
0642ae58be [svn-r8273] Purpose:
Code cleanup.

Description:
The routines residing in testframe.c was defined in testhdf5.h due to
historical reason.  It really belongs to h5test.h because those routines
reside in libh55test.a.

Solution:
Moved them to the right place.  Also removed the duplicated occurance
of testframe.c in the TEST_SRC.

Platforms tested:
Tested in o2 (SGI) parallel.
2004-03-22 23:43:10 -05:00
Albert Cheng
40b72387ab [svn-r8271] Purpose:
bug fix.

Description:
H5FD_mpio_init was calling the public API version of H5Iget_type()
which would clear the error stack, thus cleared away error messages
prematurely.

Solution:
Changed it to call the private version of H5I_get_type() which
does not clear the error stack.

Platforms tested:
o2 (SGI) parallel.
2004-03-22 23:39:34 -05:00
Binh-Minh Ribler
0af78cf333 [svn-r8268] Purpose:
Inform change of APIs

Description:
    Many exception constructors are removed.  Although the users won't
    have to change their code, unless they used to check for the value
    of H5::Exception::detailMessage against 0/NULL, which is not very
    likely, they might need to recompile their applications.
2004-03-20 16:47:25 -05:00
Binh-Minh Ribler
9439854caf [svn-r8267] Purpose:
Cleaning up warnings

Description:
    Many exception constructors have warnings about reference to temporary
    location because of the parameter initialization, for example,
    "const string& var = 0."

Solution:
    Changed "string&" parameters to pass by value for these constructors.
    Consequently, passing string by value also takes care of char pointers
    so the overloaded constructors for char pointers are then removed.
    Also, instead of setting Exception::detailMessage to null string, I
    set it to DEFAULT_MSG ("No detailed information provided") by default.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    IA-64 (titan)
2004-03-20 16:18:55 -05:00
Pedro Vicente Nunes
8737c9ff2b [svn-r8256] Purpose:
bug fix

Description:
the added binary files to read did not have the construction of the "srcdir" path

Solution:
add it

Platforms tested:
linux

Misc. update:
2004-03-11 22:51:33 -05:00
Pedro Vicente Nunes
7fe2ed7f91 [svn-r8253] Purpose:
bug fix
new test for the bug



Description:
the fletcher filter used a 2 byte word buffer to compute the checksum.
this is non portable between big-endian/little endian.



Solution:

replaced with a buffer of 1 byte type
added a test that reads 2  pre-saved files (one LE, other BE) with that filter enabled



Platforms tested:
linux
solaris
AIX


Misc. update:
2004-03-10 19:28:10 -05:00
Pedro Vicente Nunes
891308f73c [svn-r8250] Purpose:
added 2 files to list

Description:

Solution:

Platforms tested:

Misc. update:
2004-03-10 18:02:47 -05:00
Pedro Vicente Nunes
87f80226a8 [svn-r8249] Purpose:
added 2 binary files for a new dsets test

Description:

Solution:

Platforms tested:

Misc. update:
2004-03-10 18:00:36 -05:00
cvs2svn
cdcf0e1e12 [svn-r8248] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-03-10 18:00:36 -05:00
Frank Baker
4644afd4af [svn-r8244]
Purpose:
    Bugfix: Bugzilla #66

Solution:
    H5Pset_szip -- Corrected the plist parameter description.
        Since this property can be set only in the dataset
        creation property list, changed the parameter description
        from
            Dataset creation or dataset transfer property list identifier.
        to
            Dataset creation property list identifier.
        Fixes Bugzilla bug #66.

Platforms tested:
    IE 5
2004-03-10 14:25:52 -05:00
Frank Baker
caf8d81e07 [svn-r8243]
Purpose:
    Bugfix -- Bugzilla #67

Solution:
    Removed the numeric notations from the datatype listing
        in h5iget_type_f.
    Fixes Bugzilla #67.

Platforms tested:
    IE 5
2004-03-10 13:33:01 -05:00
Elena Pourmal
56a6632950 [svn-r8240] Purpose: Bug fix (#71 in Bugzilla DB)
Description: C++ comment was used. That caused problems (see bug description)

Solution: Changed C++ comment to C comment

Platforms tested: eirene

Misc. update:
2004-03-09 15:54:09 -05:00
Elena Pourmal
2bb3534b8f [svn-r8238] Purpose: A small bug fix
Description:  Wrong datatype (unsigned instead of hsize_t) was used
              to calculate the length of the buffer that hold the data.
              As a result, only part of the data was compared with the
              original data.

Solution: Use the correct datatype.

Platforms tested: Tried h5committest, but forgot to do it on AFS.
                  As a resulti, only verbena test was completed.
                  I decided to go ahead and check the change in and do it
                  correctly for the development branch (later today).

Misc. update:
2004-03-08 12:54:06 -05:00
HDF Admin
13e05040b9 [svn-r8237] Snapshot version 1.6 release 2 (post2) 2004-03-07 21:19:15 -05:00
Quincey Koziol
576904f993 [svn-r8236] Purpose:
Bug fix

Description:
    Fix build on sparc64 platform for FreeBSD by modifying the config/gnu-flags
to not insert '-march=i686' on non-Intel platforms.  (This change allows HDF5
to run correctly on all five of the main FreeBSD platforms... :-)

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest not run since it's a FreeBSD-specific fix.
2004-03-06 21:26:35 -05:00
Quincey Koziol
f39bb776e3 [svn-r8234] Purpose:
Bug fix/code update

Description:
    Upgrade to latest version of config.guess & config.sub, which work
    correctly on Cray X1 (and may help on NEC SX-6).

    NOTE: This upgrade has _nothing_ to do with autoconf or libtool, these
    shell scripts are _not_ tied to any particular version of those tools.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
    Cray X1
2004-03-05 16:33:05 -05:00
Frank Baker
1922d2d93e [svn-r8231]
Description:
    Changed the H5Pset(get)_cache change description  in the
    Release 1.6.0 "Functions with Changed Syntax" section to
    reference the 'rdcc_nbytes' parameter rather than 'rdcc_nelmts'.
    The note originally identifed the wrong parameter as having a
    changed datatype.
    [Closes bug #1053.]

Platforms tested:
    IE 5
2004-03-03 12:00:34 -05:00
MuQun Yang
0d87abc601 [svn-r8230] Purpose:
make documentation more clear
Description:
update some descriptions according to comments from students
Solution:

Platforms tested:

Misc. update:
2004-03-02 15:33:06 -05:00
Frank Baker
2c94f1023c [svn-r8220]
Purpose:
    Update documentation index (hdf5/doc/html/index.html) to say
    that it describes Release 1.6.2.

    The index file included with the R1.6.2 source tarfile mistakenly
    refers to Release 1.6.1; this has been noted on the "Known Problems"
    page on the HDF5 website.  The corrected file will be included in the
    hdf.ncsa.uiuc.edu:/HDF5/doc/ document set and in the
    Release 1.6.2 documentation-only tarfile.

Platforms tested:
    IE 5, Safari
2004-02-24 13:45:21 -05:00
Pedro Vicente Nunes
409760028f [svn-r8219] Purpose:
bug fix

Description:
the same change to the check condtion in H5Z_set_local_shuffle  explained in the 1.7 branch

Solution:

Platforms tested:
linux

Misc. update:
2004-02-23 14:39:58 -05:00
HDF Admin
3426192ed8 [svn-r8217] Snapshot version 1.6 release 2 (post1) 2004-02-22 21:15:57 -05:00
Quincey Koziol
d111d69c36 [svn-r8215] Purpose:
Add c++/config/freebsd file
2004-02-21 23:56:38 -05:00
Quincey Koziol
10ef4e9a97 [svn-r8213] Purpose:
Bug fix

Description:
    Update threadsafe flags for FreeBSD and allow C++ to be built with
threadsafe enabled.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/C++ & thread-safe
2004-02-21 12:44:05 -05:00
Albert Cheng
c23d11475e [svn-r8211] Purpose:
Bug fix.

Description:
The -g in H5detect somehow does not work with 64bit mpicc in arabica.
Remove it for now for better solution.

Platforms tested:
no test as the change is trivia.

Misc. update:
2004-02-18 17:27:04 -05:00
Frank Baker
aa0e780842 [svn-r8209]
Purpose:
    Corrected reference to PDF versions.

Platforms tested:
    IE 5
2004-02-18 16:10:56 -05:00
Albert Cheng
bd433d92ba [svn-r8208] Purpose:
Bug fix.

Description:
Last fix using -O0 is not portable.  Rejected by some systems
such as AIX and Sun.

Solution:
Changed -O0 to -g.

Platforms tested:
"h5committested"
Tested in titan too.

Misc. update:
2004-02-16 23:28:52 -05:00
Albert Cheng
a07f22582e [svn-r8206] Purpose:
Bug fix, sort of.

Description:
Some compilers, e.g., intel compiler, would take a long time
to compiler H5detect.c if optimization is on.

Solution:
Setup special make rules for H5detect to be compiled always with
optimization off.  Since H5detect is run once to generate H5Tinit.c,
it does not matter that much if it is optimized or not.

Platforms tested:
"h5committested".
Tested in Titan too.

Misc. update:
2004-02-16 17:06:35 -05:00
HDF Admin
7488de6c34 [svn-r8205] Snapshot version 1.6 release 2 (post0) 2004-02-15 20:55:44 -05:00
Quincey Koziol
2bca5589bc [svn-r8204] Purpose:
Doc cleanup

Description:
    Correct several grammar problems, as well as clarify a few more things,
based on John's feedback.
2004-02-14 09:39:23 -05:00
Quincey Koziol
bb35a53e4f [svn-r8202] Purpose:
Code cleanup/bug fix

Description:
    Fix configuration files to allow 64-bit compilation of the library with
a 64-bit version of zlib.

Solution:
    Moved important compiler flags settings from CC macro to CFLAGS macro.
Instead of setting CC (F9X, CXX) environment variable for compiling for 64-bit
code, users should just set the CFLAGS (FFLAGS, CXXFLAGS) to -q64.
    Updated INSTALL file to reflect this change.

Platforms tested:
    IBM p690 (copper) w/parallel, FORTRAN, C++, srcdir.
    Platforms specific - h5committest does not apply.
2004-02-13 15:08:27 -05:00
Quincey Koziol
cdfaa75e5e [svn-r8200] Purpose:
Bug fix typo

Description:
    Correct typo in last fix... *sigh*

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest - Really! :-)
2004-02-13 08:47:30 -05:00
Quincey Koziol
54ca217527 [svn-r8196] Purpose:
Bug fix

Description:
    Hack on include paths some more to make srcdir builds work correctly with
the [broken] dependency generation from the Intel 7.1 C compiler.

Platforms tested:
    Linux 2.4 (titan) w/srcdir build
    Too minor to require h5committest
2004-02-12 15:01:29 -05:00
Elena Pourmal
76d948fe81 [svn-r8195] Purpose: Maintenance after hdf5-1.6.2 release
Description: I updated HISTORY.txt and RELEASE.txt files, and
             ran bin/h5vers to change version number to 1.6.2-post0

Solution:

Platforms tested:

Misc. update:
2004-02-12 14:50:45 -05:00
Elena Pourmal
f9491185b3 [svn-r8193] Purpose: Maintenance for hdf5-1.6.2 release
Description: Changed version to be 1.6.2 and ran bin/release.
             Since several files are changed, I am checking them in before
             tagging the release

Solution:

Platforms tested: eirene

Misc. update:
2004-02-12 14:37:26 -05:00
Elena Pourmal
fac0a86dba [svn-r8192] Purpose: Maintenance
Description: Updated system and compilers information for platinum and titan

Solution:

Platforms tested:

Misc. update:
2004-02-12 14:07:34 -05:00
Albert Cheng
8f7e37c9e4 [svn-r8191] Purpose:
Updated with Teragrid cluster new entery.
Added QSC long double -> double known problem.
Removed gcc long long warning since we have added -wno-long-long
to suppress it.
2004-02-12 13:30:11 -05:00
Elena Pourmal
2847617737 [svn-r8190] Purpose: Maintenance
Description: On AIX 5.1, 64-bit parallel build fails when zlib is configured in.

Solution: Problem can be bypassed by removing "const" on line 29 in H5Zpkg.h
          I documented the problem and the solution.

Platforms tested: copper

Misc. update:
2004-02-12 11:29:55 -05:00
Elena Pourmal
aeb1c38353 [svn-r8189] Purpose: Maintenance
Description: Few minor editing fixes:

             RELEASE.txt

             Removed footnote 7 from the table, since it said
             that for Windows XP we do not distribute source code.
             We distribute source code, but the projects are for Win 2000.
             Projects are automatically converted to .NET projects if opened
             in the .NET environment. So it was a misleading footnote.
             Kent's instructions tell users how to work with the Win2000 projects
             in the .NET environment.

             INSTALL_Windows_withcpp.txt

             Fixed the name of the directory where all.dsw file is found
             Added information about libtestD DLLs; they have to be copied to the
             system directory before tests can be run.


Solution:

Platforms tested:

Misc. update:
2004-02-12 08:30:24 -05:00
Binh-Minh Ribler
3a98b437bf [svn-r8188] Purpose: Update install file
Description:
    Updated information regarding zlib and szlib.


Platforms tested:
    Not necessary.

Misc. update:
2004-02-11 23:20:33 -05:00
Quincey Koziol
060a527ded [svn-r8186] Purpose:
Bug fix

Description:
    Added directory where actual source code is located to allow broken Intel
C 7.1 compiler to generate dependencies correctly.

Platforms tested:
    Linux 2.4 (titan)
    too minor to need h5committest
2004-02-11 20:11:29 -05:00
Frank Baker
cfa317b2d3 [svn-r8185]
Purpose:
    Copy edit in the "Supported Configuration Features Summary" table.

Platforms tested:
    Reviewed in vi.
2004-02-11 16:37:28 -05:00
Frank Baker
feea47c923 [svn-r8184]
Purpose:
    Replaced the table and footnotes in "Supported Configuration Features
        Summary" with new versions for Release 1.6.2.
    Added "Supported Configuration Features Summary" to the TOC.

Platforms tested:
    Reviewed in vi and as a printed copy.
2004-02-11 16:21:31 -05:00
Elena Pourmal
cb5611f773 [svn-r8182] Purpose: Maintenance
Description: Added Linux 2.4 SuSe to the list of tested platforms.

Solution: JPL machine became available today and I finally
          finished testing there. C and C++ passed.

Platforms tested: tb16 at JPL

Misc. update:
2004-02-11 11:19:11 -05:00
Binh-Minh Ribler
d1d6538da8 [svn-r8180] Purpose: Correct project settings
Description:
    The C++ API was inadvertently enabled by default.  I disabled it.

Platforms tested:
    This change doesn't need testing.

Misc. update:
2004-02-10 21:13:04 -05:00
Frank Baker
d778dd0909 [svn-r8179]
Purpose:
    Added 2004 to the copyright date line.

Platforms tested:
    Viewed in vi.
2004-02-10 18:02:48 -05:00
Albert Cheng
7b1c09511a [svn-r8177] Purpose:
Bug fix.

Description:
"make check" failed because the macro "$<" is not known to those
makes.

Solution:
Replace that macro with a string name in the form of a more basic
macro of "$@".

Platforms tested:
Using make in sol, copper.
Using gmake in eirene (serial and PP).

Misc. update:
2004-02-10 17:46:17 -05:00
Pedro Vicente Nunes
f63891efb5 [svn-r8174] Purpose:
made instructions for CW install more clear

Description:

the ZLIB and SZIP library paths are harcoded in the project settings.
in case the user does not want these defaults add a hint to change it

"
If you do not have these libraries installed on these locations, you must change
the path in the Project Settings (menu Edit->Settings->Target->Access Paths)
"

also made clear that the project must be on <install_dir>/hdf5
as described in Windows_install.txt


Solution:

Platforms tested:

Misc. update:
2004-02-10 13:14:29 -05:00
Elena Pourmal
b47b8eca07 [svn-r8173] Purpose: Maintenance
Description: Added information where to get gzip and
             szip binaries for Windows.

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-02-10 11:53:36 -05:00
Elena Pourmal
a3b6e07770 [svn-r8172] Purpose: Maintenance for 1.6.2 release
Description: Updated locations of the Windows zlib and szip libraries,
             clarified how to extract files from the archive, and changed
             all references from 1.6.1 to 1.6.2

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-02-10 10:59:50 -05:00
Elena Pourmal
dfb626f53e [svn-r8170] Purpose: Maintenance
Description: C examples didn't have copyright notice.

Solution: Added copyright notice.

Platforms tested: verbena

Misc. update:
2004-02-10 10:08:54 -05:00
Elena Pourmal
56f977148a [svn-r8169] Purpose: Maintenance
Description: Updated information about tested platfroms and compilers.

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-02-10 09:20:04 -05:00
Elena Pourmal
35c204bad0 [svn-r8168] Purpose: Maintenance
Description: Added pointer to the section
            "How to build HDF5 Fortran with Intel Compiler" under HDF5 FAQ.

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-02-10 08:45:09 -05:00
Elena Pourmal
17d9a6f699 [svn-r8167] Purpose: Maintenance
Description: Added information about how to build C++ 64-bit library
             on SP machines.

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-02-10 08:39:37 -05:00
Quincey Koziol
b66a383c5e [svn-r8162] Purpose:
Bug fix

Description:
    Add ifdef around most of this file, to protect it from the Intel 7.1 C
compiler which seems to have bugs in its -MG flag for creating dependency
information.

Platforms tested:
    Linux IA64 (titan)
    too obscure to require testing on other platforms
2004-02-07 15:09:30 -05:00
Albert Cheng
0b327aab21 [svn-r8160] Purpose:
Bug fix

Description:
make check without doing make first would fail to build testphdf5.

Solution:
Put the testphdf5 back in the target of TEST_PROG_PP and removed
the "testphdf" without any parameter from testph5.sh.

Platforms tested:
copper parallel. This is not relevant to non-parallel cases.

Misc. update:
2004-02-07 12:24:55 -05:00
Albert Cheng
e43ee7a86d [svn-r8156] Updated with OSF-1 information.
Added the change of verbosity of the parallel test programs.
2004-02-05 18:17:36 -05:00
Pedro Vicente Nunes
4963676373 [svn-r8155] Purpose:
added a new Code Warrior project file
the old one lacked a source file that was introduced last month to the test library

Description:

Solution:

Platforms tested:

Misc. update:
2004-02-05 12:13:26 -05:00
Albert Cheng
1e8b2abff3 [svn-r8148] Purpose:
Updated with TFLOPS information.
2004-02-04 10:09:40 -05:00
Elena Pourmal
4bbfb5d3fb [svn-r8147] Purpose: Miantenance
Description: Changed version to 1.6.2-pre2 after creating a tar ball for testing.
             Tar ball is on the FTP site, testing announcement will follow.

Solution: Used bin/h5vers on eirene

Platforms tested: N/A

Misc. update:
2004-02-02 12:17:59 -05:00
Elena Pourmal
056bed9755 [svn-r8146] Purpose: Maintenance for hdf5-1.6.2-pre1 testing
Description: Changed version number to 1.6.2-pre1 before creating
             a tar ball for testing.

Solution: Used bin/h5vers script on eirene

Platforms tested: N/A

Misc. update:
2004-02-02 12:13:24 -05:00
Quincey Koziol
a4ed2d7de1 [svn-r8145] Purpose:
Bug fix.

Description:
    Revert the optimization to the MPI-I/O VFD from earlier this week that
eliminated calling MPI_File_set_size() when a file was truncated.  This doesn't
work because of the way we track the 'eoa' (end of allocated space) in the
file: we just advance the eoa value when space is allocated in the file and we
don't zero out the space in the file.  This causes a problem where we assume
that all "newly allocated" space in the file contains zero bytes, but if we
don't call MPI_File_set_size(), the file can contain the previous data (if the
file previously existed) and not zeros.
    Unfortunately, because we allow independent raw data parallel I/O, there
is no way to address this issue. :-(

Solution:
    Revert to previous method of retrieving the file's size, etc. from before
the optimization.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to require h5committest.
2004-02-01 22:58:32 -05:00
Quincey Koziol
d77b49efe0 [svn-r8141] Purpose:
Bug fix

Description:
    Move assertion to allow closing non-HDF5 files with the MPI-I/O VFD to
work correctly again.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2004-01-31 23:06:25 -05:00
Quincey Koziol
6e0a562d25 [svn-r8138] Purpose:
Bug fix.

Description:
    Allow H5Tget_native_type() to handle opaque fields in compound datatypes.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-01-31 13:01:35 -05:00
Quincey Koziol
34b2fedf24 [svn-r8125] Purpose:
Bug fix/optimization

Description:
    Address slowdown in MPI-I/O file metadata operations that was introduced
mid-stream.  We now _require_ a POSIX compliant parallel file system for the
MPI-I/O file driver (as well as for the MPI-POSIX file driver).
    Also optimized file open operation when the file is being created by
reducing the number of collective & syncronizing calls.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    h5committest
2004-01-30 20:37:08 -05:00
Albert Cheng
76bcf91b27 [svn-r8119] Purpose:
improvement.

Description:
Created an entry for 2.96 and added -Wno-long-long to the CFLAGS
to suppress the thousands of 'long long' warnings because we are
using it and we know it is not in the C89 standard.

Platforms tested:
Eirene.
2004-01-27 18:26:17 -05:00
Quincey Koziol
3aadcf6b46 [svn-r8116] Purpose:
Bug fix

Description:
    Update gcc 3.4 flags to reduce optimization level to the same settings
as for gcc 3.0-3.3 due to code generation bugs at higher optimization levels.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
2004-01-27 09:43:39 -05:00
Albert Cheng
de0c29b439 [svn-r8110] Purpose:
Improvement

Description:
Changed parsing of verbose level by the common test library routine.
Change t_mpi.c to use the Verbose control better.

Platforms tested:
Eirene (pp).

Misc. update:
2004-01-24 18:04:13 -05:00
Frank Baker
86382b56f8 [svn-r8108]
Purpose:
    Corrections from tech review in the following tool descriptions
        h5cc/h5pcc
        h5fc/h5pfc
        h5c++
Platforms tested:
    IE 5
2004-01-23 16:04:01 -05:00
Frank Baker
6d41a8cd01 [svn-r8107]
Purpose:
    Updated release tagline to read
        "Describes HDF5 Release 1.6.2, February 2004"
Platforms tested:
    IE 5
2004-01-23 15:52:55 -05:00
Frank Baker
b023308294 [svn-r8106]
Purpose:
    Updated release tagline to read
        "Describes HDF5 Release 1.6.2, February 2004"

Platforms tested:
    IE 5
2004-01-23 15:48:33 -05:00
Frank Baker
7369c95245 [svn-r8104]
Purpose:
    Added 2004 to copyright dates line
Platforms tested:
    IE 5
2004-01-23 15:16:55 -05:00
Frank Baker
6aae753b90 [svn-r8103]
Purpose:
    Added section for R 1.6.2.
    Removed 'current release' notation from R 1.6.1 section.
    Copy edits.

Platforms tested:
    IE 5
2004-01-23 15:15:05 -05:00
Albert Cheng
c2d20f62d4 [svn-r8101] Purpose:
Removed debug print statements committed by mistake.

Platforms tested:
eirene.
2004-01-23 09:07:52 -05:00
Albert Cheng
be0a322db3 [svn-r8099] Purpose:
Added the function ParseTestVerbosity() to be shared by all programs.

Platforms tested:
Eirene.
2004-01-23 01:29:55 -05:00
Albert Cheng
36ad158dd2 [svn-r8098] Purpose:
Bug fix

Description:
C++ compilers do not like the variable name new which is a kind word
for C++.  Changed it to newval instead.

Platforms tested:
Tested in Copper which is the one complained about the name.
2004-01-22 22:34:31 -05:00
Albert Cheng
c0c69d1a17 [svn-r8095] Purpose:
Improvement.

Description:
Complete change of the verbose control to use the routines provided by
the test/libh5test.a.

Platforms tested:
Tested in Eirene (parallel).

Misc. update:
2004-01-22 18:10:38 -05:00
Albert Cheng
c84e2ff653 [svn-r8093] Purpose:
New feature.

Description:
Added function SetTestVerbosity() so that other applications can
set the verbosity explicitedly without the whole testframe taking
over.
Added Verbose queries shorthands to make code more readable and
easier to change the levels of low, medium and high.

Platforms tested:
Eirene (both serial and parallel).

Misc. update:
2004-01-22 18:05:47 -05:00
Frank Baker
493394bc17 [svn-r8092]
Purpose:
    Add h5pcc and h5pfc
Platforms tested:
    Safari and IE 5
2004-01-22 17:06:54 -05:00
Frank Baker
2a90299de7 [svn-r8091]
Purpose:
    Correct 'strpad' parameter values in h5tset/get_strpad_f
        e.g., H5T_STR_NULL_F corrected to H5T_STR_NULLPAD_F
Description:
    Safari, IE 5
2004-01-22 16:20:42 -05:00
Frank Baker
e2833ee1e3 [svn-r8088]
Purpose:
    Correct H5Pget_edc_check return values
Platforms tested:
    Safari, IE 5
2004-01-22 16:14:12 -05:00
Frank Baker
4dc9b5f023 [svn-r8086]
Purpose:
    Copy edits

Platforms tested:
    Safari, IE 5
2004-01-22 16:00:37 -05:00
Albert Cheng
f8cd97a833 [svn-r8085] Purpose:
Improvement.

Description:
Verbosity level were specified by numbers which are not meaningful
and prone to typos.

Solution:
Adapted the Verbosity predefined level symbols from HDF4
and changed all numberic verbosity to symbolic values.
(Still need to convert some left over macros like MESSAGE.)

Platforms tested:
Eirene.
No h5committest since this is trivial.
2004-01-22 15:58:02 -05:00
Quincey Koziol
0a3c362073 [svn-r8083] Purpose:
Bug fix

Description:
    Tweak address comparison of external file list's heap address a bit to
pacify Windows.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Asking Pedro to test on Windows
    Too minor to require h5committest
2004-01-19 15:59:55 -05:00
Quincey Koziol
01f079c241 [svn-r8081] Purpose:
Bump version number after creating snapshot for user.
2004-01-19 13:51:21 -05:00
Quincey Koziol
60437a575a [svn-r8080] Purpose:
Add tests & docs

Description:
    Added tests for the recent B-tree bug fixes & document their fix in the
release notes.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Too minor to require h5committest
2004-01-19 13:48:50 -05:00
HDF Admin
b96a990f04 [svn-r8078] Snapshot version 1.6 release 1 (post18) 2004-01-18 20:50:04 -05:00
Quincey Koziol
fecdd9022d [svn-r8076] Purpose:
Bug fix.

Description:
    Fix problems in B-tree deletion routine that were corrupting the data
structure when the B-tree had several levels and the right-most item from a
leaf node that was the right-most child of an internal node was removed.
    Also address similar problems when a complete internal or right-most node
was removed.

    NOTE: The B-tree deletion routines are still _NOT_ maintaining the B-tree
properties correctly, that will be addressed in a future (hopefully soon) fix.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too obscure to require h5committest
2004-01-16 15:26:01 -05:00
Albert Cheng
4c9ff323aa [svn-r8073] Purpose:
Bug fix.

Description:
OSF1 machine at PSC barked at "make install" because an intended
comment was inserted in the middle of the column.  This is not kosher
because officially, make comments should be started with # at column 1.

Solution:
Moved the comment of installing h5fc as h5pfc to start at column 1.

Platforms tested:
Not h5committested since this is exposed by the PSC machine and Elena
has tested the fix there.

Misc. update:
2004-01-15 23:18:04 -05:00
Raymond Lu
ca6c8cbeae [svn-r8072] *** empty log message *** 2004-01-15 15:41:42 -05:00
Raymond Lu
c516bc9a85 [svn-r8071] Purpose: bug fix
Description: h5dump and h5ls cannot handle special characters when data
        is enum type.


Platforms tested: h5committest
2004-01-15 15:41:32 -05:00
MuQun Yang
4a3be41643 [svn-r8070] Purpose:
fix a project setting bug for release hdf5 c++ test

Description:
WS2_32.lib is forgotten to add to the release version of testhdf5_cpp. Some interal windows files cannnot be found.

Solution:
Add WS2_32.lib.

Platforms tested:

Misc. update:
2004-01-15 15:06:12 -05:00
Elena Pourmal
552feb708c [svn-r8069]
Purpose: Maintenance

Description: Compilation of C++ APIs failed when ecc compiler was used.

Solution: Quincey and Raymond found out that one needs
          -D__GNUC__ flag with ecc v7.1 to build on titan. I added
           compilation flags from the config/ia64-linux-gnu file to the
           c++/config/ia64-linux-gnu

Platforms tested: hal (Altix), titan
                  On titan C++ tests passed, but build failed in the
                  tools/misc directory with the misterious message:
                  .depend:28: *** multiple target patterns.  Stop.

Misc. update:
2004-01-15 14:13:00 -05:00
Elena Pourmal
23a3648278 [svn-r8065]
Purpose: Bug fix

Description: I made a type in the production flags.

Solution: Fixed.

Platforms tested: titan

Misc. update:
2004-01-14 19:03:52 -05:00
Elena Pourmal
1ae65c4ef8 [svn-r8064]
Purpose: Maintenance

Description: I added new configuration file ia64-linux-gnu to the
             c++/config directory and made ecc a default C++ compiler
             for ia64-linux-gnu systems

Solution: N/A

Platforms tested: Altix (SGI Linux64 IA64 machine) - all tests passed
                  titan - configuration passed; it is still building

Misc. update:
2004-01-14 15:28:29 -05:00
MuQun Yang
ca8d225c20 [svn-r8063] Purpose:
Update c++ test project

Description:
dumplicate codes in c++ test has been removed and relinked with c tests.
However, this is not reflected on windows.
Solution:
make testhdf5_cpp and testhdf5_cppdll depend on libtest.lib and libtestD.lib; under
that case, the test is relinked with c tests.

Platforms tested:
windows 2000

Misc. update:
2004-01-14 15:20:59 -05:00
MuQun Yang
e8c1fc7b64 [svn-r8061] Purpose:
update project files.

Description:
testframe.c defines some helper functions. windows libtest and libtestD projects need to incoporate
this function.
Solution:
Add testframe.c in libtest.dsp and libtestd.dsp.
Platforms tested:
windows 2000
Misc. update:
2004-01-14 14:57:41 -05:00
Quincey Koziol
feda85c82a [svn-r8059] Purpose:
Bump version # after creating another snapshot for a user.
2004-01-13 13:58:42 -05:00
Quincey Koziol
5dd93ebcbf [svn-r8058] Purpose:
Bug fix

Description:
    Plug another small memory leak for fill-values.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-01-13 13:56:34 -05:00
Quincey Koziol
2ad18c24ac [svn-r8055] Purpose:
Bump revision number after creating snapshot for user testing.
2004-01-13 13:06:16 -05:00
Quincey Koziol
a847246eb4 [svn-r8054] Purpose:
Bug fix

Description:
    Correct two problems with variable-length datatypes in datasets:
        - When overwriting an entire dataset, writing the fill value to the
            file would be skipped, causing problems for VL datatypes when
            objects in the file had been unlinked (and thus the space in the
            file was not all zeros)
        - When an application has set a fill-value for a dataset and the
            dataset's datatype contained a VL datatype, the library was filling
            space on disk with the memory form of the VL information, instead
            of the disk form.


Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2004-01-13 13:01:04 -05:00
HDF Admin
41ea50dea1 [svn-r8052] Snapshot version 1.6 release 1 (post15) 2004-01-11 20:48:33 -05:00
Quincey Koziol
7f6fbe6b60 [svn-r8049] Purpose:
Code cleanup & reorganization

Description:
    Move further in the testing framework cleanup, eliminating all the
global variables (moving them into testframe.c as static variables) from the
testing framework code and moving it into the libh5test.a.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o thread-safety, c++ & parallel
    h5committested
2004-01-09 20:41:34 -05:00
Raymond Lu
c891e4a01e [svn-r8046] Purpose: bug fix
Description: int64_t couldn't be found after titan's ecc was upgraded.

Solution: Added -D__GNUC__ to CFLAGS

Platforms tested: titan(titan specific)
2004-01-08 15:49:05 -05:00
Albert Cheng
be87d135e1 [svn-r8044] Purpose:
Updated.
2004-01-08 15:17:39 -05:00
Albert Cheng
45646fcb89 [svn-r8042] Purpose:
Feature

Description:
Added option -showconfig which Shows the HDF5 library configuration summary

Platforms tested:
No h5committest test which does not test these tools.
Tested in eirene by hand.

Misc. update:
2004-01-08 15:07:23 -05:00
Quincey Koziol
300af1d809 [svn-r8039] Purpose:
Bug fix

Description:
    When two property lists are compared, the H5Pequal routine was just
comparing the raw information for the property values.  This causes problems
when the raw information contains pointers to other information.

Solution:
    Allow a 'compare' callback to be registered for properties, so that a user
application get perform the comparison itself, allowing for "deep" compares of
the property value.
    This was exported to the H5Pregister & H5Pinsert routines in the development
branch, but not the release branch.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2004-01-08 09:55:19 -05:00
Elena Pourmal
4264e3444a [svn-r8036]
Purpose: Windows maintenance for the 1.6.2 release

Description: Included regenerated H5Tinit.c and modofied testhdf5(dll).dsp
             files to the archive files.

Solution:

Platforms tested: This is a pure Windows update, so it was tests on
                  Windows 2000 with MSVC++ for all.zip(debug and release x DLL)
                  and
                  Windows 2000 with MSVC++ Intel C and Fortran
                  compilers for all_withf90.zip(debug and release)

Misc. update:
2004-01-07 14:33:05 -05:00
Albert Cheng
6a9d906c90 [svn-r8035] Purpose:
feature

Description:
Install the C and Fortran compiler commands as h5pcc and h5pfc if
parallel mode is used.

Platforms tested:
"h5committested"
2004-01-07 12:45:16 -05:00
Elena Pourmal
fb1494ea6e [svn-r8034] Purpose: Maintenance
Description: Bump up the version number before giving a tar ball to the MAC HDF5
             Fortran user.

Solution: run bin/h5vers on eirene

Platforms tested: N/A

Misc. update:
2004-01-07 10:59:17 -05:00
Elena Pourmal
c4b27c5a18 [svn-r8032]
Purpose: Maintenance

Description: Added information about how to build HDF5 Fortran Library
             (use --disable-shared --enable-static with configure)

Solution: N/A

Platforms tested: N/A

Misc. update:
2004-01-06 14:54:21 -05:00
Elena Pourmal
7cb2f1bad3 [svn-r8031]
Purpose: Maintenance

Description: Added Fortran support for MAC OS X

Solution: This port was tested only for IBM XL Fortran compiler
           version 8.1 Beta.
          Few things to remember:
              1. do not use AFS to build Fortran; compiler
                 for some reason cannot find *.mod files that
                 were successfully compiled.
              2. Fortran Library can be built only with --disable-shared
                 --enable-static flags.

Platforms tested: pommier, h5committested (it is amasing, but iot works
                  really nicely! Albert, Thank you!)

Misc. update:
2004-01-06 14:51:40 -05:00
Elena Pourmal
4ccf6a145f [svn-r8030]
Purpose: Maintenance

Description: Added Fortran support for MAC OS X

Solution: This port was tested only for IBM XL Fortran compiler
           version 8.1 Beta.
          Few things to remember:
              1. do not use AFS to build Fortran; compiler
                 for some reason cannot find *.mod files that
                 were successfully compiled.
              2. Fortran Library can be built only with --disable-shared
                 --enable-static flags.

Platforms tested: pommier, h5committested (it is amasing, but iot works
                  really nicely! Albert, Thank you!)

Misc. update:
2004-01-06 14:51:10 -05:00
Quincey Koziol
24fcd4013f [svn-r8029] Purpose:
Bump version number after making a snapshot for a user.
2004-01-06 13:59:09 -05:00
Quincey Koziol
56bf3cb4d3 [svn-r8027] Purpose:
Bug fix

Description:
    Fix small memory leak of fill-value information inside the library.

Solution:
    "reset" the fill-value object header message, so that the internal buffer
gets freed.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2004-01-06 13:44:36 -05:00
Quincey Koziol
0e53db4964 [svn-r8024] Purpose:
Code cleanup

Description:
    Refactor library testing framework (used for the testhdf5 & ttsafe tests)
to remove almost all of the duplicated code, moving the common code into a
new 'testframe.c' source file.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o thread-safety
    h5committest
2004-01-06 12:53:16 -05:00
cvs2svn
64e365a48f [svn-r8023] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2004-01-06 12:53:16 -05:00
Albert Cheng
83c7a8dfaa [svn-r8019] Purpose:
Feature

Description:
Moved the InitTest from individual tests (testhdf5.c, ttsafe.c)
to libh5test (h5test.*) so that it can be used by other tests too.

Platforms tested:
"h5committested"
2004-01-05 21:49:01 -05:00
HDF Admin
31dc73ffcc [svn-r8016] Snapshot version 1.6 release 1 (post12) 2004-01-04 20:50:00 -05:00
Albert Cheng
32a213632c [svn-r8014] Description:
Added a test of fill value before any data is written to a dataset.
Rename short_dataset() as dataset_fillvalue() as it reflects better
the tests.  Also removed the option of -S since the fill value test
will be tested always.


Platforms tested:
"h5committested"
2004-01-02 23:57:25 -05:00
Quincey Koziol
2a14f37bda [svn-r8012] Purpose:
Bug fix

Description:
    Fix szip FORTRAN tests..

Solution:
    Increase the chunk size to be bigger than the szip 'pixels per block'.
Also add in code that checks for a maximum number of errors and doesn't keep
reporting that thousands of errors have occurred.

Platforms tested:
    Linux 2.4 (verbena) w/szip & FORTRAN
    Not tested w/h5committest since this combination isn't covered by it.
2004-01-02 00:05:26 -05:00
Quincey Koziol
a550ccd1d2 [svn-r8010] Purpose:
Bug fix

Description:
    Add special-case handling to floating-point conversion tests to avoid
problems with denormalized values on Cray T3E & T90 platforms.  (Still not
working on Cray SV1, but at least it's closer).

Solution:
    Detect denormalized values and don't try to operate on them on the Crays.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray T3E (hubble.cray.com)
    Cray T90 (gypsy.cray.com)
2003-12-31 15:36:44 -05:00
Quincey Koziol
502b49b2b9 [svn-r8008] Purpose:
Bug fix

Description:
    Range check the szip 'pixels per block' against the chunk size of the
dataset when attempting to create a new dataset, since the szip library
requires the PPB to be at least the size of the fastest changing dimension
in the chunk.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor for h5committest
2003-12-31 15:28:47 -05:00
Albert Cheng
9599f877c3 [svn-r8004] Purpose:
Code cleanup.

Description:
The H5Eclear is not needed for the macros VRFY and INFO.

Platforms tested:
"h5committested"

Misc. update:
2003-12-31 14:43:38 -05:00
Quincey Koziol
51638099ad [svn-r8002] Purpose:
Bump snapshot version after creating bugfix snapshot for user.
2003-12-31 14:22:46 -05:00
Quincey Koziol
1d913177a8 [svn-r8001] Purpose:
Bug fix

Description:
    Fixed bug in hyperslab iteration where certain combinations of flattened
and non-flattened dimensions would cause incorrect locations to be iterated
over.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-12-31 14:19:19 -05:00
Quincey Koziol
d765a024ea [svn-r7992] Purpose:
Code cleanup

Description:
    Note in the release notes that the short MPI-I/O bug has been fixed and
also clean up the configure.in a bit.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-12-29 14:31:08 -05:00
Quincey Koziol
7a84df8979 [svn-r7991] Purpose:
Update release notes for recent VL-datatype bug fix.
2003-12-29 14:03:49 -05:00
Raymond Lu
4db6879a8c [svn-r7987] *** empty log message *** 2003-12-29 13:04:05 -05:00
Raymond Lu
dbcb597810 [svn-r7986] Purpose: bug fix
Description: VL datatype fails in certain scenario

Solution: Test: added more test to tvltypes.c

Platforms tested: tested for 1.7 version
2003-12-29 13:03:52 -05:00
HDF Admin
26ef0873b7 [svn-r7983] Snapshot version 1.6 release 1 (post9) 2003-12-28 21:02:20 -05:00
Albert Cheng
38aa912af2 [svn-r7981] Regenrated Dependies files.
h5committested.
2003-12-25 22:02:36 -05:00
Albert Cheng
daece6fc91 [svn-r7977] Purpose:
A small correction of the old_func declaration.

Platforms tested:
Only in eirene(pp) since it is trivial.

Misc. update:
2003-12-25 16:17:52 -05:00
Albert Cheng
768ff478d8 [svn-r7976] Purpose:
Bug fix.

Description:
short_dataset() was not increasing overall errors detected when such
were found.

Solution:
Fixed.

Platforms tested:
Only in Eirene (pp).  No h5committest since it is trivial.

Misc. update:
2003-12-25 16:16:35 -05:00
HDF Admin
43234790a1 [svn-r7975] Snapshot version 1.6 release 1 (post8) 2003-12-21 20:52:01 -05:00
Albert Cheng
b512b165c4 [svn-r7973] Purpose:
New feature.

Description:
Added a test (short_dataset) that writes only part of a dataset and
then reads the whole dataset back in.  Verify the unwritten part were
set to fill value.

Solution:

Platforms tested:
Tested in copper, eirene, LANL theta & QSC.

Misc. update:
2003-12-18 16:15:34 -05:00
Albert Cheng
d76f228300 [svn-r7972] Purpose:
Bug fix

Description:
MPIO driver did not detect partial read or write.  It assumed if read
completed, all bytes requested are read.  Therefore, if a dataset was
not completely written yet, the unread part will not be filled with
default fill value.

Solution:
Added the MPI_Get_elements call to find exactly how many bytes
are read (or written).  For read case, if not enough is read,
the rest is padded with zeros.  For write case, it is an error
if not able to write them all in first attempt. (It is not
always possible to repeat write for MPIO since file-view may
be changed, collective would hang, etc. So, we do just one attempt.)
2003-12-18 16:13:00 -05:00
Albert Cheng
b7ede363d4 [svn-r7964] Purpose:
feature

Description:
Added the ability to handle srcdirname as the build-directory.

Platforms tested:
No h5comittest but tested in LANL QSC machine.
2003-12-16 16:34:24 -05:00
Albert Cheng
e5a200f939 [svn-r7961] Purpose:
feature
Description:
    Folded in the printing of skipped tests to the skippedlog file.
Platforms tested:
    h5committest does not test it.  This has been tested successfully
    by the daily tests.
2003-12-16 08:40:23 -05:00
Albert Cheng
33768706c7 [svn-r7957] Purpose:
Just trivial editing of comments.
Platforms tested:
   Eyeballed since the changes are all trivial and involved comments only.

Misc. update:
2003-12-15 14:06:22 -05:00
HDF Admin
4394881d94 [svn-r7956] Snapshot version 1.6 release 1 (post7) 2003-12-14 20:54:06 -05:00
Albert Cheng
4ad9908de0 [svn-r7954] Description:
cvs checkout often included empty directories the contents of which
   are no longer needed.
   Added -P to cvs command to prune them.

Platforms tested:
no h5committest which does not test snaptest.
2003-12-13 23:03:08 -05:00
Quincey Koziol
7352b3a30f [svn-r7952] Purpose:
Bug snapshot version after creating tar file for user to test bugfix.
2003-12-13 15:10:36 -05:00
Quincey Koziol
bbb4d22621 [svn-r7951] Purpose:
Bug fix

Description:
    Attributes which were created with scalar dataspaces were reporting their
dataspace as a simple dataspace when queried later.

Solution:
    Fix the dataspace handling code when reading in the attribute message from
the file to set the extent type correctly.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-12-13 15:08:11 -05:00
Quincey Koziol
1214d6e304 [svn-r7949] Purpose:
Update with correct location on FTP server.
2003-12-13 13:53:05 -05:00
Quincey Koziol
6528bd5473 [svn-r7947] Purpose:
Bug fix

Description:
    Fix problems building on Debian Linux when Intel's "ecc" compiler is
not available.

Platforms tested:
    Eyeballed - very trivial patch from user.
2003-12-13 13:46:15 -05:00
Quincey Koziol
3f845b25c0 [svn-r7945] Purpose:
Bump snapshot version number after giving a snapshot w/bugfix to a user.
2003-12-13 13:21:19 -05:00
Quincey Koziol
ff328b54b9 [svn-r7944] Purpose:
Bug fix.

Description:
    Using a selection offset with hyperslab selections in chunked datasets
was getting into an infinite loop and hanging the application.

Solution:
    Apply the selection offset to the hyperslab selection properly.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o parallel
    h5committest
2003-12-13 13:14:39 -05:00
Quincey Koziol
05194784fd [svn-r7942] Purpose:
Bug fix/code cleanup

Description:
    Add MPE information for new H5I functions.

Platforms tested:
    Eyeballed - very minor
2003-12-12 08:46:09 -05:00
Albert Cheng
7f6c619305 [svn-r7939] Purpose:
cleanup.
Description:
   Removed the old command that parses setenv2 and setenv3 which are
   replaced by setenvN.

Platforms tested:
No h5committest since it does not test this script.
Pretty sure it works.
2003-12-11 15:28:01 -05:00
Quincey Koziol
375cef3d83 [svn-r7938] Purpose:
Add RM docs for new H5I routines.

Description:
    Add new H5I routines to the reference manual.
2003-12-11 13:30:29 -05:00
Quincey Koziol
4eeaf0bcca [svn-r7936] Purpose:
Add new feature

Description:
    Add FORTRAN wrappers for new H5I routines.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-12-11 13:29:39 -05:00
Quincey Koziol
1f272a2cee [svn-r7935] Purpose:
Add new feature

Description:
    Add FORTRAN wrappers for new H5I routines.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-12-11 13:29:36 -05:00
Quincey Koziol
cf59123115 [svn-r7933] Purpose:
Add new feature

Description:
    Add new H5I{dec|get|inc}_ref() routines and tests for them.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-12-11 13:26:56 -05:00
Quincey Koziol
69d2e3fd11 [svn-r7931] Purpose:
Bug fix/code cleanup

Description:
    Make H5Pclose_class() decrement the ID's reference count to close a generic
property class ID, which allows the new H5I routines to work correctly.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-12-11 13:25:13 -05:00
Quincey Koziol
b9f349d953 [svn-r7928] Purpose:
Update release notes to mention new H5I{get|dec|inc}_ref() routines.
2003-12-11 13:21:53 -05:00
Quincey Koziol
c66d1ae181 [svn-r7927] Purpose:
Bug fix

Description:
    Clean up a few allocations of zero-sized blocks that were detected with
the new free-list assertions.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o parallel
    too minor to require h5committest
2003-12-10 13:35:15 -05:00
Quincey Koziol
bf918c5abe [svn-r7925] Purpose:
Code cleanup

Description:
    Add more assertions to detect attempted allocations of zero-sized blocks.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o parallel
    too minor to require h5committest
2003-12-10 13:32:06 -05:00
Quincey Koziol
d19927898d [svn-r7921] Purpose:
Bug fix

Description:
    Fix a couple of 1.4 compat bogons that crept in.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    config not tested with h5committest
2003-12-10 11:25:07 -05:00
HDF Admin
7aee827e45 [svn-r7919] Snapshot version 1.6 release 1 (post4) 2003-12-07 20:49:25 -05:00
Quincey Koziol
211baa5e46 [svn-r7918] Purpose:
Code cleanup

Description:
    Clean up compiler warnings, especially the 'FUNC' variable not used which
comes out in production mode.

Solution:
    Had to add a new FUNC_ENTER_NOAPI_NOINIT_NOFUNC macro for those non-API
functions which don't need the 'FUNC' variable defined.  (This will be _so_
much easier when C99 is standard on all our supposed platforms, since it has a
__FUNC__ macro... )

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor for h5committest (although there were lots of files changed, the
        change was minor in each one)
2003-12-06 15:40:12 -05:00
Quincey Koziol
f00ad1c5d6 [svn-r7916] Purpose:
Bug fix

Description:
    Make a copy of the index value for H5Giterate and use that instead of
dereferencing the index pointer.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to need h5committest
2003-12-06 09:57:07 -05:00
Albert Cheng
99258dce52 [svn-r7911] Purpose:
feature

Description:
-setup now also sets up or updates the current source directory.

Platforms tested:
LANL Theta.
2003-12-03 12:10:29 -05:00
Albert Cheng
63e2541626 [svn-r7903] Change --prefix default to pwd/hdf5, a directory in the build
directory.  This eliminates the problem that the builder may not
have permission to install in the default install directory.
It also allows multiple builds in the same host or multiple srcdir
using the same source.

Platforms tested:
Eirene plus eyeballing of changes.

Misc. update:
2003-12-01 22:47:02 -05:00
HDF Admin
3ac28525ee [svn-r7902] Snapshot version 1.6 release 1 (post3) 2003-11-30 20:49:54 -05:00
Albert Cheng
de50a0fb41 [svn-r7901] Description:
Synchronized with the changed v1.7 branch.  No content change,
purely just formatting.

Platforms tested:
Copper (pp).

Misc. update:
2003-11-28 18:14:22 -05:00
Albert Cheng
762f236fab [svn-r7899] Updated. 2003-11-27 12:18:36 -05:00
Albert Cheng
1c80e0216f [svn-r7897] Description:
Added *.clog which are generated by the MPE option, to the CLEAN list.

Platforms tested:
Tested in copper which supports the MPE option.

Misc. update:
2003-11-27 12:11:37 -05:00
Albert Cheng
600b2f08b8 [svn-r7896] Purpose:
new test.

Description:
Added test_mpio_1wMr test which verifies if the file system can support
the POSIX requirement of 1 process writes, many processes read.
This version also has the option of using atomicity and file-sync.

Platforms tested:
Tested only in Copper since this is particular to C parallel.

Misc. update:
Update release_docs/RELEASE.
2003-11-27 11:11:09 -05:00
Quincey Koziol
48ab7fbf63 [svn-r7894] Purpose:
Bug fix

Description:
    Correct typo in gcc 2.96 warning
2003-11-27 08:03:36 -05:00
Albert Cheng
f2eecee94c [svn-r7893] Purpose:
new feature

Description:
Folded the new feature of -setup option into this branch too.

Platforms tested:
Tested in LANL Theta.

Misc. update:
2003-11-26 13:25:08 -05:00
Quincey Koziol
4a77040deb [svn-r7891] Purpose:
Code cleanup

Description:
    Clean up a compiler warning

Platforms tested:
    Titan (user02)
    Too minor to require h5committest
2003-11-26 12:05:07 -05:00
Quincey Koziol
54712d33eb [svn-r7889] Purpose:
Add warning

Description:
    Warn users about known bugs for gcc 2.96

Platforms tested:
    Titan (user02)
    Does not apply to h5committest
2003-11-26 12:04:26 -05:00
Quincey Koziol
2d09675e14 [svn-r7887] Purpose:
Update ecc compiler flags

Platforms tested:
    Titan
    Not relevant to other platforms, so no h5committest.
2003-11-25 16:24:24 -05:00
Quincey Koziol
595ca51493 [svn-r7885] Purpose:
Small bug fix

Description:
    MPI_DOUBLE_PRECISION -> MPI_DOUBLE in C code.

Platforms tested:
    Cray T3E (hubble)
    Too minor to require h5committest
2003-11-25 15:51:29 -05:00
Quincey Koziol
36a46913be [svn-r7883] Purpose:
Bug fix

Description:
    Handle denormalized floating-point values in a more general way that
uses a different 'epsilon' for determining if two values are "close enough"

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
    Pittsburgh Alpha Cluster (lemieux.psc.edu)
2003-11-25 14:26:04 -05:00
Quincey Koziol
d0b29413fc [svn-r7881] Purpose:
Update DEC compiler support

Description:
    Updated DEC/Compaq compiler detection to handle DEC->Compaq switchover
in compiler version string.

    Also, copied v5.x compiler flags to V6.x compiler flags and included the
-ieee and -misalign flags necessary for correct floating-point support.

Platforms tested:
    Pittsburgh Alpha Cluster (lemieux.psc.edu)
2003-11-25 14:24:16 -05:00
Quincey Koziol
55f78f7baa [svn-r7878] Purpose:
Update release notes with recent bug fix.
2003-11-24 11:49:59 -05:00
Quincey Koziol
80c45ea549 [svn-r7876] Purpose:
Omnibus floating-point bug fix changes

Description:
    There are a number of problems in the floating-point conversion code that
were exposed by Ray's recent int<->float checkin:
    - The 'my_isnan' code in test/dtypes.c was broken and would always return
        true.  The meant that the actual values in the float<->float conversion
        tests were _never_ checked, hiding the other bugs included in this
        checkin.
    - A recent change I made to the type conversion code used "FLT_MIN" instead
        of "-FLT_MAX" for the most negative 'float' value for the double->float
        conversion, which meant that any the negative number that was converted
        from a double to a float would have been mapped to zero, essentially.
    - A change that Robb appeared to have made ~2.5 years ago to the "generic"
        float->float conversion routine appears to be incorrect and I've backed
        it out.
    - Floating-point conversions on SGI's which converted denormalized values
        would be mapped to zero instead of being propertly preserved in the new
        type.  This was addressed by an SGI-specific system call to prevent the
        behavior.

Solution:
    Described above, generally.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest

Misc. update:
    release_docs/RELEASE update forthcoming...
2003-11-24 11:49:27 -05:00
HDF Admin
7d68090f03 [svn-r7874] Snapshot version 1.6 release 1 (post2) 2003-11-23 20:49:15 -05:00
Frank Baker
1e0da8a33a [svn-r7867]
Purpose:
    Remove release number from document title

Description:
    Removed "Release 1.4" from "Introduction to HDF5" document title.

Platforms tested:
    IE 5
2003-11-20 15:18:29 -05:00
Quincey Koziol
8350c2b241 [svn-r7866] Purpose:
Mention metadata benchmark in release notes.
2003-11-20 09:55:55 -05:00
Quincey Koziol
cd2c884923 [svn-r7864] Purpose:
Add metadata benchmark to the 1.6 branch

Description:
    Port the metadata benchmark to the 1.6 branch, for LANL's use (mostly).

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    not tested with h5comittest, so it wasn't run
2003-11-20 09:53:43 -05:00
Quincey Koziol
247113c3d9 [svn-r7863] Purpose:
Update release notes with metadata change information
2003-11-20 09:39:10 -05:00
Quincey Koziol
1b27db1755 [svn-r7861] Purpose:
Bug fix

Description:
    Our previous "optimization" of metadata writing which only wrote metadata
from one process was abusing MPI-I/O and after some consultation with Rob Ross
and Rajeev Thakur, Albert & I have come up with a solution...

Solution:
    Instead of only writing from one process, issue a collective write
operation with all processes, for metadata writes.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-11-20 09:37:11 -05:00
Bill Wendling
649ddde342 [svn-r7856]
Purpose:
    Bug fix

Description:
    If using g++ on HP-UX, the flags for aCC would be placed on the
    command line. This was causing g++ to fail the configuration test.

Solution:
    CHanged the test so that it's a case statement. If it's the aCC
    compiler, then use those flags. Otherwise, don't specify flags. This
    case statement can be modified to provide compiler-specific flags in
    a similar way to other config/* files.

Platforms tested:
    Hp-UX (Hp-UX specific change.)

Misc. update:
2003-11-19 10:13:02 -05:00
HDF Admin
74996193eb [svn-r7855] Snapshot version 1.6 release 1 (post1) 2003-11-16 20:47:28 -05:00
Bill Wendling
25b5d2b0df [svn-r7853] Purpose:
Bug Fix

Description:
    CFLAGS wasn't using user-set values in one instance

Solution:
    Changed CFLAGS="..." to CFLAGS="$CFLAGS ..."

Platforms tested:
    Arabica
    (the machines affected)

Misc. update:
2003-11-14 15:23:48 -05:00
Bill Wendling
5967e0542a [svn-r7852] Purpose:
Bug Fix

Description:
    CXXFLAGS and CPPFLAGS wasn't including user-set values.

Solution:
    Changed CXXFLAGS="..." to CXXFLAGS="$CXXFLAGS ..." and CPPFLAGS="..."
    to CPPFLAGS="$CPPFLAGS ..."

Platforms tested:
    Kelgia,
    Modi4
    Arabica
    (the machines affected)

Misc. update:
2003-11-14 15:23:10 -05:00
Bill Wendling
217d934133 [svn-r7851] Purpose:
Buglet Fix

Description:
    The FFLAGS environment variable wasn't being passed to the Makefiles.
    The config files weren't including it when they set the FFLAGS
    variable.

Solution:
    Changed the FFLAGS="..." command to FFLAGS="$FFLAGS ..." instead.

Platforms tested:
    Copper
    Arabica
    Verbena

Misc. update:
2003-11-14 15:10:07 -05:00
Quincey Koziol
9b27239ba8 [svn-r7850] Purpose:
Update manifest with new files.
2003-11-14 07:11:06 -05:00
Quincey Koziol
42eb9ee55f [svn-r7846] Purpose:
Bug fix.

Description:
    The new routines added for H5MM_[m|c]alloc were causing the function
stack code to infinitely recurse while allocating room for the thread-specific
information (when thread-safety was turned on).

Solution:
    Call HDmalloc directly instead of H5MM_malloc

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Changed are not tested in h5committest
2003-11-13 13:15:42 -05:00
Quincey Koziol
898ba82d42 [svn-r7844] Purpose:
Bug fix

Description:
    Variable length strings and sequences with NULL pointers were not handled
by library, causing problems access the data.  This also affected fill values
for variable-length datatypes.

Solution:
    Address the issues in the library by detecting NULL sequences/strings
and avoid trying to convert them.

    Patched up dumper to display NULL sequences/strings.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-11-13 10:20:23 -05:00
cvs2svn
dd241064c1 [svn-r7843] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-11-13 10:20:23 -05:00
Quincey Koziol
2d3c7c457e [svn-r7837] Purpose:
Bug fix.

Description:
    Skip over situation where malloc(0) might occur.

Platforms tested:
    IBM p690 (copper)
    too minor to require h5committest
2003-11-12 15:46:04 -05:00
Quincey Koziol
a89dda8cb1 [svn-r7830] Purpose:
Bug fix & code cleanup

Description:
    Allowing the library to call malloc with a size of 0 bytes causes problems
for some users, so we check for allocations of 0 bytes and disallow them now.

    Cleaned up some code which could call malloc with 0 size.

    Changed some code calling HDmalloc directly to call H5MM_malloc(), which
allows us to check for 0 sized allocations.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-11-08 10:33:13 -05:00
Quincey Koziol
677f6cc3d8 [svn-r7828] Purpose:
Bug fix

Description:
    Make --disable-hsizet work properly again by fixing a couple of tests and
correcting the definition of SSIZET_MAX.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest not used, as it doesn't test this configuration.
2003-11-08 09:21:55 -05:00
Quincey Koziol
1716cab24b [svn-r7825] Purpose:
Code optimization

Description:
    Improved integer & floating-point datatype conversions by removing some
corner cases.  Got rid of algorithm which walked the buffer of elements to
convert backwards, switching to algorithm which computes the non-overlapping
space in the buffer and repeatedly converts it in the forward direction.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
    Cray SV1 & T3E (T90 is not accessible)
2003-11-07 15:21:45 -05:00
Quincey Koziol
9bd97b4496 [svn-r7821] Purpose:
Bug fix

Description:
    Don't check the number of szip parameters set during the "can apply" and
"set local" callbacks, be safe about setting the parameters instead.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-11-06 08:43:06 -05:00
Quincey Koziol
40a64a6938 [svn-r7819] Purpose:
Warning cleanup

Description:
    Make a parameter 'const' to clean up a warning during compiles.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-11-06 08:40:46 -05:00
Albert Cheng
b7c199e600 [svn-r7812] Updated with bug fix commmitted. 2003-11-03 10:38:42 -05:00
Albert Cheng
d677301726 [svn-r7810] Purpose:
bug fix.

Description:
It sometimes complained of wrong number of argument to test.
This happened when more than 1 tool are redeployed.
The problem is due to an unquoted variable expanded into
multiple strings, confusing the test command.
Fixed by putting quotes around it.

Platforms tested:
only tested in verbena since it is trivial.
2003-11-03 10:31:36 -05:00
HDF Admin
48988885d6 [svn-r7808] Snapshot version 1.6 release 1 (post0) 2003-11-03 00:38:11 -05:00
Frank Baker
8dba5a6bfd [svn-r7799]
Purpose:
    Improved tools index
        Better categorization and consistency in style
        Clarified notes regarding tools that are not included with the
            library distribution
    Added notes in the h4toh5 and h5toh4 descriptions that these tools
        are now distributed separately (with pointer to distribution site)
    A few dozen copy edits

Platforms tested:
    IE 5
2003-10-30 17:55:08 -05:00
Quincey Koziol
aac52421c5 [svn-r7795] Purpose:
Code cleanup & simplification

Description:
    Replace [non-working] code in routine to build up an MPI derived type for
a hyperslab selection that was supposed to "flatten" out contigous blocks with
code that uses a selection iterator (which _does_ have working "flattening"
code).

    Remove "contiguous hyperslab" code for MPI selections as it is unnessary
now.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o parallel
    Linux 2.4 (verbena) w/FORTRAN & C++
    Solaris 2.7 (arabica) w/64-bit
2003-10-30 16:38:22 -05:00
Quincey Koziol
f34c639e3f [svn-r7790] Purpose:
Bug fix & code cleanups

Description:
    Change our use of MPI derived datatypes to not create datatypes with
"0-sized" lengths, which causes the LANL Q machine to hang.

    Also, get rid of "prefer MPI derived datatypes" environment variable since
it has no advantage.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w & w/o parallel
    h5committest
2003-10-29 14:32:45 -05:00
Frank Baker
a481eaa62d [svn-r7788]
Purpose:
    Fixes for user-reported Ref Manual bugs:
    H5Gget_objname_by_idx: corrected 'size' parameter specification
    H5Sselect_elements: Expanded 'coord' parameter description to make it
         clear that values are 0-based.
         Additional minor copy edits and formatting cleanup.

Platforms tested:
    IE 5
2003-10-29 13:43:34 -05:00
Albert Cheng
1fcd976d2a [svn-r7782] Sync. it with the dev. version. 2003-10-28 23:28:35 -05:00
Albert Cheng
107eb4d4d7 [svn-r7780] Purpose:
"bug fix", sort of.

Description:
now that stream-vfd is on by default, it does not work for Tflops.
Set it to no by default.

Platforms tested:
Tested in Tflops.

Misc. update:
2003-10-28 23:22:17 -05:00
Bill Wendling
5cc5e0c5dc [svn-r7773] Purpose:
Update

Description:
    Added check for correctly working basename and xargs programs. Mike
    McKay was having problems with broken xargs. The basename check was
    just a good idea.

Platforms tested:
    Linux & Arabica (trivial change already done in mainline branch).

Misc. update:
2003-10-28 13:00:39 -05:00
Quincey Koziol
1948208208 [svn-r7768] Purpose:
Code cleanup

Description:
    Untwist the last few sections of code before starting on fixing the
problems with reading off the end of the file in earnest.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    FreeBSD 4.9 (sleipnir) w/parallel
    h5committest not necessary - parallel only changes
2003-10-28 10:34:01 -05:00
Quincey Koziol
a47a65885a [svn-r7766] Purpose:
Code cleanup

Description:
    More collective/independent cleanups to straighten out code contortions.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    FreeBSD 4.9 (sleipnir) w/parallel
    Linux 2.4 (verbena) w/fortran & C++
    Solaris 2.7 (arabica) w/64-bit extensions enabled
2003-10-28 09:42:31 -05:00
Quincey Koziol
1e7b213aa2 [svn-r7764] Purpose:
Bug fix

Description:
    Code was using an internal DXPL with collective I/O turned on during
independent I/O operations to fill dataset on disk.

Solution:
    Switched to internal DXPL with independent I/O

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    FreeBSD 4.9 (sleipnir) w/parallel
    Linux 2.4 (verbena) w/fortran & C++
    Solaris 2.7 (arabica) w/64-bit extensions enabled
2003-10-28 09:40:15 -05:00
Quincey Koziol
3a6c866bf8 [svn-r7762] Purpose:
Bug fix

Description:
    Correct list of files to install after recent FORTRAN documentation cleanup

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/"make install-doc"
    h5committest doesn't test this.
2003-10-28 07:08:32 -05:00
Quincey Koziol
bba4295cb1 [svn-r7760] Purpose:
Fix serial build

Description:
    I accidentally put the "use_par_opt_io" variable in an #ifdef PARALLEL
section.

Solution:
    Hoist it out of parallel section

Platforms tested:
    Eyeballed it - very trivial
2003-10-27 19:16:35 -05:00
Frank Baker
45bf0a583f [svn-r7756]
Purpose:
    Removing the files
        hdf5/doc/html/fortran/h5*_FORTRAN.html
    as the content has been integrated into the files
        hdf5/doc/html/RM_H5*.html
2003-10-27 16:39:17 -05:00
Quincey Koziol
7840775796 [svn-r7755] Purpose:
Code cleanup

Description:
    Straighten out more goofiness in the MPI code dealing with collective I/O
transfers - mostly make certain that a view is set if-and-only-if collective
I/O is occurring on raw data (and vice versa for views and independent I/O)

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    too minor to repquire h5committest
2003-10-27 16:38:38 -05:00
Frank Baker
6859fd9ef2 [svn-r7753]
Purpose:
    Removing the files
        hdf5/doc/html/fortran/h5*_FORTRAN.html
    from CVS as the content has been integrated into the files
        hdf5/doc/html/RM_H5*.html
2003-10-27 16:37:41 -05:00
Frank Baker
1d0e34e7e4 [svn-r7748]
Purpose:
    Updated discussion in Fortran90 section.

Platforms tested:
    IE 5
2003-10-27 15:10:00 -05:00
Quincey Koziol
20958358f2 [svn-r7747] Purpose:
Code cleanup

Description:
    Remove collective parallel I/O checking code, now that it's impossible to
get into this code with collective access enabled.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-27 13:18:12 -05:00
Quincey Koziol
1655f87a67 [svn-r7745] Purpose:
Code cleanup

Description:
    More refactoring on setup of MPI-IO parameters: hoisted the code to change
the transfer mode from collective to independent up into the H5D_read and
H5D_write routines, instead of duplicating it inside each of the chunk/contig
read/write routines.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-27 12:11:32 -05:00
Quincey Koziol
76409b1d81 [svn-r7743] Purpose:
Code cleanup

Description:
    Clean up setup code for collective I/O transfers to make the logic more
obvious.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor for h5committest
2003-10-27 11:32:12 -05:00
Binh-Minh Ribler
28c2e442dd [svn-r7738] Purpose:
Fix example

Description:
    On Solaris 64 (Sol), the output has garbage for a dataset when
    fill value is not set.

Solution:
    Added setting fill value to the dataset first.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    SunOS sol 5.8 (sol)
2003-10-25 23:26:55 -05:00
Robert E. McGrath
73afb8ce3e [svn-r7736] Purpose:
Fix bug.

Description:
Wrong parameter in subroutine call.

Note: this only affects '--xml', and only affects the value of
the fill value that is reported.

Solution:
put correct parameter in subroutine call

Platforms tested:
verbena

Misc. update:
2003-10-25 14:34:47 -05:00
Quincey Koziol
5e2f37f579 [svn-r7735] Purpose:
Bug fix

Description:
    Single hyperslab selections (which were set with only one call to
H5Sselect_hyperslab) that had dimensions that could be "flattened" but were
interspersed with dimensions that could not be flattened were not correctly
handled, causing core dumps.

Solution:
    Re-work "flattening" code to handle this case properly.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-25 11:42:00 -05:00
Frank Baker
f2205620fe [svn-r7729]
Purpose:
    Editing within Fortran90 descriptions

Platforms tested:
    Safari
2003-10-24 16:10:13 -05:00
Frank Baker
a6f5c742ba [svn-r7728] Purpose:
Add missing "END SUBROUTINE" line for h5pget_layout_f
2003-10-24 16:01:46 -05:00
Frank Baker
4c9e00886a [svn-r7727] Purpose:
Integrate Fortran90 function descriptions
        Remove "Non-C APIs" sections; add "Fortran90 Interface" sections
        Remove note that Fortran APIs are described in a separate window

Platforms tested:
    Safari
2003-10-24 15:16:53 -05:00
Quincey Koziol
a510f4e8a2 [svn-r7726] Purpose:
Code cleanup

Description:
    Refactored handlier of VFL drivers in file access and data transfer property
lists in order to simplify and unify the code dealing with them.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-24 14:40:23 -05:00
Quincey Koziol
8624dff4d9 [svn-r7723] Purpose:
Bug fix

Description:
    Change "H5_HAVE_PARALLEL" to "H5_HAVE_FPHDF5" around VFL ID, to prevent
daily builds from failing.

Platforms tested:
    FreeBSD 4.9 (sleipnir) w/parallel
    too specialized to require h5committest
2003-10-24 14:36:52 -05:00
Binh-Minh Ribler
88595aecaa [svn-r7722] Purpose:
Minor bug fix

Description:
    Added missing "const" to the first parameter in two functions:
    DSetCreatPropList::set/getFillValue

Platforms:
    Only effected C++ API
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
2003-10-23 23:11:10 -05:00
Frank Baker
0e008a403e [svn-r7721]
Purpose:
    Formatting in Fortran90 descriptions

Platforms tested:
    Safari
2003-10-23 17:09:11 -05:00
Frank Baker
e7339323c4 [svn-r7718]
Purpose:
    Formatting and copy edits in the Fortran90 descriptions

Platforms tested:
    Safari
2003-10-23 16:37:09 -05:00
MuQun Yang
79c7a62982 [svn-r7716] Purpose:
Update installhdf5lib.bat

Description:
To make it easy for maintenance and install HDF5 library on windows
hdf5 cpp libraries should be "semi-auto" installed.

Solution:


Platforms tested:

Misc. update:
2003-10-23 13:28:15 -05:00
Elena Pourmal
bc0fce5ba7 [svn-r7713]
Purpose: Maintenance

Description: Removed h5createU8 file

Solution:

Platforms tested: arabica

Misc. update:
2003-10-23 08:02:56 -05:00
Elena Pourmal
83f49851c1 [svn-r7712]
Purpose: Maintenance

Description: h5createU8 utility was the old h5import utiltity.
             It was supposed to be gone for 1.6.1 but I forgot to delete
             it before the release. I am doing it now.

Solution:

Platforms tested: arabica

Misc. update:
2003-10-23 08:02:08 -05:00
Bill Wendling
b9e1706b8d [svn-r7695] Purpose:
Update

Description:
    Made stream-vfd driver on by default.

Platforms tested:
    Linux (small configuration change)

Misc. update:
2003-10-22 15:24:44 -05:00
Frank Baker
c54bafe243 [svn-r7693]
Purpose:
    Formatting and copy edits within Fortran90 descriptions

Platforms tested:
    Safari
2003-10-22 14:44:16 -05:00
Frank Baker
09fc43ba75 [svn-r7687]
Purpose:

Description:

Solution:

Platforms tested:

Misc. update:
2003-10-21 14:20:41 -05:00
Quincey Koziol
017c6dc88d [svn-r7683] Purpose:
Bug fix

Description:
    Reduce optimization level from -O3 to -O for gcc 3.*, since it seems to
be generating bad code for the atomic type conversions now...

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Linux 2.4 (eirene, verbena)
    h5committest not necessary, this is a GNU-only change.
2003-10-20 23:08:45 -05:00
Quincey Koziol
b14862e2f8 [svn-r7681] Purpose:
Bug fix

Description:
    Remove the [duplicated] native C9x datatype initializatin code from H5T.c
and let the automatically generated code in H5Tinit.c handle initializing them,
if they are allowed by the compiler.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Linux 2.4 (verbena, eirene)
    probably should be h5committested, but it's late and I'm fairly certain
        this will fix the problem... :-/
2003-10-20 23:06:09 -05:00
Pedro Vicente Nunes
e68e5aea56 [svn-r7678] Purpose:
version 8 of Code Warrior has a bug on the open file function
that causes one of our tests to fail
documented this in the install instructions

removed a CW specific header file include , that was left from version 6
from the file testhdf5.c



Platforms tested:
Code warrior
linux


Misc. update:
2003-10-20 16:04:20 -05:00
Quincey Koziol
0502d501c2 [svn-r7676] Purpose:
Bug fix

Description:
    Avoid "OPAQUE" symbol in template macro invocation, since it's already
defined as a macro on Windows.

Solution:
    OPAQUE -> OPAQ

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Windows ? (Pedro's machine :-)
2003-10-20 14:01:41 -05:00
Quincey Koziol
d8c33ee5d4 [svn-r7672] Purpose:
Code cleanup/refactoring/potential bug fix

Description:
    Migrate "template macro" changes from development branch back into this
branch, since they give about a 20% speedup for integer & floating-point type
conversions.  The also avoid a potential alignment bug on the Crays...

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest not necessary, since the changes are already verified in the
    development branch.
2003-10-20 12:18:53 -05:00
Quincey Koziol
848ea8370b [svn-r7671] Purpose:
Document recent changes

Description:

Solution:

Platforms tested:

Misc. update:
2003-10-20 12:16:57 -05:00
Quincey Koziol
96160c5c9f [svn-r7670] Purpose:
Bug fix

Description:
    In certain [very rare] circumstances, the object header for a named datatype
can preempt the object header for the dataset using the named datatype, causing
the library to die an ugly death.

Solution:
    "Protect" the object header for the dataset (taking it out of the cache)
before getting the information about it's named datatype, avoiding the cache
deadlock.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Windows ? (at Boeing site)
2003-10-20 12:13:13 -05:00
Elena Pourmal
fff49a52a6 [svn-r7661] Purpose: Maintenance after 1.6.1 release
Description: Changes version to 1.6.1-post0 and updated
             RELEASE.txt and HISTORY.txt filese fro the new version.

Solution: N/A

Platforms tested: N/A

Misc. update:
2003-10-16 21:58:32 -05:00
Elena Pourmal
e28d341378 [svn-r7659] Purpose: Maintenance
Description: I run bin/release to create an hdf5-1.6.1 release tar
             ball. Now I am checking in modified files before
              tagging the release.

Solution: N/A

Platforms tested: N/A

Misc. update:
2003-10-16 21:47:22 -05:00
Frank Baker
fc59fc145d [svn-r7658]
Purpose:
    Rebalance function index at top of page.

Platforms tested:
    Safari, IE 5
2003-10-16 17:55:29 -05:00
Frank Baker
a0a7849d51 [svn-r7657]
Purpose:
    Added "Documentation" section.
    Listed fixed doc bugs.
2003-10-16 17:34:55 -05:00
Albert Cheng
1de258c74c [svn-r7656] Purpose:
Updated TFLOPS info.
2003-10-16 17:26:01 -05:00
Frank Baker
5adc5f7a5e [svn-r7655]
Purpose:

Description:
    index.html: Added link to PDF version of RM, to be posted approximately
        one week post-release
    RM_H5Front.html: Added note describing Fortran API integration into main RM
        Added link to PDF version of RM, to be posted approximately one week
        post-release
    RM_H5?.html and RM_H5.html (except RM_H5P.html):
        Removed notes that Fortran APIs are described in a separate window
    RM_H5P.html:  Added note that Fortran API integration is complete
        throughout RM except in H5P

Solution:

Platforms tested:

Misc. update:
2003-10-16 17:13:35 -05:00
Frank Baker
e8a5037bf8 [svn-r7654]
Purpose:
    Integrate Fortran90 interfaces into C RM.

Solution:
    Remove "Non-C APIs" sections.
    Add "Fortran90 Interfaces" sections with F90 descriptions.

Platforms tested:
    IE 5, Safari
2003-10-16 16:42:08 -05:00
Frank Baker
50fc3aa90d [svn-r7653]
Purpose:
    Added section for R1.6.1
        Listed new functions:
            H5Fget_freelist
            h5pset_fapl_mpiposix_f *
            h5pget_fapl_mpiposix_f *
                (* With note that these functions were new in 1.6.0
                   but undocumented.)
        Listed functions with changed sytax:
            H5Gget_obj_info -- changed struct
            h5fset_cache_f -- parameter change
    And a copy edit in the 1.6.0 section where that release was
        referred to as 'Release 1.5'.

Platforms tested:
    Safari, IE 5
2003-10-16 15:08:21 -05:00
Frank Baker
5969f9b759 [svn-r7652]
Purpose:
    Tools index:    Updated link to Java/HDF Tools page.
    h5dump:         Updated XML-related options and links.

Platforms tested:
    Safari, IE 5
2003-10-16 14:47:57 -05:00
Frank Baker
70a72e25b4 [svn-r7651]
Purpose:
    Expand H5open/h5open_f and H5close/h5close_f descriptions
    to indicate that these two calls are mandatory in Fortran90
    applications (though optional in C).

Platforms tested:
    Safari, IE 5
2003-10-16 14:43:38 -05:00
MuQun Yang
3229b2e89a [svn-r7650] Purpose:
update windows install doc.

Description:
Correct some typos,
Add more description for installing the libraries and the example.

Solution:

Platforms tested:

Misc. update:
2003-10-16 14:31:01 -05:00
Elena Pourmal
b7b2fa633e [svn-r7649]
Purpose: Maintenance

Description: Added instructions for how to configure the Libraries not
             to use external filters gzip and szip (gave a reference
             to the proper section of the INSTALL_WINDOWS.txt file).
             Fixed few typos; added pointer to the HDF FTP directory
             where precompiled  zlib and szlib can be found.

Solution: N/A

Platforms tested: N/A

Misc. update:
2003-10-16 11:43:35 -05:00
Elena Pourmal
c0bbc1771c [svn-r7648]
Purpose: Maintenance for the 1.6.1 release

Description: Updated "platforms tested" section using the reports
             sent out for the hdf5-1.6.1-pre1 testing; added
             h5pget_driver_f subroutine to the "Known problems" section.

Solution: N/A

Platforms tested: N/A

Misc. update:
2003-10-16 11:26:49 -05:00
Albert Cheng
f16c87cdc1 [svn-r7646] Description:
Updated.

Platforms tested:
no need.
2003-10-15 18:07:51 -05:00
Frank Baker
1b4abf8e45 [svn-r7645]
Purpose:
    Add two missing Fortran calls:
        h5pget_fapl_mpiposix_f
        h5pset_fapl_mpiposix_f

Platforms tested:
    Safari
2003-10-15 17:09:09 -05:00
Frank Baker
a47a0ac49a [svn-r7637]
Purpose:
    Update docs index subtitle and tagline to
    read 'Release 1.6.1, October 2003'.

Platforms tested:
    IE 5, Safari
2003-10-15 13:53:34 -05:00
Frank Baker
db240fe802 [svn-r7636]
Purpose:
    Update release tagline to read:
        Describes HDF5 Release 1.6.1, October 2003

Platforms tested:
    Safari, IE 5
2003-10-15 13:15:21 -05:00
Frank Baker
d95549a97d [svn-r7635]
Purpose:
    Minor copy edit in H5Pset_sizes.

Platforms tested:
    Safari
2003-10-15 12:35:40 -05:00
Elena Pourmal
d6bf02f008 [svn-r7633] Purpose: Maintenance
Description: Bumped the version number to 1.6.1-pre2 after creating
             a tar ball for the third round of testing


Platforms tested: bin/h5vers -s 1.6.1-pre2 on eirene

Misc. update:
2003-10-14 22:27:09 -05:00
Albert Cheng
f1af7146fa [svn-r7632] Purpose:
Changed version to 1.6.1-pre1 to prepare for release.

Platforms tested:
"h5committested"
2003-10-14 17:56:59 -05:00
Albert Cheng
e64002074b [svn-r7631] Purpose:
Changed version to 1.6.1-pre1 to prepare for release.

Platforms tested:
"h5committested"

Misc. update:
2003-10-14 17:56:40 -05:00
MuQun Yang
cf378ed5d3 [svn-r7628] Purpose:
document a known windows bug for dumper.

Description:
Two tests: h5dump --xml thlink.h5 and h5dump --xml tmany.h5 failed on windows
xp on .Net for debug and debug dll.

Solution:
Not worth to spend more time on this, just document this.

Platforms tested:

Misc. update:
2003-10-14 15:48:24 -05:00
Bill Wendling
5f17827df4 [svn-r7627] Purpose:
Bug Fix

Description:
    The Dependencies files for fortran/ weren't being generated properly.
    The "top_srcdir" variable was pointing to the src/fortran directory
    instead of the src/ directory. This is correct as far as configure's
    concerned, but our code needs the src/ directory to work.

Solution:
    Remove the /fortran/.. from the end of top_srcdir if it exists there.

Platforms tested:
    Arabica (just needed to check that Fortran compiles okay).

Misc. update:
2003-10-14 15:28:26 -05:00
Elena Pourmal
03b8c29148 [svn-r7625] Purpose: Maintenance
Description: Bumped up the version number after creating a tar ball
             for the second round of testing

Solution: N/A

Platforms tested: done with bin/h5vers on eirene

Misc. update:
2003-10-14 09:58:01 -05:00
Quincey Koziol
cc3f8148ed [svn-r7624] Purpose:
Updated dependencies and tracing information

Platforms tested:
    Not necessary.
2003-10-14 09:32:55 -05:00
Frank Baker
e67fc6a10c [svn-r7620]
Purpose:
    Integrate Fortran90 interfaces into C RM.
    (Cleanup pass for H5A and H5D, initially checked in last week.)

Solution:
    Remove "Non-C APIs" sections.
    Add "Fortran90 Interfaces" sections with F90 descriptions.

Platforms tested:
    IE 5, Safari
2003-10-13 17:15:49 -05:00
Bill Wendling
fbebe36aea [svn-r7619] Purpose:
Add check

Description:
    Added check that the tr program actually works.

Platforms tested:
    Sol (small fix)

Misc. update:
2003-10-13 16:02:29 -05:00
Quincey Koziol
87cb207125 [svn-r7617] Purpose:
Bug fix

Description:
    "group" test was not updating total number of errors correctly.

Platforms tested:
    None, just eyeballed it - too minor of a fix to require testing
2003-10-13 14:43:46 -05:00
Bill Wendling
dc51c5093b [svn-r7609] Purpose:
Update

Description:
    Changed default to "production" mode instead of "development" mode.

Platforms tested:
    Linux. Simple fix.

Misc. update:
2003-10-13 13:42:45 -05:00
Quincey Koziol
80a2e207f8 [svn-r7608] Purpose:
Bug fix

Description:
    Add MPE "color" for new H5Fget_freespace() API function.

Platforms tested:
    None - just eyeballed - too minor to require testing.
2003-10-13 12:34:49 -05:00
Elena Pourmal
5de413e72f [svn-r7606]
Purpose: Bug fix

Description: Type of the third argument to the h5pset(get)_cache_f subroutines
             was incorrect (INTEGER instead of INTEGER(SIZE_T)).
             I was confused while doing my previous change since
             fortran docs were wrong, and the type of the same argument in
             1_4 branch is INTEGER. I forgot to check carefully #if def for
             1_4 branch in the C code, and encountered only int type for the
             corresponding C functions. Since Fortran doesn't support
             backward compatibility, type of the argument should be
             always in sync with the latest branch.

Solution: ALWAYS, ALWAYS pay attention to compiler's warning.
          Fixed type to be INTEGER(SIZE_T).

Platforms tested: kelgia, copper 64-bit mode, solaris 2.7 64-bit mode.

Misc. update:
2003-10-13 12:26:37 -05:00
Binh-Minh Ribler
7e448b4393 [svn-r7604] Purpose:
Update release note

Description:
    Updated release notes, including some items that were missing from
    previous releases.

Platforms:
    Not applicable
2003-10-11 10:42:12 -05:00
Elena Pourmal
fbf7331f7d [svn-r7602]
Purpose: Bug fix

Description: Parameter rdcc_nelmts of the h5pget_cache_f subroutine
             had wrong INTEGER(SIZE_T) instead of INTEGER type.

Solution: Fixed the type

Platforms tested: arabica in 64-bit mode (where INTEGER(SIZE_T) is not
                  the same as INTEGER)

Misc. update:
2003-10-10 17:20:59 -05:00
MuQun Yang
0ee744833e [svn-r7600] Purpose:
bug fix

Description:
On windows debug/debugdll; somehow: a crash happened by free() function
although that string is "allocated".
Make some efforts to fix without success.
Suspect a compiler bug.

Solution:
Use #ifdef WIN32 #endif comment out that free function for the time being.
Hopefully h5dump debug version is not used.

Platforms tested:
windows 2000, linux 2.4(no need for more platforms because of win-specified).

Misc. update:
2003-10-10 11:04:48 -05:00
Frank Baker
9ae8ff3906 [svn-r7598]
Purpose:
    Integrate Fortran90 interfaces into C RM.

Solution:
    Remove "Non-C APIs" sections.
    Add "Fortran90 Interfaces" sections with F90 descriptions.

Platforms tested:
    IE 5, Safari
2003-10-10 10:42:17 -05:00
MuQun Yang
048b52f9c6 [svn-r7597] Purpose:
Project updating

Description:
h5_get_file_size is defined at h5test.c;
testhdf5 needs to depend on libtest.lib(h5test.c);
previous it is ignored.

Solution:
add in.

Platforms tested:
windows 2000, xp

Misc. update:
2003-10-10 10:36:03 -05:00
Frank Baker
77da80dd1b [svn-r7596]
Purpose:
    Integrate Fortran90 interfaces into C RM.

Solution:
    Remove "Non-C APIs" sections.
    Add "Fortran90 Interface" sections with F90 descriptions.

Platforms tested:
    IE 5, Safari
2003-10-10 10:30:13 -05:00
Quincey Koziol
232de6ee72 [svn-r7594] Purpose:
Bug fix

Description:
    The 'char *' type is one of the "strongly" aligned types on Crays, but
a 'void *' is "weakly" aligned.  So, assigning a 'void *' (pointing to a
location to place a 'char *') to a 'char **' can change the pointer value
during the assignment.

Solution:
    Don't alias the 'void *' where the variable-length information ('char *'
or 'hvl_t') will go.  Use a temporary variable on the stack to build up the
information about the VL string or sequence and then memcpy() the temporary
variable directly to the location pointed to with the 'void *'

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray SV1 (wind)
    specific to Cray problems, h5committest not necessary.
2003-10-10 10:23:46 -05:00
Quincey Koziol
d04ba65f9d [svn-r7593] Purpose:
Bug fix

Description:
    The 'char *' type is one of the "strongly" aligned types on Crays, but
a 'void *' is "weakly" aligned.  So, assigning a 'void *' (pointing to a
location to place a 'char *') to a 'char **' can change the pointer value
during the assignment.

Solution:
    Don't alias the 'void *' where the variable-length information ('char *'
or 'hvl_t') will go.  Use a temporary variable on the stack to build up the
information about the VL string or sequence and then memcpy() the temporary
variable directly to the location pointed to with the 'void *'

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray SV1 (wind)
    specific to Cray problems, h5committest not necessary.
2003-10-10 10:23:38 -05:00
Quincey Koziol
421dfab94c [svn-r7592] Purpose:
Bug fix

Description:
    Correct the size of the buffer needed for the destination value to use
the actual destination type size.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-10 09:56:03 -05:00
Raymond Lu
26757351f5 [svn-r7590] Purpose: Update
Description:  Update compiler's version for IRIX 6.5
2003-10-09 15:22:47 -05:00
Frank Baker
9fc00478b2 [svn-r7588]
Purpose:
    Integrate Fortran90 interfaces into C RM.

Solution:
    Remove "Non-C APIs" sections.
    Add "Fortran90 Interfaces" sections with F90 descriptions.

Platforms tested:
    IE 5, Safari
2003-10-09 13:59:27 -05:00
Quincey Koziol
cb02e121a2 [svn-r7586] Purpose:
Updated information about FreeBSD versions
2003-10-09 12:15:19 -05:00
Quincey Koziol
7cdd8df50d [svn-r7583] Purpose:
Code cleanup

Description:
    Added line #'s to a bunch of the error printf's, so it's easier to locate
where an error occurs.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray SV1 (wind)
2003-10-09 11:55:55 -05:00
Quincey Koziol
90bdeac677 [svn-r7581] Purpose:
Bug fix

Description:
    The tests recently added for checking a file's freespace and verifying the
new fields added to the H5G_stat_t structure use H5T_NATIVE_INT as the type for
the datasets and attributes they create.  Because the tests check explicit file
sizes, this causes problems on Crays, where a native int is 64-bit instead of
32-bit.

Solution:
    Change the tests to use H5T_STD_U32LE instead of H5T_NATIVE_INT.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray SV1 (wind)
2003-10-09 11:54:58 -05:00
Quincey Koziol
49727974f3 [svn-r7579] Purpose:
Bug fix

Description:
    The VL type conversion routine attempt to align it's destination buffer to
an offer that will work for both hvl_t and char * types, but the algorithm used
fails to work correctly on Cray machines.

Solution:
    Give up on attempting to align the buffer when it's allocated on the stack.
Just dynamically allocate it instead.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Cray SV1 (wind)
2003-10-09 11:51:52 -05:00
Frank Baker
6bc068e998 [svn-r7578]
Purpose:
    Minor copy edits.

Platforms tested:
    Safari, IE 5
2003-10-08 16:55:23 -05:00
Quincey Koziol
9eec8c21ea [svn-r7573] Purpose:
Bug fix

Description:
    When too many messages were inserted into an object header, the library
had an internal pointer to the "new message" that was pointing to the incorrect
location when the array of messages was re-allocated.
In the worst case, this could cause a file to be corrupted.

Solution:
    Update the internal pointer when the array is re-allocated.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Too small to require h5committest
2003-10-08 12:59:23 -05:00
Bill Wendling
f0fc174cdd [svn-r7570] Purpose:
Bug fix/ Update

Description:
    Added "void**" type to trace file (set to "x").

    Fixed dependencies so that it closes the DEPEND and NEW file handles.

Platforms tested:
    Linux (small fix)

Misc. update:
2003-10-07 16:12:28 -05:00
Elena Pourmal
dad6c778d5 [svn-r7568]
Purpose: Windows maintenance for the 1.6.1 release

Description: testhdf5 compilation failed on Win2000 because it needs
             to link with libtest library now.

Solution: Update the project to depend on libtest library

Platforms tested: Win200o with MSVC++ and DEC Fortran compilers

Misc. update:
2003-10-07 14:58:00 -05:00
Elena Pourmal
3c4f589329 [svn-r7563] Purpose: Maintenance
Description: Increased version number to 1.6.0-post11 after creating
             a tar ball for testing


Platforms tested: eirene

Misc. update:
2003-10-07 11:00:04 -05:00
Quincey Koziol
36ac2a1769 [svn-r7562] Purpose:
Feature add

Description:
    Add a few new fields to the H5G_stat_t structure, to allow more information
about the object header to be retrieved.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-07 10:27:30 -05:00
Quincey Koziol
134a692a83 [svn-r7561] Purpose:
Feature add

Description:
    Add a few new fields to the H5G_stat_t structure, to allow more information
about the object header to be retrieved.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-07 10:27:19 -05:00
Quincey Koziol
a5d1c5c576 [svn-r7560] Purpose:
Add feature

Description:
    Add H5Fget_freespace() routine, to check the amount of free space in a
    file.  This information is only valid until the file is closed currently,
    however (until we start recording the free space information in the file
    itself).

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-07 08:57:18 -05:00
Albert Cheng
4ee4926dbd [svn-r7557] Purpose:
Feature

Description:
Reactivate the big dataset test.
Set it default to off.

Solution:

Platforms tested:

Misc. update:
2003-10-07 04:44:16 -05:00
Elena Pourmal
c6c904de02 [svn-r7556]
Purpose: Enhancement

Description: On 64-bit Solaris and on Crays h5_chunk_read example
             displayed garbage instead of 0. One may mistakenly conclude
             that example is broken.
             h5_chunk_read reads data written by h5_extend_write.
             h5_extend_write extends dataset and does only partial writes. Therefore
             some data is never written to the file and since fill value
             is not set up, garbage is read back by h5_chunk_read

Solution: Set up fill value to initialize data.

Platforms tested: arabica 64-bit and Cray T3E.

Misc. update:
2003-10-06 16:23:05 -05:00
Bill Wendling
7dd5df4fa3 [svn-r7555] Purpose:
Bug Fix

Description:
    The h5fc script was failing to compile if --with-mpe was set.

Solution:
    Added the "--with-mpe" check to the fortran library. This puts
    mpe-specific libraries in the LIBS macro which is included into the
    h5fc script.

Platforms tested:
    Linux (verbena) Small change, so no need for full h5committesting.

Misc. update:
2003-10-06 15:25:06 -05:00
Quincey Koziol
1e5bd125bf [svn-r7554] Purpose:
Improved algorithm (bug fix, sorta)

Description:
    The internal algorithm for adding new IDs in the ID manager code (H5I) was
adding new IDs to the front of the linked list and never adjusting the order
of the items on the list (unless an ID was deleted).  If many new objects were
created, they would push earlier ones _way_ down the list (especially if the
objects were being leaked in the application, as they appear to be in the
current HDF-EOS5 library) and would cause O(n) search time for items on the
list.
    The ID caching code in the ID manager was avoiding this behavior sometimes,
but it was adding IDs that were looked up to the very tail of the cache and
they would frequently leave the cache before helping.

Solution:
    Implemented a "move to front" scheme for the linked list of IDs, which
improves the lookup situation for frequently accessed objects.

    Removed ID caching code now, as the "move to front" algorithm actually
works better.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-06 14:14:44 -05:00
Quincey Koziol
cd6a20f0c8 [svn-r7552] Purpose:
Bug/feature fix.

Description:
    Relax restriction on parallel writing to compact datasets to allow partial
I/O.

    Updated reference manual mentioning the issues involved.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too minor to require h5committest
2003-10-06 10:17:55 -05:00
Quincey Koziol
919f3ec4e8 [svn-r7550] Purpose:
Add new name datatype in attributes files
2003-10-06 08:55:30 -05:00
Quincey Koziol
4739cc20ee [svn-r7548] Purpose:
Bug fixes and code cleanup

Description:
    Whitespace removal.

    Added testfiles for named datatypes in attributes.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-05 16:30:13 -05:00
cvs2svn
e1ba6c55de [svn-r7547] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-10-05 16:30:13 -05:00
Quincey Koziol
b18839aebc [svn-r7546] Purpose:
Bug fixes and code cleanup

Description:
    Corrected output of array separator when vlen separator was needed.
        datatypes.

    Parts of formatting cleanup to greatly reduce the amount of trailing
        whitespace emitted in output.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-05 16:28:08 -05:00
Quincey Koziol
eb12b59f7c [svn-r7545] Purpose:
Bug fixes and code cleanup

Description:
    Changes to h5dump code:
        - Dump shared datatypes for any class of datatype, not just compound
            datatypes.
        - Cleaned up formatting to greatly reduce the amount of trailing
            whitespace emitted in output.  Also removed some spurious blank
            lines from named datatype output.

    Added code to generate named datatype attribute test file.

    Added tests for dumping named datatypes in attributes for both DDL and
        XML output.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-05 16:27:47 -05:00
Quincey Koziol
2834dda2b4 [svn-r7544] Purpose:
Bug fixes and code cleanup

Description:
    Re-worked ohdr test to use modification time messages instead of symbol
        table messages, now that the library correctly tries deleting the
        local heap and B-trees for the symbol tables (which didn't exist and
        caused the test to fail).

    Added tests for using named datatypes in attributes to verify that the
        reference counts are being tracked correctly, etc.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-05 16:26:03 -05:00
Quincey Koziol
defe2fb64f [svn-r7543] Purpose:
Bug fixes and code cleanup

Description:
    Lots of changes here:
        - Fixed bug #691 - when shared datatypes are used in attributes they
            are incorrectly copied into the attribute instead of referring
            the the named datatype in the file.  This required bumping the
            version of the attribute message.  The new version of the attribute
            message is only written out when a shared datatype is used in
            the attribute.  [Also, this format change made the size of the
            attribute smaller.]
        - Added information to attribute debugging routine so that shared
            datatypes are displayed correctly with the h5debug tool.
        - Refactored the H5O* routines to extract code that was common to
            several routines into subroutines to call.
        - Added 'link' method for H5O message sub-classes, which increments
            the link count on shared objects when a message is created which
            shares them.
        - Corrected [unreported] bug where the link count was not being
            decremented on the shared object when a object header message
            with a reference to that object was deleted from the file.
        - Reduced size of shared message from 49 bytes (which was incorrect
            anyway and should have been 48 bytes) to 10 bytes, which required
            bumping the version of "shared" messages.
        - Refactored some of the shared datatype routines to allow for easier
            queries of "committedness" internally to the library and also
            added routine to easily increment/decrement the reference count of
            a shared datatype.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-10-05 16:25:40 -05:00
Frank Baker
c9c54b6041 [svn-r7537]
Purpose:
    Alphabetizing the RM function entries.  This commit finishes the
    task in the 1.6 release branch.

Platforms tested:
    IE 5, Safari
2003-10-03 17:53:10 -05:00
Frank Baker
478ed94629 [svn-r7536]
Purpose:
    Alphabetized RM function entries

Platforms tested:
    Safari, IE 5
2003-10-03 15:07:00 -05:00
Elena Pourmal
152aded51f [svn-r7535]
Purpose: Maintenance

Description: I added dec-osf5.x configuration file. By default
             DEC cxx compiler is used to build HDF5 C++ Library


Platforms tested: True64 (PSC)

Misc. update:
2003-10-03 14:57:16 -05:00
Elena Pourmal
580f0b83ab [svn-r7534]
Purpose: Maintenance

Description: I added dec-odf5.x file to the c++/config directory.
             By default DEC cxx compiler is used to build HDF5 C++ Library.


Platforms tested: True64 (PSC)

Misc. update:
2003-10-03 14:55:57 -05:00
Frank Baker
1b5e1aba49 [svn-r7533]
Purpose:
    Update "Last modified:" line (which was overlooked for
        immediately-preceding commit)
2003-10-03 14:54:56 -05:00
Frank Baker
339316c91c [svn-r7532]
Purpose:
    Alphabetized function entries
    Fortran90 descriptions for h5acreate_f and h5aclose_f

Platforms tested:
    IE 5, Safari
2003-10-03 14:50:53 -05:00
Elena Pourmal
2ab6b28c76 [svn-r7531]
Purpose: Maintenance

Description: Changed version to 1.6.0-post10 after creating a release tar
             ball for a Fortran user.


Misc. update:
2003-10-01 14:53:03 -05:00
Elena Pourmal
5ecde13413 [svn-r7530] Purpose: Code cleanup
Description: On Linux systems valgrind tool complained about memory leaks in the
              statements like
              if(!a) free(a);

Solution: Replaced with
          if(a != NULL) free(a);

Platforms tested: eirene (too small for committest)

Misc. update:
2003-10-01 11:13:22 -05:00
HDF Admin
33a96cf913 [svn-r7516] Purpose:
bug fix

Description:
Removed an extra export command in the parse of setenvN

Platforms tested:
Tested by hand.

Misc. update:
2003-09-25 22:29:39 -05:00
Albert Cheng
e248afea59 [svn-r7515] Purpose:
Updated the last modified date.

Platforms tested:
IE viewed.

Misc. update:
2003-09-25 10:22:53 -05:00
Albert Cheng
113e26cf76 [svn-r7514] Purpose:
updated.
2003-09-25 10:16:17 -05:00
Albert Cheng
82d1061467 [svn-r7512] Purpose:
Added the entry of document of the three basic performance tools.
The information was provided by Robb long time ago.

Platforms tested:
eyeballed.

Misc. update:
2003-09-25 10:14:51 -05:00
cvs2svn
5234dd7fd9 [svn-r7511] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-09-25 10:14:51 -05:00
Albert Cheng
645b7cae4f [svn-r7505] Purpose:
Fold bug fix (op-configure) and new feature (setenvN)
from development branch.

Description:
setenvN is a general feature to do setenv with N arguments.
Fixed op-configure not to discard the next option argument.

Platforms tested:
Tested fine in development branch.
Will watch the next daily test result.

Misc. update:
2003-09-23 08:46:47 -05:00
HDF Admin
4589e4410a [svn-r7503] Snapshot version 1.6 release 0 (post8) 2003-09-21 20:48:44 -05:00
Quincey Koziol
1f7e7d9dca [svn-r7493] Description:
Disable "big" parallel tests until I get a chance to look into the
problems (probably during/after the workshop).

Platforms tested:
    Eyeballed
    Too minor to require h5committest
2003-09-18 17:52:25 -05:00
Albert Cheng
52a4d694b6 [svn-r7487] Purpose:
Improvement

Description:
The -w timeout option is not supported by all hosts.
Added the "ping -c 3" possible PING command.

Platforms tested:
Tested in eirene by hand only.

Misc. update:
2003-09-18 12:22:52 -05:00
Quincey Koziol
ed635e1eee [svn-r7486] Purpose:
Bump version # after creating bugfix snapshot

Platforms tested:
    None necessary.
2003-09-17 12:33:50 -05:00
Frank Baker
2d7eaf4363 [svn-r7485]
Purpose:
    Modifications to enable automatically generating a PDF version of the
    HDF5 Reference Manual with HTMLdoc.

Description:
    The HTML coding has been revised to provide necessary formatting and
    control guidance for HTMLdoc.  In the process, of course, the need for
    an occasional formatting or copy-edit correction was discovered.

Platforms tested:
    HTMLdoc, IE 5, Safari
2003-09-16 15:37:33 -05:00
Frank Baker
1399cd0f01 [svn-r7484]
Purpose:
    Adding the HTMLdoc and RM frontmatter files
        ./doc/html/PDF_RM_body.book
        ./doc/html/PDF_RM_front.book
        ./doc/html/RM_Title.html
        ./doc/html/RM_TOC.html
    All are labelled _DO_NOT_DISTRIBUTE_.
2003-09-16 15:28:19 -05:00
Frank Baker
2f06ba1563 [svn-r7483]
Purpose:
    PDF_RM_body.book  (the body of the RM)
    PDF_RM_front.book (RM frontmatter: title page, (c) notice, TOC)
        Configuration files for use by HTMLdoc in generating a PDF version
        of the HDF5 Reference Manual.
    RM_Title.html
    RM_TOC.html
        Reference manual title page and table of contents for use in the
        above-mentioned PDF versions.

Description:
    The files PDF_RM*.book contain configuration notations and the list
        files to be included in each book.
    The 2 *.html files are just HTML-coded text for generating the
        respective pages.

Platforms tested:
    Tested with HTMLdoc.
    These files aren't used with and don't afffect anything else and
    they are not distributed to users.
2003-09-16 15:24:49 -05:00
Quincey Koziol
9b15282007 [svn-r7481] Purpose:
Bug fix

Description:
    The MPI_File_set_size() routine on ASCI Red is not able to extend files
so that they are larger than 2GB.

Solution:
    Add an extra macro which controls whether MPI_File_set_size() can handle
>2GB offsets or if our "older" way of reading a byte, then writing a byte at
the appropriate offset should be used.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-09-16 12:35:31 -05:00
Quincey Koziol
58b49c8302 [svn-r7479] Purpose:
Bug fix

Description:
    H5Dwrite was only checking the "top level" of the datatype to stop parallel
I/O on variable-length datatypes.

Solution:
    Make checks "deeper".

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-09-16 12:25:53 -05:00
Quincey Koziol
3abb7a1f68 [svn-r7477] Purpose:
Clarify documentation about H5Tset_size for string datatypes.
2003-09-16 08:40:10 -05:00
Raymond Lu
82515c8899 [svn-r7475] Purpose: add more tests
Description: tests fixed length strings in two ways: array of strings and
    array of characters.


Platforms tested: tested for 1.7 branch.  Should works the same.
2003-09-15 15:42:39 -05:00
Quincey Koziol
4d86712bdb [svn-r7470] Purpose:
Increment version info after making snapshot for bug #1017 fix.

Platforms tested:
    No testing necessary.
2003-09-11 23:43:09 -05:00
Quincey Koziol
f3e445cfcb [svn-r7469] Purpose:
Code cleanup, etc.

Description:
    Generalize Ray's datatype fixes to handle packing compound datatypes which
are the base type of an array or variable-length type, etc.

    Also track "packedness" of a compound datatype from it's creation, instead
of only setting the 'packed' flag after the datatype was explicitly packed.

    Updated docs to reflect that a compound datatype is allowed to grow (but
not shrink).

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-09-11 23:36:23 -05:00
Quincey Koziol
75471825fd [svn-r7466] Purpose:
Fix incorrect # of 16-byte objects which fit into a 4096 byte global heap
collection (170 -> 127)
2003-09-11 08:46:56 -05:00
Quincey Koziol
4e39682a9b [svn-r7464] Purpose:
Tweak some wording for global heap description.
2003-09-11 08:34:40 -05:00
Quincey Koziol
14ed172f87 [svn-r7459] Purpose:
Increment version info after making snapshot for bug #1021 fix.

Platforms tested:
    No testing necessary.
2003-09-10 13:39:36 -05:00
Quincey Koziol
9c31ce9a7b [svn-r7458] Purpose:
Bug fix.

Description:
    Correct bug where a file opened twice, once with read-write permission
and once with read-only permission would cause closing the file with the
read-only file ID to fail because it was trying to flush information out
of the file.

Solution:
    Check the permissions on file IDs that are being closed and only flush
when the particular file ID was opened with write permission.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    too small to need h5committest
2003-09-10 13:33:48 -05:00
Quincey Koziol
0282f2219b [svn-r7455] Purpose:
Checkpoint file format revisions.

Description:
    Clarifications and cleanups related to file format review.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    Too minor to need h5committest
2003-09-10 10:33:58 -05:00
Quincey Koziol
59e8237a02 [svn-r7454] Purpose:
Checkpoint file format revisions.

Description:

Solution:

Platforms tested:

Misc. update:
2003-09-10 10:33:14 -05:00
MuQun Yang
ef6a62d4d9 [svn-r7448] Purpose:
bug fix

Description:
A user reports a strange bug when mixing Fortran and C language with current HDF5 binary.
It just generates H5Tinit.c on windows.
With some investigations, I found H5detect.c has been accidently added to windows hdf5 src directory, which is not supposed to do.

Inside H5detect.c, a main() is defined and that causes the application always run that functions.
Solution:
remove h5detect.c from windows project file.

Platforms tested:
windows 2000

Misc. update:
2003-09-09 12:51:03 -05:00
HDF Admin
c63abc42b0 [svn-r7447] Snapshot version 1.6 release 0 (post4) 2003-09-07 20:55:55 -05:00
Quincey Koziol
175beb3e95 [svn-r7443] Purpose:
Snapshot repo for bug fix testing
2003-09-03 21:13:22 -05:00
Quincey Koziol
80d6d8e472 [svn-r7442] Purpose:
Bug fix

Description:
    The VFL driver ID in a file's access proprty list wasn't being reference
counted correctly, causing the VFL driver to get prematurely closed after
several calls to "H5Pget_access_plist->H5Pclose".

Solution:
    Increment VFL driver ID reference count when copy of file's access property
list is made in H5Pget_access_plist()

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-09-03 21:05:16 -05:00
HDF Admin
4c4a93612e [svn-r7437] Snapshot version 1.6 release 0 (post2) 2003-08-31 20:56:22 -05:00
Quincey Koziol
04137b3a16 [svn-r7435] Purpose:
Bug Fix and code cleanup

Description:
    Correct error in H5T_detect_class that was causing nested compound datatypes
with to not detect the datatype class of fields correctly, which caused errors
with fill-values, variable-length datatypes and chunks later on.

    Return the rank of the array datatype from H5Tget_array_dims(), like
H5Sget_dims().

    Lots of cleanups to datatype code, to make the handling of arrays, compound
types, variable-length strings and sequences and enumerated types more
consistent and robust.

Platforms tested:
    FreeBSD 4.9 (sleipnir)
    h5committest
2003-08-30 20:50:47 -05:00
Quincey Koziol
39106425cf [svn-r7432] Purpose:
Corrected typo in help string
2003-08-30 20:40:50 -05:00
Quincey Koziol
b772787079 [svn-r7427] Purpose:
Bug fix

Description:
    When datasets are deleted from a file, they are removed from the sieve
    buffer, but instead of invalidating only the part of the sieve buffer affected,
    the sieve buffer code would throw away the entire sieve buffer, potentially
    including other raw data in the buffer that hadn't been written to disk yet.

Solution:
    Improve the sieve buffer clearing code to handle partial invalidations.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-28 11:03:34 -05:00
Albert Cheng
be04bab58b [svn-r7420] Purpose:
updated.

Description:

Solution:

Platforms tested:

Misc. update:
2003-08-27 10:34:39 -05:00
Albert Cheng
57e38d527c [svn-r7419] Purpose:
bug fix

Description:
h5diff would incur a segmentation fault in Alpha clusters when
the percentage option is used.  This was due to memory aliagment
issue when the options variable is declared as a local variable
in main().

Moved the declaration to a global declaration.

Platforms tested:
"h5committested"
And tested at cluster QT of SNL.

Misc. update:
2003-08-27 10:29:55 -05:00
Quincey Koziol
88218592e6 [svn-r7416] Purpose:
Checkpoint file format revisions.
2003-08-26 15:16:17 -05:00
Quincey Koziol
15e1a2c0c0 [svn-r7413] Purpose:
Bug fix

Description:
    H5Gget_objname_by_idx should allow NULL for the 'name' parameter, to allow
    for querying for the name's length.

Solution:
    Allow NULL for the 'name' parameter, the internal functions were already
    ready to handle that case.

    Clean up RM information about H5Gget_objname_by_idx and
    H5Gget_objtype_by_idx also.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-26 13:37:33 -05:00
Albert Cheng
ff8132d510 [svn-r7409] Purpose:
Bug fix.

Description:
Added MPE color definintions for the Stream-vfd  API.

Platforms tested:
Tested in Copper since MPE only works there.

Misc. update:
2003-08-25 18:00:40 -05:00
Quincey Koziol
c3e81d7168 [svn-r7407] Purpose:
Update release notes with bugfix info.
2003-08-25 15:10:38 -05:00
Quincey Koziol
883fecaff2 [svn-r7405] Purpose:
Bug fix

Description:
    Correct bug creating native versions of "complex" compound datatypes
on certain architectures (Sparc-Solaris) which require stricter alignment.

    Also, correct bug where metadata (padding type, etc.) for strings was
incorrectly dropped.


Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-25 15:08:44 -05:00
Quincey Koziol
398a2db300 [svn-r7403] Purpose:
Bug fix

Description:
    Correct problem with mis-aligned string pointers on certain architectures
(i.e. on modi4) causing a core dump.  The string pointers can be mis-aligned
due to being part of a compound datatype and how our compound type conversion
routines work.

Solution:
    Allocate string with temporary variable and memcpy() the pointer to the
new string into the type conversion buffer, instead of dereferencing the type
conversion buffer directly.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-25 15:05:03 -05:00
Quincey Koziol
9f5fab0f3c [svn-r7400] Purpose:
Update manifest

Description:
    Add new test files for "complex" compound datatype.
2003-08-25 14:59:19 -05:00
Quincey Koziol
3bec117108 [svn-r7399] Purpose:
Code cleanup

Description:
    Remove various "fixtype" routines which duplicate (and actually pre-date)
the functionality in H5Tget_native_type in favor of having the tools call
H5Tget_native_type().  This provides the same functionality (actually better
functionality, since the old "fixtype" routines didn't handle alignment of
compound fields correctly) and reduces the amount of code to maintain.

    Add additional tests to dump out a "complex" compound datatype which
exercises more code in the library for aligning compound fields correctly.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-25 14:57:22 -05:00
HDF Admin
81b8f134f8 [svn-r7394] Purpose:
new feature

Description:
Added a new test option of
    op-snapshot <option>       snapshot option

This allows snapshot.cfg to tell runtest to run snapshot with a
special option.

Platforms tested:
Not h5committest because it is outside of its scope.
Tested by hand.
2003-08-23 13:10:17 -05:00
Quincey Koziol
42b1d300a5 [svn-r7392] Purpose:
Bug fix

Description:
    H5Gget_num_objs, H5Gget_objname_by_idx and H5Gget_objtype_by_idx were
only accepting a group ID, instead of a location ID, as our documentation for
them stated.

Solution:
    Allow them to accept a location ID.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-22 08:54:08 -05:00
Quincey Koziol
bbb546d4de [svn-r7390] Purpose:
Code cleanup

Description:
    Return -1 for failed group iteration instead of 1

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-08-22 08:45:45 -05:00
Quincey Koziol
7646297a82 [svn-r7385] Purpose:
Bug fix

Description:
    Correct a bug which was incrementing the incorrect driver ID of a file
driver and also no saving the correct driver ID for the newly opened file.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    too minor for h5committest
2003-08-20 12:47:48 -05:00
Quincey Koziol
300e95b7d0 [svn-r7382] Purpose:
Bug fix

Description:
    I/O on chunked datasets with a scalar dataspace for the memory dataspace
was not working correctly.

Solution:
    Translate the scalar dataspace into a n-dimensional (where n is the number
of dimensions of the file's dataspace) dataspace of dimensions 1x1x1...

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest (modulo modi4 which is not working correctly)
2003-08-19 07:17:11 -05:00
Quincey Koziol
8efb3398b2 [svn-r7378] Purpose:
Bug fix

Description:
    Linking and unlinking objects with multiple internal and/or trailing '/'s
    was not handled well in the library.

Solution:
    "Normalize" strings by removing trailing '/'s and collapsing multiple
    internal '/'s down into just one '/' before operating on the name.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committested
2003-08-16 13:55:48 -05:00
Quincey Koziol
e9f6bf020a [svn-r7363] Purpose:
Bug fix

Description:
    Allow a user block to be "inserted" in front of a file (probably by
    writing a validly-sized userblock to a new file and then appending another
    HDF5 file to the new file).

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committested
2003-08-14 07:22:01 -05:00
Albert Cheng
f4c7202762 [svn-r7360] Purpose:
New features

Description:
Add options of verbose (-v, -v9) and -fname which limits to
checking file with the file name pattern.

Solution:

Platforms tested:
Did not h5committest which does not cover this command.
Verified it by hand.

Misc. update:
2003-08-13 16:55:05 -05:00
Albert Cheng
0727a47886 [svn-r7357] Purpose:
added formal copyright notice.

Description:

Solution:

Platforms tested:
h5committested

Misc. update:
2003-08-13 09:32:26 -05:00
MuQun Yang
e9cbf18ffb [svn-r7351] Purpose:
update project h5import and activiate h5diff.
Description:
project h5import linked with an old h5import.c file
project h5diff has been activiated.

Solution:
update the project h5import and activate project h5diff.

Platforms tested:
windows 2000

Misc. update:
2003-08-12 11:42:39 -05:00
MuQun Yang
c8a653e397 [svn-r7346] Purpose:
bug fix

Description:
On windows, rindex is not supported. strrchr is used instead.

Solution:

Platforms tested:
linux 2.4, windows 2000
(since the change is minimal and three other platforms have been used to
test for 1.7 branch, so no needs to test more).

Misc. update:
2003-08-11 18:03:28 -05:00
Albert Cheng
5c0b6b9676 [svn-r7345] Purpose:
feature


Description:
Added the checking for Makefile.
Skip checking CVS files.
Printed filename of unknown file types.


Platforms tested:
No h5committest.
Tested by hand on various files.
2003-08-11 16:34:36 -05:00
Albert Cheng
c0e0bacd02 [svn-r7343] Purpose:
Updated, cleanup or added Copyright notice.

Platforms tested:
h5committested
2003-08-11 15:33:49 -05:00
Albert Cheng
6bd2f88477 [svn-r7342] Purpose:
Updated, cleanup or added Copyright notice.

Platforms tested:
"h5committested
2003-08-11 15:33:21 -05:00
Albert Cheng
e5b4e5567b [svn-r7339] Purpose:
updated.

Description:

Solution:

Platforms tested:

Misc. update:
2003-08-11 14:35:41 -05:00
Albert Cheng
407fc805d5 [svn-r7338] Purpose:
No longer needed. make check-install or make check does the
checking now.


Platforms tested:
no h5committest since I am removing a script command that is not
needed any more.


Misc. update:
no need to update doucment since it was an internal command
that was never documented.
2003-08-11 14:25:53 -05:00
HDF Admin
e5ae46c7d1 [svn-r7333] Snapshot version 1.6 release 0 (post1) 2003-08-10 20:57:39 -05:00
MuQun Yang
51aa45fd78 [svn-r7288] Purpose:
Add more contents about szip


Description:
Describe where to find szip and how to turn off szip compression.

Solution:

Platforms tested:

Misc. update:
2003-08-08 12:16:35 -05:00
HDF Admin
eb23557dee [svn-r7281] Snapshot version 1.6 release 0 (post0) 2003-08-03 20:57:07 -05:00
Robert E. McGrath
a880422749 [svn-r7272] Purpose:
Omitted some files in previous checkin.

Description:

Solution:

Platforms tested:

Misc. update:
2003-07-29 09:20:44 -05:00
Robert E. McGrath
26db4f6e01 [svn-r7271] Purpose:
This is the expected result for the fix for bug 888.

It shold have been checked in yesterday.

Description:

Solution:

Platforms tested:

Misc. update:
2003-07-29 09:15:35 -05:00
Robert E. McGrath
610a44a636 [svn-r7267] Purpose:
1. Address Bug 888
2. Update h5dump xml to 1.6

Description:

This is an omnibus update to the h5dump tool.

1. Bug 888: Added '-A', suppress data in dataset, but give values of attr.

2. Many changes to update the XML output.  See:

   http://hdf.ncsa.uiuc.edu/RFC/XMLSchema/

3. The XML dumper tests have been split off.  The standard 'make check'
   no longer runs the XML tests.
   'make check-xml' runs the XML tests manually.  (Some tests
   may fail on some platforms, e.g., on 64bit.)
   'make check-all' runs regular and then xml tests.


Solution:

Platforms tested:
verbena, arabica, copper (64bit)

Misc. update:
MANIFEST updated.
2003-07-28 12:54:31 -05:00
Quincey Koziol
e5f3eae80a [svn-r7261] Purpose:
Checkpoint file format revisions.
2003-07-23 16:36:52 -05:00
Quincey Koziol
d4eb621a16 [svn-r7258] Purpose:
Bug fix

Description:
    I/O on chunked datasets with point selections was not working correctly.

Solution:
    Re-wrote some parts of raw data I/O routines that build the selections for
each chunk to correctly handle point selections.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-07-23 16:12:35 -05:00
Albert Cheng
6ab4d9c1a5 [svn-r7255] Description:
updated for the newly added command chkcopyright.
the files.
2003-07-22 20:37:06 -05:00
cvs2svn
de7460f79c [svn-r7253] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-07-22 20:36:40 -05:00
Albert Cheng
ec6c6f9bc0 [svn-r7250] Purpose:
updated.

Description:

Solution:

Platforms tested:

Misc. update:
2003-07-22 17:57:38 -05:00
Albert Cheng
f80cba321d [svn-r7248] Purpose:
Bug fix

Description:
The "prefix?=..." is not recognized by all make commands.  Even some
older gmake do not recognize it.  The result is that "make install"
failed for many platforms (AIX, Solaris 2.7, HPUX 11, ...) because
when they tried to install at $(prefix)/lib, it becomes /lib since
$(prefix) is not defined.


Solution:
Restore it back to the previous
   prefix=...


Platforms tested:
h5committested.
Also ran in-place build using vendor make in kelgia, arabica
and copper.

Misc. update:
2003-07-22 17:39:43 -05:00
Quincey Koziol
e0c59d75a1 [svn-r7242] Purpose:
Bug fix

Description:
    Fix bug with combination of fill-values, chunked datasets and
variable-length strings.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-07-21 08:50:33 -05:00
MuQun Yang
703c5352ea [svn-r7240] Purpose:
maintenance
Description:
1. H5_SZIP_FILTER was set to 0 orginally. Though it's harmless, make it to be 1 to avoid confusion.
2. Update installhdf5lib.bat to make the windows installation of library easy.

Solution:

Platforms tested:
win2000

Misc. update:
2003-07-17 16:11:21 -05:00
Quincey Koziol
06b7c1a326 [svn-r7234] Purpose:
Bug fix

Description:
    When a non-default indexed storage B-tree internal 'K' value is set by the
user, the chunked datasets created in that file (until it is closed) use the
user's 'K' value and the data can be accessed correctly, but the 'K' value is
not stored in the file.
    However, once the file is closed and re-opened, the non-default 'K' value
is lost and the data in the chunked datasets will not be able to be accessed
correctly.

Solution:
    Store the indexed storage B-tree internal 'K' value in the superblock.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-07-16 09:57:13 -05:00
cvs2svn
c74382063a [svn-r7233] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-07-16 09:57:13 -05:00
Quincey Koziol
01a5c0cf65 [svn-r7232] Purpose:
Bug fix

Description:
    When a non-default indexed storage B-tree internal 'K' value is set by the
user, the chunked datasets created in that file (until it is closed) use the
user's 'K' value and the data can be accessed correctly, but the 'K' value is
not stored in the file.
    However, once the file is closed and re-opened, the non-default 'K' value
is lost and the data in the chunked datasets will not be able to be accessed
correctly.

Solution:
    Store the indexed storage B-tree internal 'K' value in the superblock.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    h5committest
2003-07-16 09:56:58 -05:00
Quincey Koziol
5dd1e76958 [svn-r7230] Purpose:
Update docs

Description:
    Checkpoint file format revisions.
2003-07-16 09:38:42 -05:00
MuQun Yang
ac3f572919 [svn-r7224] Purpose:
update
Description:
The description of an HDF5 application to link with HDF5 library needs to be modified.

Solution:
The szip addition needs to be added.


Platforms tested:
windows 2000

Misc. update:
2003-07-14 14:18:26 -05:00
MuQun Yang
04dc3fb5d3 [svn-r7222] Purpose:
update the all.zip.

Description:
allexample.dsw needs to be updated because of szip addition.

Solution:

Platforms tested:
windows 2000

Misc. update:
2003-07-14 14:09:10 -05:00
Quincey Koziol
20a85b0e23 [svn-r7218] Purpose:
Bug fix

Description:
    H5T_BKG_TEMP was accidentally removed from library code, but is used by
application's datatype conversion routines.

Solution:
    Revert removal of H5T_BKG_TEMP.

Platforms tested:
    h5committest
2003-07-14 11:53:51 -05:00
Quincey Koziol
320499b91c [svn-r7216] Purpose:
Correct information

Description:
    Correct a some information about file creation properties.
2003-07-14 11:50:46 -05:00
Binh-Minh Ribler
4b97a9f491 [svn-r7215] Purpose:
Bug fix

Description:
    Corrected the order of the program files in TEST_SRC from:
	compound.cpp h5group.cpp create.cpp readdata.cpp chunks.cpp    \
	extend_ds.cpp writedata.cpp
    to:
	create.cpp readdata.cpp writedata.cpp compound.cpp extend_ds.cpp \
	chunks.cpp h5group.cpp



Platforms tested:
    I used my h5cppcommittest, a modified version of h5committest.
    It tested only on arabica and verbena, since the change is trivial
    and I need to get Albert's help on the 3rd platform!

Misc. update:
2003-07-12 22:32:44 -05:00
Albert Cheng
8961bd3504 [svn-r7209] Purpose:
updated for new added too bin/buildhdf5.
2003-07-11 09:07:42 -05:00
cvs2svn
7782cc0796 [svn-r7199] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-07-10 12:28:33 -05:00
Quincey Koziol
5474e06434 [svn-r7197] Purpose:
Code cleanup

Description:
    Add version number checking to local heap code.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    too small to need h5committest
2003-07-10 08:13:22 -05:00
Quincey Koziol
3da4c37539 [svn-r7193] Purpose:
Checkpoint work

Description:
    Check in more updates to the file format specification.
2003-07-09 14:20:57 -05:00
HDF Admin
cdee39002d [svn-r7178] Purpose:
Bug fix

Description:
If the base directory (.../snapshot-...) does not exist yet,
the runtest and snapshot will continue on till it bumped into
a "wall".

Solution:
Added verification that the BASEDIR does exist.

Misc. update:
2003-07-07 11:56:39 -05:00
Quincey Koziol
58e0f63a3c [svn-r7176] Purpose:
Bug fix

Description:
    Boot block checksum was being used instead of file driver info checksum
    in one calculation.

    Also, the offset of the file driver info was hard-coded to the end of the
    superblock, instead of using the file driver offset variable.

Solution:
    Changed to use file driver checksum and file driver offset variable.

Platforms tested:
    FreeBSD 4.8 (sleipnir)
    too small for h5committest
2003-07-07 11:40:07 -05:00
Quincey Koziol
7d4bb6efd2 [svn-r7174] Purpose:
Bug fix

Description:
    Fix "unaligned access" warning on IA64 (and alpha, probably) machines.

Solution:
    Make certain that temporary destination buffer is aligned on correct
    boundary for type conversion.

Platforms tested:
    IA64 Linux cluster (titan)
    too small for h5committest
2003-07-07 11:33:13 -05:00
Quincey Koziol
8732e5f0d8 [svn-r7171] Purpose:
Code cleanup

Description:
    Remove "UNUSED" keyword from function prototypes in header files.

Platforms tested:
    IA64 Linux cluster (titan)
    too small to need commit test
2003-07-07 11:19:54 -05:00
HDF Admin
ed5f7c7766 [svn-r7170] Purpose:
updated it to version 1.6
No h5committest since this is for daily test only.
2003-07-05 20:41:36 -05:00
Elena Pourmal
89c91494e6 [svn-r7169] Purpose: Maintenance after 1.6.0 release
Description: Run bin/h5vers script to change version to 1.6.0-post0
             after creating release tar ball and tagging the release.
             Modified HISTORY.txt and RELEASE.txt for
             1.6.0-post0
             1.6 branch is open for checking in source code.

Solution:

Platforms tested:

Misc. update:
2003-07-03 16:38:32 -05:00
Elena Pourmal
71a10a7184 [svn-r7167] Purpose: Maintenance before tagging the release
Description: I created released tar ball with bin/release; now I am commiting
             files that were updated by the script before tagging the release.

Solution:

Platforms tested:

Misc. update:
2003-07-03 16:25:10 -05:00
Elena Pourmal
bdd10b09c6 [svn-r7165] Purpose: Maintenance for 1.6.0 release
Description: Changed version number to be 1.6.0 with empty substring
             for the release

Solution: Used bin/h5vers -s 1.6.0 to update all necessary files.

Platforms tested: verbena

Misc. update:
2003-07-03 16:18:14 -05:00
cvs2svn
a059ebeab6 [svn-r7164] This commit was manufactured by cvs2svn to create branch 'hdf5_1_6'. 2003-07-03 16:18:14 -05:00
1065 changed files with 210814 additions and 78525 deletions

View File

@@ -2,7 +2,7 @@ Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF)
Software Library and Utilities
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998, 1999, 2000, 2001, 2002, 2003 by the Board of Trustees
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the Board of Trustees
of the University of Illinois. All rights reserved.
Contributors: National Center for Supercomputing Applications (NCSA) at the

447
MANIFEST
View File

@@ -16,8 +16,10 @@
./configure
./configure.in
./bin/buildhdf5
./bin/checkapi _DO_NOT_DISTRIBUTE_
./bin/checkposix _DO_NOT_DISTRIBUTE_
./bin/chkcopyright _DO_NOT_DISTRIBUTE_
./bin/chkmanifest
./bin/config.guess
./bin/config.sub
@@ -25,7 +27,7 @@
./bin/debug-ohdr _DO_NOT_DISTRIBUTE_
./bin/dependencies
./bin/distdep
./bin/errors _DO_NOT_DISTRIBUTE_
./bin/errors _DO_NOT_DISTRIBUTE_
./bin/h5vers
./bin/install-sh
./bin/iostats
@@ -63,6 +65,7 @@
./config/linux-gnuaout
./config/linux-gnulibc1
./config/linux-gnulibc2
./config/powerpc-apple
./config/powerpc-ibm-aix4.x
./config/powerpc-ibm-aix5.x
./config/rs6000-ibm-aix4.x
@@ -132,6 +135,8 @@
./doc/html/MountingFiles.html
./doc/html/NCSAfooterlogo.gif
./doc/html/ObjectHeader.txt _DO_NOT_DISTRIBUTE_
./doc/html/PDF_RM_body.book _DO_NOT_DISTRIBUTE_
./doc/html/PDF_RM_front.book _DO_NOT_DISTRIBUTE_
./doc/html/Performance.html
./doc/html/PredefDTypes.html
./doc/html/Properties.html
@@ -149,6 +154,8 @@
./doc/html/RM_H5S.html
./doc/html/RM_H5T.html
./doc/html/RM_H5Z.html
./doc/html/RM_Title.html _DO_NOT_DISTRIBUTE_
./doc/html/RM_TOC.html _DO_NOT_DISTRIBUTE_
./doc/html/Tools.html
./doc/html/Version.html
./doc/html/chunk1.gif
@@ -189,6 +196,7 @@
./doc/html/TechNotes.html
./doc/html/TechNotes/shuffling-algorithm-report.pdf
./doc/html/TechNotes/Basic_perform.html
./doc/html/TechNotes/BigDataSmMach.html
./doc/html/TechNotes/ChStudy_1000x1000.gif
./doc/html/TechNotes/ChStudy_250x250.gif
@@ -213,6 +221,7 @@
./doc/html/TechNotes/NamingScheme.html
./doc/html/TechNotes/ObjectHeader.html
./doc/html/TechNotes/RawDStorage.html
./doc/html/TechNotes/ReservedFileSpace.html
./doc/html/TechNotes/SWControls.html
./doc/html/TechNotes/SymbolTables.html
./doc/html/TechNotes/TestReview.html
@@ -400,6 +409,237 @@
./doc/html/cpplus/Dependencies
./doc/html/cpplus/Makefile.in
./doc/html/cpplus_RM/Dependencies
./doc/html/cpplus_RM/Makefile.in
./doc/html/cpplus_RM/H5AbstractDs_8cpp.html
./doc/html/cpplus_RM/H5AbstractDs_8h-source.html
./doc/html/cpplus_RM/H5AbstractDs_8h.html
./doc/html/cpplus_RM/H5Alltypes_8h-source.html
./doc/html/cpplus_RM/H5Alltypes_8h.html
./doc/html/cpplus_RM/H5AtomType_8cpp.html
./doc/html/cpplus_RM/H5AtomType_8h-source.html
./doc/html/cpplus_RM/H5AtomType_8h.html
./doc/html/cpplus_RM/H5Attribute_8cpp.html
./doc/html/cpplus_RM/H5Attribute_8h-source.html
./doc/html/cpplus_RM/H5Attribute_8h.html
./doc/html/cpplus_RM/H5Classes_8h-source.html
./doc/html/cpplus_RM/H5Classes_8h.html
./doc/html/cpplus_RM/H5CommonFG_8cpp.html
./doc/html/cpplus_RM/H5CommonFG_8h-source.html
./doc/html/cpplus_RM/H5CommonFG_8h.html
./doc/html/cpplus_RM/H5CompType_8cpp.html
./doc/html/cpplus_RM/H5CompType_8h-source.html
./doc/html/cpplus_RM/H5CompType_8h.html
./doc/html/cpplus_RM/H5CppDoc_8h-source.html
./doc/html/cpplus_RM/H5CppDoc_8h.html
./doc/html/cpplus_RM/H5Cpp_8h-source.html
./doc/html/cpplus_RM/H5Cpp_8h.html
./doc/html/cpplus_RM/H5DataSet_8cpp.html
./doc/html/cpplus_RM/H5DataSet_8h-source.html
./doc/html/cpplus_RM/H5DataSet_8h.html
./doc/html/cpplus_RM/H5DataSpace_8cpp.html
./doc/html/cpplus_RM/H5DataSpace_8h-source.html
./doc/html/cpplus_RM/H5DataSpace_8h.html
./doc/html/cpplus_RM/H5DataType_8cpp.html
./doc/html/cpplus_RM/H5DataType_8h-source.html
./doc/html/cpplus_RM/H5DataType_8h.html
./doc/html/cpplus_RM/H5DcreatProp_8cpp.html
./doc/html/cpplus_RM/H5DcreatProp_8h-source.html
./doc/html/cpplus_RM/H5DcreatProp_8h.html
./doc/html/cpplus_RM/H5DxferProp_8cpp.html
./doc/html/cpplus_RM/H5DxferProp_8h-source.html
./doc/html/cpplus_RM/H5DxferProp_8h.html
./doc/html/cpplus_RM/H5EnumType_8cpp.html
./doc/html/cpplus_RM/H5EnumType_8h-source.html
./doc/html/cpplus_RM/H5EnumType_8h.html
./doc/html/cpplus_RM/H5Exception_8cpp.html
./doc/html/cpplus_RM/H5Exception_8h-source.html
./doc/html/cpplus_RM/H5Exception_8h.html
./doc/html/cpplus_RM/H5FaccProp_8cpp.html
./doc/html/cpplus_RM/H5FaccProp_8h-source.html
./doc/html/cpplus_RM/H5FaccProp_8h.html
./doc/html/cpplus_RM/H5FcreatProp_8cpp.html
./doc/html/cpplus_RM/H5FcreatProp_8h-source.html
./doc/html/cpplus_RM/H5FcreatProp_8h.html
./doc/html/cpplus_RM/H5File_8cpp.html
./doc/html/cpplus_RM/H5File_8h-source.html
./doc/html/cpplus_RM/H5File_8h.html
./doc/html/cpplus_RM/H5FloatType_8cpp.html
./doc/html/cpplus_RM/H5FloatType_8h-source.html
./doc/html/cpplus_RM/H5FloatType_8h.html
./doc/html/cpplus_RM/H5Group_8cpp.html
./doc/html/cpplus_RM/H5Group_8h-source.html
./doc/html/cpplus_RM/H5Group_8h.html
./doc/html/cpplus_RM/H5IdComponent_8cpp.html
./doc/html/cpplus_RM/H5IdComponent_8h-source.html
./doc/html/cpplus_RM/H5IdComponent_8h.html
./doc/html/cpplus_RM/H5Idtemplates_8h-source.html
./doc/html/cpplus_RM/H5Idtemplates_8h.html
./doc/html/cpplus_RM/H5Include_8h-source.html
./doc/html/cpplus_RM/H5Include_8h.html
./doc/html/cpplus_RM/H5IntType_8cpp.html
./doc/html/cpplus_RM/H5IntType_8h-source.html
./doc/html/cpplus_RM/H5IntType_8h.html
./doc/html/cpplus_RM/H5Library_8cpp.html
./doc/html/cpplus_RM/H5Library_8h-source.html
./doc/html/cpplus_RM/H5Library_8h.html
./doc/html/cpplus_RM/H5Object_8cpp.html
./doc/html/cpplus_RM/H5Object_8h-source.html
./doc/html/cpplus_RM/H5Object_8h.html
./doc/html/cpplus_RM/H5PredType_8cpp.html
./doc/html/cpplus_RM/H5PredType_8h-source.html
./doc/html/cpplus_RM/H5PredType_8h.html
./doc/html/cpplus_RM/H5PropList_8cpp.html
./doc/html/cpplus_RM/H5PropList_8h-source.html
./doc/html/cpplus_RM/H5PropList_8h.html
./doc/html/cpplus_RM/H5RefCounter_8cpp.html
./doc/html/cpplus_RM/H5RefCounter_8h-source.html
./doc/html/cpplus_RM/H5RefCounter_8h.html
./doc/html/cpplus_RM/H5StrType_8cpp.html
./doc/html/cpplus_RM/H5StrType_8h-source.html
./doc/html/cpplus_RM/H5StrType_8h.html
./doc/html/cpplus_RM/NCSAlogo.jpg
./doc/html/cpplus_RM/annotated.html
./doc/html/cpplus_RM/classH5_1_1AbstractDs-members.html
./doc/html/cpplus_RM/classH5_1_1AbstractDs.html
./doc/html/cpplus_RM/classH5_1_1AbstractDs.png
./doc/html/cpplus_RM/classH5_1_1AtomType-members.html
./doc/html/cpplus_RM/classH5_1_1AtomType.html
./doc/html/cpplus_RM/classH5_1_1AtomType.png
./doc/html/cpplus_RM/classH5_1_1Attribute-members.html
./doc/html/cpplus_RM/classH5_1_1Attribute.html
./doc/html/cpplus_RM/classH5_1_1Attribute.png
./doc/html/cpplus_RM/classH5_1_1AttributeIException-members.html
./doc/html/cpplus_RM/classH5_1_1AttributeIException.html
./doc/html/cpplus_RM/classH5_1_1AttributeIException.png
./doc/html/cpplus_RM/classH5_1_1CommonFG-members.html
./doc/html/cpplus_RM/classH5_1_1CommonFG.html
./doc/html/cpplus_RM/classH5_1_1CommonFG.png
./doc/html/cpplus_RM/classH5_1_1CompType-members.html
./doc/html/cpplus_RM/classH5_1_1CompType.html
./doc/html/cpplus_RM/classH5_1_1CompType.png
./doc/html/cpplus_RM/classH5_1_1DSetCreatPropList-members.html
./doc/html/cpplus_RM/classH5_1_1DSetCreatPropList.html
./doc/html/cpplus_RM/classH5_1_1DSetCreatPropList.png
./doc/html/cpplus_RM/classH5_1_1DSetMemXferPropList-members.html
./doc/html/cpplus_RM/classH5_1_1DSetMemXferPropList.html
./doc/html/cpplus_RM/classH5_1_1DSetMemXferPropList.png
./doc/html/cpplus_RM/classH5_1_1DataSet-members.html
./doc/html/cpplus_RM/classH5_1_1DataSet.html
./doc/html/cpplus_RM/classH5_1_1DataSet.png
./doc/html/cpplus_RM/classH5_1_1DataSetIException-members.html
./doc/html/cpplus_RM/classH5_1_1DataSetIException.html
./doc/html/cpplus_RM/classH5_1_1DataSetIException.png
./doc/html/cpplus_RM/classH5_1_1DataSpace-members.html
./doc/html/cpplus_RM/classH5_1_1DataSpace.html
./doc/html/cpplus_RM/classH5_1_1DataSpace.png
./doc/html/cpplus_RM/classH5_1_1DataSpaceIException-members.html
./doc/html/cpplus_RM/classH5_1_1DataSpaceIException.html
./doc/html/cpplus_RM/classH5_1_1DataSpaceIException.png
./doc/html/cpplus_RM/classH5_1_1DataType-members.html
./doc/html/cpplus_RM/classH5_1_1DataType.html
./doc/html/cpplus_RM/classH5_1_1DataType.png
./doc/html/cpplus_RM/classH5_1_1DataTypeIException-members.html
./doc/html/cpplus_RM/classH5_1_1DataTypeIException.html
./doc/html/cpplus_RM/classH5_1_1DataTypeIException.png
./doc/html/cpplus_RM/classH5_1_1EnumType-members.html
./doc/html/cpplus_RM/classH5_1_1EnumType.html
./doc/html/cpplus_RM/classH5_1_1EnumType.png
./doc/html/cpplus_RM/classH5_1_1Exception-members.html
./doc/html/cpplus_RM/classH5_1_1Exception.html
./doc/html/cpplus_RM/classH5_1_1Exception.png
./doc/html/cpplus_RM/classH5_1_1FileAccPropList-members.html
./doc/html/cpplus_RM/classH5_1_1FileAccPropList.html
./doc/html/cpplus_RM/classH5_1_1FileAccPropList.png
./doc/html/cpplus_RM/classH5_1_1FileCreatPropList-members.html
./doc/html/cpplus_RM/classH5_1_1FileCreatPropList.html
./doc/html/cpplus_RM/classH5_1_1FileCreatPropList.png
./doc/html/cpplus_RM/classH5_1_1FileIException-members.html
./doc/html/cpplus_RM/classH5_1_1FileIException.html
./doc/html/cpplus_RM/classH5_1_1FileIException.png
./doc/html/cpplus_RM/classH5_1_1FloatType-members.html
./doc/html/cpplus_RM/classH5_1_1FloatType.html
./doc/html/cpplus_RM/classH5_1_1FloatType.png
./doc/html/cpplus_RM/classH5_1_1Group-members.html
./doc/html/cpplus_RM/classH5_1_1Group.html
./doc/html/cpplus_RM/classH5_1_1Group.png
./doc/html/cpplus_RM/classH5_1_1GroupIException-members.html
./doc/html/cpplus_RM/classH5_1_1GroupIException.html
./doc/html/cpplus_RM/classH5_1_1GroupIException.png
./doc/html/cpplus_RM/classH5_1_1H5File-members.html
./doc/html/cpplus_RM/classH5_1_1H5File.html
./doc/html/cpplus_RM/classH5_1_1H5File.png
./doc/html/cpplus_RM/classH5_1_1H5Library-members.html
./doc/html/cpplus_RM/classH5_1_1H5Library.html
./doc/html/cpplus_RM/classH5_1_1H5Object-members.html
./doc/html/cpplus_RM/classH5_1_1H5Object.html
./doc/html/cpplus_RM/classH5_1_1H5Object.png
./doc/html/cpplus_RM/classH5_1_1IdComponent-members.html
./doc/html/cpplus_RM/classH5_1_1IdComponent.html
./doc/html/cpplus_RM/classH5_1_1IdComponent.png
./doc/html/cpplus_RM/classH5_1_1IdComponentException-members.html
./doc/html/cpplus_RM/classH5_1_1IdComponentException.html
./doc/html/cpplus_RM/classH5_1_1IdComponentException.png
./doc/html/cpplus_RM/classH5_1_1IntType-members.html
./doc/html/cpplus_RM/classH5_1_1IntType.html
./doc/html/cpplus_RM/classH5_1_1IntType.png
./doc/html/cpplus_RM/classH5_1_1LibraryIException-members.html
./doc/html/cpplus_RM/classH5_1_1LibraryIException.html
./doc/html/cpplus_RM/classH5_1_1LibraryIException.png
./doc/html/cpplus_RM/classH5_1_1PredType-members.html
./doc/html/cpplus_RM/classH5_1_1PredType.html
./doc/html/cpplus_RM/classH5_1_1PredType.png
./doc/html/cpplus_RM/classH5_1_1PropList-members.html
./doc/html/cpplus_RM/classH5_1_1PropList.html
./doc/html/cpplus_RM/classH5_1_1PropList.png
./doc/html/cpplus_RM/classH5_1_1PropListIException-members.html
./doc/html/cpplus_RM/classH5_1_1PropListIException.html
./doc/html/cpplus_RM/classH5_1_1PropListIException.png
./doc/html/cpplus_RM/classH5_1_1RefCounter-members.html
./doc/html/cpplus_RM/classH5_1_1RefCounter.html
./doc/html/cpplus_RM/classH5_1_1RefCounter_1_1RefCounter.html
./doc/html/cpplus_RM/classH5_1_1RefCounter_1_1abc.html
./doc/html/cpplus_RM/classH5_1_1ReferenceException-members.html
./doc/html/cpplus_RM/classH5_1_1ReferenceException.html
./doc/html/cpplus_RM/classH5_1_1ReferenceException.png
./doc/html/cpplus_RM/classH5_1_1StrType-members.html
./doc/html/cpplus_RM/classH5_1_1StrType.html
./doc/html/cpplus_RM/classH5_1_1StrType.png
./doc/html/cpplus_RM/classH5_1_1UserData4Aiterate-members.html
./doc/html/cpplus_RM/classH5_1_1UserData4Aiterate.html
./doc/html/cpplus_RM/create_8cpp-example.html
./doc/html/cpplus_RM/doxygen.css
./doc/html/cpplus_RM/doxygen.png
./doc/html/cpplus_RM/dsets_8cpp-example.html
./doc/html/cpplus_RM/examples.html
./doc/html/cpplus_RM/files.html
./doc/html/cpplus_RM/functions.html
./doc/html/cpplus_RM/functions_func.html
./doc/html/cpplus_RM/functions_vars.html
./doc/html/cpplus_RM/globals.html
./doc/html/cpplus_RM/globals_defs.html
./doc/html/cpplus_RM/globals_func.html
./doc/html/cpplus_RM/globals_type.html
./doc/html/cpplus_RM/globals_vars.html
./doc/html/cpplus_RM/header.html
./doc/html/cpplus_RM/hierarchy.html
./doc/html/cpplus_RM/index.html
./doc/html/cpplus_RM/namespaceH5.html
./doc/html/cpplus_RM/namespacemembers.html
./doc/html/cpplus_RM/namespacemembers_func.html
./doc/html/cpplus_RM/namespacemembers_type.html
./doc/html/cpplus_RM/namespacemembers_vars.html
./doc/html/cpplus_RM/namespaces.html
./doc/html/cpplus_RM/namespacestd.html
./doc/html/cpplus_RM/writedata_8cpp-example.html
./doc/html/cpplus_RM/header_files/Dependencies
./doc/html/cpplus_RM/header_files/Makefile.in
./doc/html/cpplus_RM/header_files/filelist.xml
./doc/html/cpplus_RM/header_files/filelist.xml
./doc/html/cpplus_RM/header_files/image001.jpg
./doc/html/cpplus_RM/header_files/image002.jpg
./doc/html/ed_libs/Dependencies
./doc/html/ed_libs/Footer.lbi
./doc/html/ed_libs/Makefile.in
@@ -435,18 +675,6 @@
./doc/html/fortran/F90Flags.html
./doc/html/fortran/F90UserNotes.html
./doc/html/fortran/Makefile.in
./doc/html/fortran/h5_FORTRAN.html
./doc/html/fortran/h5a_FORTRAN.html
./doc/html/fortran/h5d_FORTRAN.html
./doc/html/fortran/h5e_FORTRAN.html
./doc/html/fortran/h5f_FORTRAN.html
./doc/html/fortran/h5g_FORTRAN.html
./doc/html/fortran/h5i_FORTRAN.html
./doc/html/fortran/h5p_FORTRAN.html
./doc/html/fortran/h5r_FORTRAN.html
./doc/html/fortran/h5s_FORTRAN.html
./doc/html/fortran/h5t_FORTRAN.html
./doc/html/fortran/h5z_FORTRAN.html
./doc/html/group_p1.gif
./doc/html/group_p1.obj _DO_NOT_DISTRIBUTE_
@@ -556,6 +784,7 @@
./fortran/config/linux-gnuaout
./fortran/config/linux-gnulibc1
./fortran/config/linux-gnulibc2
./fortran/config/powerpc-apple
./fortran/config/powerpc-ibm-aix4.x
./fortran/config/powerpc-ibm-aix5.x
./fortran/config/rs6000-ibm-aix4.x
@@ -582,7 +811,6 @@
./fortran/examples/mountexample.f90
./fortran/examples/refobjexample.f90
./fortran/examples/refregexample.f90
./fortran/examples/run_examples.sh
./fortran/examples/rwdsetexample.f90
./fortran/examples/selectele.f90
@@ -678,30 +906,27 @@
./c++/config/BlankForm
./c++/config/commence.in
./c++/config/conclude.in
./c++/config/dec-osf5.x
./c++/config/depend1.in
./c++/config/depend2.in
./c++/config/depend3.in
./c++/config/depend4.in
./c++/config/dependN.in
./c++/config/freebsd
./c++/config/hpux11.00
./c++/config/ia64-linux-gnu
./c++/config/irix6.x
./c++/config/linux-gnu
./c++/config/linux-gnulibc1
./c++/config/linux-gnulibc2
./c++/config/powerpc-ibm-aix
./c++/config/rs6000-ibm-aix4.x
./c++/config/solaris2.x
./c++/config/irix6.x
./c++/config/sv1-cray
./c++/config/unicos10.0.X
./c++/config/unicosmk2.0.6.X
./c++/examples/Dependencies
./c++/examples/Attributes.h5
./c++/examples/Group.h5
./c++/examples/SDS.h5
./c++/examples/SDScompound.h5
./c++/examples/SDSextendible.h5
./c++/examples/Select.h5
./c++/examples/chunks.cpp
./c++/examples/compound.cpp
./c++/examples/create.cpp
@@ -717,6 +942,8 @@
./c++/src/H5AbstractDs.cpp
./c++/src/H5AbstractDs.h
./c++/src/H5Alltypes.h
./c++/src/H5ArrayType.cpp
./c++/src/H5ArrayType.h
./c++/src/H5AtomType.cpp
./c++/src/H5AtomType.h
./c++/src/H5Attribute.cpp
@@ -727,6 +954,7 @@
./c++/src/H5CompType.cpp
./c++/src/H5CompType.h
./c++/src/H5Cpp.h
./c++/src/H5CppDoc.h
./c++/src/H5DataSet.cpp
./c++/src/H5DataSet.h
./c++/src/H5DataSpace.cpp
@@ -769,8 +997,15 @@
./c++/src/H5RefCounter.h
./c++/src/H5StrType.cpp
./c++/src/H5StrType.h
./c++/src/H5VarLenType.cpp
./c++/src/H5VarLenType.h
./c++/src/Makefile.in
./c++/src/cpp_doc_config
./c++/src/h5c++.in
./c++/src/header.html
./c++/src/header_files/filelist.xml
./c++/src/header_files/image001.jpg
./c++/src/header_files/image002.jpg
./c++/test/Dependencies
./c++/test/Makefile.in
@@ -812,6 +1047,7 @@
./perform/mpi-perf.c
./perform/overhead.c
./perform/perf.c
./perform/perf_meta.c
./perform/pio_engine.c
./perform/pio_perf.c
./perform/pio_perf.h
@@ -824,8 +1060,8 @@
./release_docs/INSTALL_VFL
./release_docs/INSTALL_parallel
./release_docs/INSTALL_Windows.txt
./release_docs/INSTALL_Windows_withF90.txt
./release_docs/INSTALL_Windows_withcpp.txt
./release_docs/INSTALL_Windows_From_Command_Line.txt
./release_docs/INSTALL_Windows_Short.txt
./release_docs/INSTALL_codewarrior.txt
./release_docs/HISTORY.txt
./release_docs/RELEASE.txt
@@ -846,32 +1082,34 @@
./src/H5Bprivate.h
./src/H5Bpublic.h
./src/H5D.c
./src/H5Dcontig.c
./src/H5Dcompact.c
./src/H5Dio.c
./src/H5Distore.c
./src/H5Dmpio.c
./src/H5Dprivate.h
./src/H5Dpublic.h
./src/H5Dpkg.h
./src/H5Dseq.c
./src/H5Dtest.c
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
./src/H5F.c
./src/H5Fcontig.c
./src/H5Fcompact.c
./src/H5Fistore.c
./src/H5Fpkg.h
./src/H5Fprivate.h
./src/H5Fpublic.h
./src/H5Fseq.c
./src/H5FD.c
./src/H5FDcore.c
./src/H5FDcore.h
./src/H5FDfamily.c
./src/H5FDfamily.h
./src/H5FDfphdf5.c
./src/H5FDfphdf5.h
./src/H5FDgass.c
./src/H5FDgass.h
./src/H5FDlog.c
./src/H5FDlog.h
./src/H5FDmpi.c
./src/H5FDmpi.h
./src/H5FDmpio.c
./src/H5FDmpio.h
./src/H5FDmpiposix.c
@@ -892,11 +1130,6 @@
./src/H5FLprivate.h
./src/H5FO.c
./src/H5FOprivate.h
./src/H5FP.c
./src/H5FPclient.c
./src/H5FPprivate.h
./src/H5FPpublic.h
./src/H5FPserver.c
./src/H5FS.c
./src/H5FSprivate.h
./src/H5G.c
@@ -954,6 +1187,8 @@
./src/H5R.c
./src/H5Rprivate.h
./src/H5Rpublic.h
./src/H5RC.c
./src/H5RCprivate.h
./src/H5RS.c
./src/H5RSprivate.h
./src/H5S.c
@@ -1026,6 +1261,7 @@
./test/extend.c
./test/external.c
./test/file_handle.c
./test/filename.c
./test/fill_old.h5
./test/fillval.c
./test/flush1.c
@@ -1043,15 +1279,20 @@
./test/links.c
./test/mount.c
./test/mtime.c
./test/noencoder.h5
./test/ntypes.c
./test/ohdr.c
./test/reserved.c
./test/space_overflow.c _DO_NOT_DISTRIBUTE_
./test/gen_deflate.c _DO_NOT_DISTRIBUTE_
./test/gen_old_array.c _DO_NOT_DISTRIBUTE_
./test/gen_new_array.c _DO_NOT_DISTRIBUTE_
./test/gen_new_fill.c _DO_NOT_DISTRIBUTE_
./test/gen_old_layout.c _DO_NOT_DISTRIBUTE_
./test/gen_old_mtime.c _DO_NOT_DISTRIBUTE_
./test/gen_new_mtime.c _DO_NOT_DISTRIBUTE_
./test/gen_new_super.c _DO_NOT_DISTRIBUTE_
./test/gen_nullspace.c _DO_NOT_DISTRIBUTE_
./test/set_extent.c
./test/srb_append.c
./test/srb_read.c
@@ -1063,6 +1304,7 @@
./test/tattr.c
./test/tbogus.h5
./test/tconfig.c
./test/testframe.c
./test/testhdf5.c
./test/testhdf5.h
./test/testmeta.c
@@ -1072,10 +1314,12 @@
./test/th5s.h5
./test/theap.c
./test/titerate.c
./test/tlayouto.h5
./test/tmeta.c
./test/tmisc.c
./test/tmtimen.h5
./test/tmtimeo.h5
./test/tnullspace.h5
./test/ttime.c
./test/trefer.c
./test/trefstr.c
@@ -1091,15 +1335,18 @@
./test/tvlstr.c
./test/tvltypes.c
./test/unlink.c
./test/test_filters_be.hdf5
./test/test_filters_le.hdf5
./testpar/Dependencies
./testpar/Makefile.in
./testpar/t_dset.c
./testpar/t_file.c
./testpar/t_fphdf5.c
./testpar/t_mdset.c
./testpar/t_mpi.c
./testpar/t_ph5basic.c
./testpar/t_coll_chunk.c
./testpar/testphdf5.c
./testpar/testphdf5.h
./testpar/testph5.sh.in
@@ -1124,7 +1371,8 @@
./tools/h5dump/h5dump.c
./tools/h5dump/h5dump.h
./tools/h5dump/h5dumpgentest.c
./tools/h5dump/testh5dump.sh
./tools/h5dump/testh5dump.sh.in
./tools/h5dump/testh5dumpxml.sh
./tools/h5import/Dependencies
./tools/h5import/Makefile.in
@@ -1165,12 +1413,37 @@
./tools/h5diff/Dependencies
./tools/h5diff/Makefile.in
./tools/h5diff/h5diff.c
./tools/h5diff/h5trav.c
./tools/h5diff/h5trav.h
./tools/h5diff/h5difftst.c
./tools/h5diff/h5diff_main.c
./tools/h5diff/testh5diff_attr.c
./tools/h5diff/testh5diff_basic.c
./tools/h5diff/testh5diff_dset.c
./tools/h5diff/testh5diff_main.c
./tools/h5diff/testh5diff_util.c
./tools/h5diff/testh5diff.h
./tools/h5diff/testh5diff.sh
# h5repack sources
./tools/h5repack/Dependencies
./tools/h5repack/Makefile.in
./tools/h5repack/h5repack.sh.in
./tools/h5repack/h5repack.c
./tools/h5repack/h5repack.h
./tools/h5repack/h5repack_copy.c
./tools/h5repack/h5repack_filters.c
./tools/h5repack/h5repack_layout.c
./tools/h5repack/h5repack_list.c
./tools/h5repack/h5repack_main.c
./tools/h5repack/h5repack_opttable.c
./tools/h5repack/h5repack_parse.c
./tools/h5repack/h5repack_refs.c
./tools/h5repack/h5repack_verify.c
./tools/h5repack/testh5repack_attr.c
./tools/h5repack/testh5repack_dset.c
./tools/h5repack/testh5repack_main.c
./tools/h5repack/testh5repack_make.c
./tools/h5repack/testh5repack_util.c
./tools/h5ls/Dependencies
./tools/h5ls/Makefile.in
./tools/h5ls/h5ls.c
@@ -1178,18 +1451,29 @@
./tools/lib/Dependencies
./tools/lib/Makefile.in
./tools/lib/h5diff.c
./tools/lib/h5diff.h
./tools/lib/h5diff_array.c
./tools/lib/h5diff_attr.c
./tools/lib/h5diff_dset.c
./tools/lib/h5diff_util.c
./tools/lib/h5trav.c
./tools/lib/h5trav.h
./tools/lib/h5trav_table.c
./tools/lib/h5tools.c
./tools/lib/h5tools.h
./tools/lib/h5tools_filters.c
./tools/lib/h5tools_str.c
./tools/lib/h5tools_str.h
./tools/lib/h5tools_utils.c
./tools/lib/h5tools_utils.h
./tools/lib/h5tools_ref.c
./tools/lib/h5tools_ref.h
./tools/lib/talign.c
./tools/misc/Dependencies
./tools/misc/Makefile.in
./tools/misc/h5cc.in
./tools/misc/h5createU8.c
./tools/misc/h5debug.c
./tools/misc/h5import.c
./tools/misc/h5redeploy.in
@@ -1228,8 +1512,10 @@
./tools/testfiles/tcomp-1.ddl
./tools/testfiles/tcomp-2.ddl
./tools/testfiles/tcomp-3.ddl
./tools/testfiles/tcomp-4.ddl
./tools/testfiles/tcompound.h5
./tools/testfiles/tcompound2.h5
./tools/testfiles/tcompound_complex.h5
./tools/testfiles/tdatareg.h5
./tools/testfiles/tdatareg.ddl
./tools/testfiles/tdset-1.ddl
@@ -1307,9 +1593,46 @@
./tools/testfiles/tvldtypes3.h5
./tools/testfiles/tvldtypes4.ddl
./tools/testfiles/tvldtypes4.h5
./tools/testfiles/tvldtypes5.ddl
./tools/testfiles/tvldtypes5.h5
./tools/testfiles/tvlstr.h5
./tools/testfiles/tvlstr.ddl
./tools/testfiles/tattr2.h5
./tools/testfiles/tall-2A.ddl
./tools/testfiles/tcontents.ddl
./tools/testfiles/tfilters.h5
./tools/testfiles/tchunked.ddl
./tools/testfiles/tcompact.ddl
./tools/testfiles/tcontiguos.ddl
./tools/testfiles/tdeflate.ddl
./tools/testfiles/texternal.ddl
./tools/testfiles/tfletcher32.ddl
./tools/testfiles/treference.ddl
./tools/testfiles/tshuffle.ddl
./tools/testfiles/tstring.ddl
./tools/testfiles/tszip.ddl
./tools/testfiles/tuserfilter.ddl
./tools/testfiles/tallfilters.ddl
./tools/testfiles/tstringe.ddl
./tools/testfiles/tindicesyes.ddl
./tools/testfiles/tindicesno.ddl
./tools/testfiles/tfcontents1.h5
./tools/testfiles/tfcontents2.h5
./tools/testfiles/tboot1.ddl
./tools/testfiles/tboot2.ddl
./tools/testfiles/tperror.ddl
./tools/testfiles/tfill.ddl
./tools/testfiles/tfvalues.h5
./tools/testfiles/tstring2.ddl
./tools/testfiles/tstr3.h5
./tools/testfiles/taindices.h5
./tools/testfiles/test_all.h5
./tools/testfiles/test_deflate.h5
./tools/testfiles/test_fletcher32.h5
./tools/testfiles/test_shuffle.h5
./tools/testfiles/test_szip.h5
# Expected output from h5ls tests
./tools/testfiles/help-1.ls
@@ -1340,6 +1663,7 @@
./tools/testfiles/tbitfields.h5.xml
./tools/testfiles/tcompound.h5.xml
./tools/testfiles/tcompound2.h5.xml
./tools/testfiles/tcompound_complex.h5.xml
./tools/testfiles/tdatareg.h5.xml
./tools/testfiles/tdset.h5.xml
./tools/testfiles/tdset2.h5.xml
@@ -1362,6 +1686,9 @@
./tools/testfiles/tname-quot.h5.xml
./tools/testfiles/tname-sp.h5
./tools/testfiles/tname-sp.h5.xml
./tools/testfiles/tnamed_dtype_attr.ddl
./tools/testfiles/tnamed_dtype_attr.h5
./tools/testfiles/tnamed_dtype_attr.h5.xml
./tools/testfiles/tnestedcomp.h5.xml
./tools/testfiles/tnodata.h5
./tools/testfiles/tnodata.h5.xml
@@ -1384,7 +1711,18 @@
./tools/testfiles/tvldtypes1.h5.xml
./tools/testfiles/tvldtypes2.h5.xml
./tools/testfiles/tvldtypes3.h5.xml
./tools/testfiles/tvldtypes4.h5.xml
./tools/testfiles/tvldtypes5.h5.xml
./tools/testfiles/tvlstr.h5.xml
./tools/testfiles/tempty-dtd.h5.xml
./tools/testfiles/tempty-dtd-uri.h5.xml
./tools/testfiles/tempty-nons.h5.xml
./tools/testfiles/tempty-nons-uri.h5.xml
./tools/testfiles/tempty-ns.h5.xml
./tools/testfiles/tempty-dtd-2.h5.xml
./tools/testfiles/tempty-nons-2.h5.xml
./tools/testfiles/tempty-ns-2.h5.xml
./tools/testfiles/tall-2A.h5.xml
#test files for h5diff
./tools/testfiles/file1.h5
@@ -1393,6 +1731,8 @@
./tools/testfiles/file4.h5
./tools/testfiles/file5.h5
./tools/testfiles/file6.h5
./tools/testfiles/file7.h5
./tools/testfiles/file8.h5
./tools/testfiles/h5diff_10.txt
./tools/testfiles/h5diff_11.txt
./tools/testfiles/h5diff_12.txt
@@ -1400,24 +1740,14 @@
./tools/testfiles/h5diff_14.txt
./tools/testfiles/h5diff_15.txt
./tools/testfiles/h5diff_16.txt
./tools/testfiles/h5diff_17.txt
./tools/testfiles/h5diff_18.txt
./tools/testfiles/h5diff_20.txt
./tools/testfiles/h5diff_21.txt
./tools/testfiles/h5diff_22.txt
./tools/testfiles/h5diff_23.txt
./tools/testfiles/h5diff_24.txt
./tools/testfiles/h5diff_25.txt
./tools/testfiles/h5diff_30.txt
./tools/testfiles/h5diff_31.txt
./tools/testfiles/h5diff_32.txt
./tools/testfiles/h5diff_33.txt
./tools/testfiles/h5diff_34.txt
./tools/testfiles/h5diff_35.txt
./tools/testfiles/h5diff_36.txt
./tools/testfiles/h5diff_37.txt
./tools/testfiles/h5diff_38.txt
./tools/testfiles/h5diff_40.txt
./tools/testfiles/h5diff_41.txt
./tools/testfiles/h5diff_42.txt
./tools/testfiles/h5diff_50.txt
./tools/testfiles/h5diff_51.txt
./tools/testfiles/h5diff_52.txt
@@ -1456,7 +1786,16 @@
./tools/testfiles/h5diff_627.txt
./tools/testfiles/h5diff_628.txt
./tools/testfiles/h5diff_629.txt
./tools/testfiles/h5diff_70.txt
./tools/testfiles/h5diff_80.txt
# h5repack test files
./tools/testfiles/test0.h5
./tools/testfiles/test1.h5
./tools/testfiles/test3.h5
./tools/testfiles/test4.h5
./tools/testfiles/test5.h5
./tools/testfiles/h5repack_info.txt
# windows
./windows/all.zip
./windows/all_withf90.zip

View File

@@ -1,4 +1,4 @@
HDF5 version 1.6.0-pre1 currently under development
HDF5 version 1.6.3 released on Wed Sep 22 11:30:11 CDT 2004
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------

315
bin/buildhdf5 Executable file
View File

@@ -0,0 +1,315 @@
#!/bin/sh
# Build HDF5 library by doing configure, make, and tests.
# Usage: See USAGE()
# Programmer: Albert Cheng
# Creation date: Jul 9, 2003
# Some handy definitions
USAGE()
{
cat <<EOF
Buildhdf5 builds the HDF5 library by running configure, make and make check.
It skips the configure part if one has been done already. In effect, one
can continue from a previous build.
Command Syntax
==============
buildhdf5 [-config] [-gass] [-srcdir dir] config-arguments ...
-config: run configure only. [default to do build too]
-gass: configure for the GASS driver
-help: show this help page
-n: no execution, just show commands
-srcdir: use dir as the source directory
[Note: this is different from --srcdir
which will be passed to configure]
all other arguments are passed to configure
Configure in place or by srcdir
===============================
By default, the command looks for the configure command in
'.' and then '../hdf5'. When it finds it, it uses it to do
the configure part. In effect, if ./configure is found, it
does the build in place. If it finds ../hdf5/configure, it
does the --srcdir (that is separated source) build. Therefore,
if you have the following structure setup, you can run multiple
hosts building simultantously using a common source code.
hdf5_1.4/hdf5 # holds the source
.../arabica # for SunOS 2.7
.../arabicapp # for SunOS 2.7 parallel
.../burrwhite # for Linux 2.4
Installing binary
=================
This command always install the binary in \$PWD/installdir.
This allows multiple install testing in the same host if the srcdir
configure is used.
EOF
}
TIMESTAMP()
{
echo "=====" "`date`" "====="
}
QUIT()
{
TIMESTAMP
}
# Do one step bracketed with time stamps
# The '< /dev/null' is needed to prevent some applications like MPI
# jobs blocked for reading when they read stdin unnecessary.
STEP()
{
banner="$1"
command="$2"
resultfile="$3"
echo "$banner"
(TIMESTAMP; nerror=0 ;
echo "eval $command"
eval $command || nerror=1 ;
TIMESTAMP; exit $nerror) < /dev/null >> "$resultfile" 2>&1
if [ $? -ne 0 ]; then
echo "error in '$banner'. buildhdf5 aborted."
exit 1
fi
}
# Try locate the HDF4 library
# This is a hack because there is no consistent place to find
# the valid HDF library.
LOCATE_HDF4()
{
OS=`uname -s`
echo OS=$OS
case "$OS" in
HP-UX)
h4paths="/afs/ncsa/packages/hdf/HPUX_10.20"
;;
IRIX)
h4paths="/afs/ncsa/packages/hdf/4.1r3_irix"
;;
IRIX64)
case "$CC" in
*-n32)
h4paths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
;;
*)
h4paths="/afs/ncsa/packages/hdf/IRIX64_6.5"
;;
esac
;;
Linux)
h4paths="/afs/ncsa/packages/hdf/linux"
;;
OSF1)
h4paths="/afs/ncsa/packages/hdf/OSF1_V4.0"
;;
*)
h4paths="/usr/ncsa /usr/sdt"
;;
esac
echo $h4paths
for h4 in $h4paths; do
if [ -f $h4/lib/libdf.a -a -f $h4/include/hdf.h ]; then
WITH_H4="--with-hdf4=$h4/include,$h4/lib"
break
fi
done
echo WITH_H4="$WITH_H4"
}
# Try locate the Fortran compiler
# This is a hack because there is no consistent fortran compiler name
LOCATE_FORTRAN()
{
OS=`uname -s`
echo OS=$OS
case "$OS" in
IRIX64)
case "$CC" in
*-n32)
gasspaths=/usr/local/globus-install-1.1.1/development/mips-sgi-irix6.5-n32_nothreads_standard_debug
sslpaths=/usr/local/ssl-n32
;;
*)
gasspaths=/usr/local/globus-install-1.1.1/development/mips-sgi-irix6.5-64_nothreads_standard_debug
sslpaths=/usr/local/ssl
;;
esac
;;
*)
;;
esac
echo gasspaths=$gasspaths
echo $sslpaths=$sslpaths
for x in $gasspaths dummy; do
if [ $x != dummy -a -f $x/lib/libglobus_gass_cache.a ]; then
WITH_GASS="--with-gass=$x/include,$x/lib"
break
fi
done
for x in $sslpaths dummy; do
if [ $x != dummy -a -f $x/lib/libssl.a ]; then
WITH_SSL="--with-ssl=$x/lib"
break
fi
done
echo WITH_GASS="$WITH_GASS"
echo WITH_SSL="$WITH_SSL"
}
# Try locate the GASS software library
# This is a hack because there is no consistent place to find
# the valid HDF library.
LOCATE_GASS()
{
OS=`uname -s`
echo OS=$OS
case "$OS" in
IRIX64)
case "$CC" in
*-n32)
gasspaths=/usr/local/globus-install-1.1.1/development/mips-sgi-irix6.5-n32_nothreads_standard_debug
sslpaths=/usr/local/ssl-n32
;;
*)
gasspaths=/usr/local/globus-install-1.1.1/development/mips-sgi-irix6.5-64_nothreads_standard_debug
sslpaths=/usr/local/ssl
;;
esac
;;
*)
;;
esac
echo gasspaths=$gasspaths
echo $sslpaths=$sslpaths
for x in $gasspaths dummy; do
if [ $x != dummy -a -f $x/lib/libglobus_gass_cache.a ]; then
WITH_GASS="--with-gass=$x/include,$x/lib"
break
fi
done
for x in $sslpaths dummy; do
if [ $x != dummy -a -f $x/lib/libssl.a ]; then
WITH_SSL="--with-ssl=$x/lib"
break
fi
done
echo WITH_GASS="$WITH_GASS"
echo WITH_SSL="$WITH_SSL"
}
# Configure. Default to do --srcdir.
CONFIG()
{
INSTALLDIR=`pwd`/installdir
test -d $INSTALLDIR || ( echo mkdir $INSTALLDIR; \
test "$NOEXEC" != 'noexec' && mkdir $INSTALLDIR )
CMD="$SRCDIR/configure --prefix=$INSTALLDIR $*"
echo $CMD
if [ "$NOEXEC" != 'noexec' ]; then
$CMD
else
true # set exit code as 0
fi
}
# Main body
TIMESTAMP
trap QUIT 0
#
# setup
#
MAKE=${MAKE:-'gmake'}
export MAKE
CONFIGURE="CONFIG"
CONFIG_ONLY=no # default is configure and build
NOEXEC= # default to execute commands
SRCDIRLIST=". ../hdf5" # places to look for configure
nerror=0
# parse some options
while [ $# -gt 0 ]; do
case "$1" in
-config)
# do configure only
CONFIG_ONLY=yes
;;
-gass)
LOCATE_GASS
;;
-help)
USAGE
exit 0
;;
-n)
NOEXEC='noexec'
;;
-srcdir)
shift
SRCDIRLIST="$1"
;;
*) # Quit parsing
break
;;
esac
shift
done
# Figure out if srcdir is wished.
# Make sure we are at the library root level
# by checking couple typical files. Not bullet-proof.
for SRCDIR in $SRCDIRLIST dummy; do
if [ x-$SRCDIR = x-dummy ]; then
break
fi
if [ -d $SRCDIR/src -a -d $SRCDIR/config -a -f $SRCDIR/configure ]
then
break
fi
done
if [ x-$SRCDIR = x-dummy ]; then
echo "Could not find the source dir or configure script. Abort."
exit 1
fi
# Configure
# no configure if already done.
if [ ! -f config.status ]; then
CONFIGURE="$CONFIGURE $WITH_SSL $WITH_GASS"
STEP "Configure HDF5..." "$CONFIGURE $*" "#config"
else
STEP "Confiugre Skipped" "echo Confiugre Skipped" "#config"
fi
if [ x-$CONFIG_ONLY = x-yes ]; then
exit 0
fi
# Compile
STEP "Make HDF5..." "$MAKE" "#make"
# Tests
STEP "Testing HDF5..." "$MAKE check" "#test"
# all done
echo "No Errors encountered"
TIMESTAMP

288
bin/chkcopyright Executable file
View File

@@ -0,0 +1,288 @@
#! /bin/sh
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the files COPYING and Copyright.html. COPYING can be found at the root
## of the source code distribution tree; Copyright.html can be found at the
## root level of an installed copy of the electronic HDF5 document set and
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
# Check Copyright notice.
# Check that all the files have the proper copyright notice.
# It goes down directories recursively.
#
# Programmer: Albert Cheng
# Created Data: 2003/07/22
PROGNAME=$0
DIFF="diff"
COPYRIGHTFILE=/tmp/copy.$$
EXTRACTEDFILE=/tmp/extracted.$$
VERBOSE= # default no
DIRS=. # default current directory
USAGE()
{
cat <<EOF
Usage: $PROGNAME [-h | -help] [-fname name-patter] [-v | -v9] [dir1 dir2 ...]
Check copyright notices of files in [dir1 dir2 ...}.
Default is to check files in current directory.
-h | -help
show this page.
-fname name-pattern
limit to files of name-pattern
-v
verbose mode
-v9
highly verbose
EOF
}
# Parse Options
#
PARSE_OPTION()
{
while test $# -gt 0 ; do
case "$1" in
-h | -help )
USAGE
exit 0
;;
-fname )
shift
FNAME="$1"
;;
-v* )
VERBOSE=yes
if test X$1 = X-v9; then
set -x
fi
;;
-* )
echo "***Unknown option ($1)"
USAGE
exit 1
;;
* )
DIRS=$*
break
;;
esac
shift
done
}
# Check C and C++ source files
#
C_SOURCE()
{
f=$1
cat > ${COPYRIGHTFILE} << \EOF
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
EOF
# Must use stdin for wc to prevent filename from popping up.
nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE} >/dev/null 2>&1
if test $? -ne 0; then
# show the difference
echo ${f}:
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE}
fi
}
# Check Fortran90 source files
#
FORTRAN_SOURCE()
{
f=$1
cat > ${COPYRIGHTFILE} << \EOF
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by the Board of Trustees of the University of Illinois. *
! All rights reserved. *
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the files COPYING and Copyright.html. COPYING can be found at the root *
! of the source code distribution tree; Copyright.html can be found at the *
! root level of an installed copy of the electronic HDF5 document set and *
! is linked from the top-level documents page. It can also be found at *
! http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
! access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
EOF
# Must use stdin for wc to prevent filename from popping up.
nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE} >/dev/null 2>&1
if test $? -ne 0; then
# show the differences
echo ${f}:
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE}
fi
}
# Check HTML Files
#
HTML_FILE()
{
f=$1
cat > ${COPYRIGHTFILE} << \EOF
<!--
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-->
EOF
# Must use stdin for wc to prevent filename from popping up.
nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
sed -n -e '/^<!--$/,/^ -->$/p' < $f | head -${nlines} > ${EXTRACTEDFILE}
$DIFF ${EXTRACTEDFILE} ${COPYRIGHTFILE} >/dev/null 2>&1
if test $? -ne 0; then
# show the differences
echo ${f}:
$DIFF ${EXTRACTEDFILE} ${COPYRIGHTFILE}
fi
}
# Check Shell script files
#
SHELL_FILE()
{
f=$1
cat > ${COPYRIGHTFILE} << \EOF
#! /bin/sh
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the files COPYING and Copyright.html. COPYING can be found at the root
## of the source code distribution tree; Copyright.html can be found at the
## root level of an installed copy of the electronic HDF5 document set and
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
EOF
# Must use stdin for wc to prevent filename from popping up.
nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE} >/dev/null 2>&1
if test $? -ne 0; then
# show the differences
echo ${f}:
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE}
fi
}
# Check Makefile
#
MAKE_FILE()
{
f=$1
cat > ${COPYRIGHTFILE} << \EOF
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
##
## This file is part of HDF5. The full HDF5 copyright notice, including
## terms governing use, modification, and redistribution, is contained in
## the files COPYING and Copyright.html. COPYING can be found at the root
## of the source code distribution tree; Copyright.html can be found at the
## root level of an installed copy of the electronic HDF5 document set and
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
EOF
# Must use stdin for wc to prevent filename from popping up.
nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE} >/dev/null 2>&1
if test $? -ne 0; then
# show the differences
echo ${f}:
head -${nlines} $f | $DIFF - ${COPYRIGHTFILE}
fi
}
#
# Main body
PARSE_OPTION "$@"
# use find to list all those file names and process them
# one by one.
(
if test -z "$FNAME" ; then
find $DIRS -type f -print
else
find $DIRS -type f -name "${FNAME}" -print
fi
) |
while read file; do
if test X-$VERBOSE = X-yes; then
echo checking ${file}...
fi
case ${file} in
*.c | *.h | *.cpp )
C_SOURCE ${file}
;;
*.f90 )
FORTRAN_SOURCE ${file}
;;
*.htm | *.html )
HTML_FILE ${file}
;;
*.sh | *.sh.in )
SHELL_FILE ${file}
;;
*Makefile | *Makefile.in )
MAKE_FILE ${file}
;;
*CVS/* )
# Skip
continue
;;
*)
echo "Unknown file type (${file})"
;;
esac
done
# Cleanup
rm -f ${EXTRACTEDFILE} ${COPYRIGHTFILE}

587
bin/config.guess vendored
View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2001-09-04'
timestamp='2004-03-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,8 +24,9 @@ timestamp='2001-09-04'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -87,30 +88,42 @@ if test $# != 0; then
exit 1
fi
trap 'exit 1' 1 2 15
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac'
esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -127,29 +140,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
amiga) machine=m68k-unknown ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
mac68k) machine=m68k-apple ;;
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE}" in
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
@@ -166,74 +180,135 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
cats:OpenBSD:*:*)
echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
macppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pegasos:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
1-0)
UNAME_MACHINE="alphaev5"
;;
1-1)
UNAME_MACHINE="alphaev56"
;;
1-101)
UNAME_MACHINE="alphapca56"
;;
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
esac
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -247,33 +322,18 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -291,6 +351,13 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -319,7 +386,7 @@ EOF
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
@@ -333,12 +400,6 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
sparc*:NetBSD:*)
echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -365,17 +426,8 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
@@ -415,15 +467,20 @@ EOF
exit (-1);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
@@ -496,8 +553,7 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -506,7 +562,7 @@ EOF
fi
exit 0 ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
@@ -546,10 +602,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
case "${HPUX_REV}" in
11.[0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -558,13 +612,13 @@ EOF
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi ;;
esac
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -597,11 +651,21 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
fi ;;
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
# avoid double evaluation of $set_cc_for_build
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -635,8 +699,7 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -664,9 +727,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -685,9 +745,6 @@ EOF
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
@@ -700,26 +757,25 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
*:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -731,10 +787,21 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -745,11 +812,17 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -761,25 +834,65 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
big) echo mips-unknown-linux-gnu && exit 0 ;;
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
esac
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -815,6 +928,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -828,7 +944,8 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_targets=`cd /; ld --help 2>&1 \
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
@@ -840,7 +957,7 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;
@@ -852,32 +969,31 @@ EOF
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
@@ -894,6 +1010,26 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -915,22 +1051,19 @@ EOF
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -954,9 +1087,15 @@ EOF
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -973,9 +1112,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1047,6 +1183,9 @@ EOF
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
@@ -1054,18 +1193,24 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-[KW]:NONSTOP_KERNEL:*:*)
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1088,11 +1233,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1111,11 +1251,11 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
esac
@@ -1237,8 +1377,7 @@ main ()
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.

352
bin/config.sub vendored
View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2001-09-07'
timestamp='2004-02-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ timestamp='2001-09-07'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -117,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -226,32 +228,46 @@ case $basic_machine in
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dsp16xx \
| fr30 \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \
| openrisc \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| s390 | s390x \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| stormy16 | strongarm \
| tahoe | thumb | tic80 | tron \
| v850 \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale \
| x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -278,38 +294,56 @@ case $basic_machine in
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \
| d10v-* | d30v-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| s390-* | s390x-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| v850-* | vax-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \
| z8k-*)
;;
@@ -329,6 +363,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -343,6 +380,12 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -374,6 +417,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -394,17 +441,13 @@ case $basic_machine in
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[cjt]90)
basic_machine=${basic_machine}-cray
os=-unicos
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
@@ -412,12 +455,24 @@ case $basic_machine in
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@@ -598,14 +653,6 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -620,6 +667,10 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -692,6 +743,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -699,6 +754,14 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -721,49 +784,55 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen)
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -784,10 +853,26 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@@ -795,7 +880,10 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -862,22 +950,42 @@ case $basic_machine in
os=-dynix
;;
t3e)
basic_machine=t3e-cray
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -899,8 +1007,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -921,17 +1029,13 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
@@ -952,13 +1056,6 @@ case $basic_machine in
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
@@ -978,13 +1075,16 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh3eb | sh4eb)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -999,10 +1099,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1058,17 +1154,20 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos*)
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1080,8 +1179,10 @@ case $os in
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=-nto-qnx
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1090,6 +1191,9 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1102,6 +1206,9 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@@ -1120,14 +1227,23 @@ case $os in
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1139,6 +1255,9 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@@ -1166,8 +1285,14 @@ case $os in
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-none)
;;
@@ -1200,10 +1325,14 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1230,6 +1359,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@@ -1293,19 +1425,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
*-gould)
*-gould)
os=-sysv
;;
*-highlevel)
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
*-sgi)
os=-irix
;;
*-siemens)
*-siemens)
os=-sysv4
;;
*-masscomp)
@@ -1374,10 +1506,16 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)

View File

@@ -24,6 +24,14 @@ while ($_ = shift @ARGV) {
$srcdir =~ s/\./\\\./g;
} elsif (/^--top_srcdir=([^ \t\n]*)/) {
$top_srcdir = $1;
# Trim off the path name if we're interested in the previous path.
if ($top_srcdir =~ /\/fortran\/\.\.$/) {
$top_srcdir =~ s/\/fortran\/\.\.$//;
} elsif ($top_srcdir =~ /\/c\+\+\/\.\.$/) {
$top_srcdir =~ s/\/c\+\+\/\.\.$//;
}
$top_srcdir =~ s/\./\\\./g;
} elsif (/^--top_builddir=([^ \t\n]*)/) {
$top_builddir = $1;
@@ -46,4 +54,7 @@ while (<DEPEND>) {
print NEW $_;
}
close(DEPEND);
close(NEW);
`mv $new_depend_file $depend_file`;

View File

@@ -39,12 +39,67 @@
# Moved the MANIFEST checking to a separate command file so that
# it can be invoked individually.
# Function definitions
#
# Print Usage page
USAGE()
{
cat << EOF
Usage: $0 [--nocheck] [-d <dir>] [-h] <methods> ...
-d DIR The name of the directory where the releas(es) should be
placed. By default, the directory is ./releases
--nocheck Ignore errors in MANIFEST file.
--private Make a private release with today's date in version information.
The other command-line options are the names of the programs to use
for compressing the resulting tar archive (if none are given then
"tar" is assumed):
tar -- use tar and don't do any compressing.
compress -- use compress and append ".Z" to the output name.
gzip -- use gzip with "-9" and append ".gz" to the output name.
bzip2 -- use bzip2 with "-9" and append ".bz2" to the output name.
Examples:
$ release
releases/hdf5-1.0.38.tar
$ release gzip
releases/hdf5-1.0.38.tar.gz
$ release -d /tmp tar compress gzip bzip2
/tmp/hdf5-1.0.38.tar
/tmp/hdf5-1.0.38.tar.Z
/tmp/hdf5-1.0.38.tar.gz
/tmp/hdf5-1.0.38.tar.bz2
EOF
}
# Defaults
DEST=releases
VERS=`perl bin/h5vers`
VERS_OLD=
test "$VERS" || exit 1
verbose=yes
check=yes
today=`date +%Y%m%d`
pmode='no'
# Restore previous Version information
RESTORE_VERSION()
{
if [ X-${VERS_OLD} != X- ]; then
echo restoring version information back to $VERS_OLD
bin/h5vers -s $VERS_OLD
VERS_OLD=
fi
}
# Command-line arguments
while [ -n "$1" ]; do
@@ -58,8 +113,16 @@ while [ -n "$1" ]; do
--nocheck)
check=no
;;
-h)
USAGE
exit 0
;;
--private)
pmode=yes
;;
-*)
echo "Unknown switch: $arg" 1>&2
USAGE
exit 1
;;
*)
@@ -73,6 +136,17 @@ if [ "X$methods" = "X" ]; then
methods=tar
fi
# setup restoration in case of abort.
trap RESTORE_VERSION 0
if [ X$pmode = Xyes ]; then
VERS_OLD=$VERS
# Set version information to m.n.r-of$today.
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-of$today
echo Private release of $VERS
bin/h5vers -s $VERS
fi
test "$verbose" && echo "Releasing hdf5-$VERS to $DEST" 1>&2
if [ ! -d $DEST ]; then
@@ -80,6 +154,7 @@ if [ ! -d $DEST ]; then
exit 1
fi
# Check the validity of the MANIFEST file.
bin/chkmanifest || fail=yes
if [ "X$fail" = "Xyes" ]; then
@@ -145,4 +220,11 @@ test -f ../Makefile.x && mv ../Makefile.x Makefile
rm -f $MANIFEST
rm -f ../hdf5-$VERS
rm -f ../x.tar
# Restore OLD version information, then no need for trap.
if [ X$pmode = Xyes ]; then
RESTORE_VERSION
trap 0
fi
exit 0

View File

@@ -33,6 +33,7 @@
DEBUGMODE=""
test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
WHEREAMI='pwd'
CMD=
# the name of this program
PROGNAME="bin/runtest $DEBUGMODE"
@@ -112,7 +113,7 @@ REPORT_RESULT()
{
if [ $retcode -eq 0 ]; then
if [ $skiptest = yes ]; then
PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG
PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $SKIPPEDLOG
else
PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG
fi
@@ -153,13 +154,17 @@ PRINT_TRAILER()
CHECK_RSH()
{
# Figure out how to use ping command in this host.
# Some hosts use "ping host count", some use "ping -c count host"
# Test "ping -c ..." style first because some '-c' machines treat
# the command 'ping localhost 3' means to ping host '3'.
# Some hosts use "ping host count", some use "ping -c count host".
# Test "ping -c 3 -w 5" since it has timeout feature.
# Test "ping -c ..." style before "ping host 3" because some machines
# that recognize -c treat 'ping localhost 3' as to ping host '3'.
if [ -z "$PING" ]; then
if ping -c 3 -w 5 localhost >/dev/null 2>&1; then
PING='ping -c 3 -w 5'
PINGCOUNT=
elif ping -c 3 localhost >/dev/null 2>&1; then
PING='ping -c 3'
PINGCOUNT=
elif ping localhost 3 >/dev/null 2>&1; then
PING=ping
PINGCOUNT=3
@@ -257,7 +262,7 @@ WAITTILL()
RUNSNAPTEST()
{
SNAPCMD_OPT="$STANDARD_OPT" # snapshot test option
SRCDIRNAME=""
SRCDIRNAME=${HOSTNAME}
# restore CC, PATH in case they were changed in the last test.
CC="$CC_SAVED"
PATH=$PATH_SAVED
@@ -293,35 +298,44 @@ RUNSNAPTEST()
SNAPCMD_OPT="$SNAPCMD_OPT $1 $2"
shift
;;
op-snapshot)
# option for snapshot
shift
SNAPCMD_OPT="$SNAPCMD_OPT $1"
;;
setenv)
# set environment variable
# pass them along to snapshot set environment variable
shift
eval $1="$2"
export $1
SNAPCMD_OPT="$SNAPCMD_OPT setenv $1 $2"
shift
;;
setenv2)
# set environment variable with 2 values
# a kludge now--the extra single quotes are needed
# else eval complains.
setenvN)
# set environment variable with $1 values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# pass them along to snapshot set environment variable
shift
eval $1="'$2 $3'"
export $1
shift; shift
;;
setenv3)
# set environment variable with 3 values
# a kludge now--the extra single quotes are needed
# else eval complains.
envN=$1
shift
eval $1="'$2 $3 $4'"
export $1
shift; shift; shift
envname=$1
SNAPCMD_OPT="$SNAPCMD_OPT setenvN $envN $envname"
envalue=
while test $envN -gt 0; do
shift
envalue="$envalue $1"
envN=`expr $envN - 1`
done
SNAPCMD_OPT="$SNAPCMD_OPT $envalue"
;;
skip)
# skip this test
skiptest=yes
;;
srcdirname)
# Use this before using parallel and -n32 since this overrides
# the others.
shift
SRCDIRNAME=$1
;;
*) # unknown test
PRINT "$0: unknown type of test ($1)"
retcode=1
@@ -353,7 +367,7 @@ RUNSNAPTEST()
# Setup log file name to save test output
THIS_MINUTE=`date +%H%M`
LOGFILE=${LOGBASENAME}${SRCDIRNAME}_${TODAY}_${THIS_MINUTE}
LOGFILE=${LOGBASENAME}/${SRCDIRNAME}_${TODAY}_${THIS_MINUTE}
PRINT "Running snapshot with output saved in"
PRINT " $LOGFILE"
(date; PRINT Hostname=$HOSTNAME) >> $LOGFILE
@@ -390,9 +404,16 @@ RUNSNAPTEST()
# -n32 -n32 mode. Apply to 64/32 bit OS such as IRIX64.
# parallel parallel mode.
# op-configure <option> configure option
# op-snapshot <option> snapshot option
# --* configure option
# setenv <name> <value> set environment variable <name> to <value>
# Pass along to snapshot
# setenvN <N> <name> <value> ...
# set environment variable with <N> values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# Pass along to snapshot.
# skip skip this test
# srcdirname <name> use <name> as the build-directory.
SNAPTEST_CONFIG_PARSE()
{
while read x y ; do
@@ -461,6 +482,8 @@ Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...
do not do cvs commands
-nodiff
do not do diff commands
-setup
setup the directory structure for snapshot test
-configname <name>
use <name> as hostname in the parsing of the snaptest configure file
<host>
@@ -473,6 +496,21 @@ EOF
}
# Verify if directory ($1) exists. If not, create it.
CHECK_DIR()
{
dir=$1
if test ! -e $1; then
echo mkdir $1
mkdir $1
errcode=$?
elif test ! -d $1; then
echo $1 is not a directory
errcode=1
fi
}
#################################
# Main
#################################
@@ -511,18 +549,22 @@ while [ $# -gt 0 ]; do
TESTHOST=-all
;;
-nocvs)
# do not do cvs commands
# do not do cvs commands.
NOCVS=nocvs
;;
-nodiff)
# do not do diff commands
# do not do diff commands.
NODIFF=nodiff
;;
-configname)
# use <name> as hostname in the parsing of the snaptest configure file
# use <name> as hostname in the parsing of the snaptest configure file.
shift
CONFIGNAME=$1
;;
-setup)
# setup the directory structure for snapshot test.
CMD=setup
;;
-*) # Unknow option
PRINT "Unknown option ($1)"
USAGE
@@ -553,24 +595,56 @@ fi
#################################
# Setup snapshot test directories
#################################
BASEDIR=${HOME}/snapshots-${H5VERSION}
# initial processing of setup option if requested
if test x-$CMD = x-setup; then
CHECK_DIR $BASEDIR
test $errcode -ne 0 && exit 1
elif [ ! -d ${BASEDIR} ]; then
echo "BASEDIR ($BASEDIR) does not exist"
exit 1
fi
# Show the real physical path rather than the symbolic path
SNAPYARD=`cd $HOME/snapshots-${H5VERSION} && /bin/pwd`
SNAPYARD=`cd $BASEDIR && /bin/pwd`
# Log file basename
LOGBASENAME=${SNAPYARD}/log/${HOSTNAME}
PASSEDLOG=${SNAPYARD}/log/PASSED_LOG_${TODAY}
FAILEDLOG=${SNAPYARD}/log/FAILED_LOG_${TODAY}
TIMELOG=${SNAPYARD}/log/TIME_LOG_${TODAY}
CVSLOG=${SNAPYARD}/log/CVS_LOG_${TODAY}
CVSLOG_LOCK=${SNAPYARD}/log/CVS_LOG_LOCK_${TODAY}
DIFFLOG=${SNAPYARD}/log/DIFF_LOG_${TODAY}
# Snap Test Configuration file
LOGDIR=${SNAPYARD}/log
LOGBASENAME=${LOGDIR}
PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY}
TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
CVSLOG=${LOGDIR}/CVS_LOG_${TODAY}
CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY}
DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY}
# Snap Test hosts and Configuration files
ALLHOSTSFILE=${SNAPYARD}/allhostfile
SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
# more processing of setup option if requested
if test x-$CMD = x-setup; then
CHECK_DIR $LOGDIR
test $errcode -ne 0 && exit 1
CHECK_DIR $LOGDIR/OLD
test $errcode -ne 0 && exit 1
CHECK_DIR $SNAPYARD/TestDir
test $errcode -ne 0 && exit 1
# create empty test hosts or configure files if non-existing
for f in $ALLHOSTSFILE $SNAPTESTCFG; do
if test ! -f $f; then
echo Creating $f
touch $f
fi
done
# create or update the current source.
echo update current source
$SNAPSHOT checkout
# setup completed. Exit.
exit 0
fi
#################################
# Setup test host(s)
#################################
ALLHOSTSFILE=${SNAPYARD}/allhostfile
if [ "$TESTHOST" = -all ]; then
if [ -f $ALLHOSTSFILE ]; then
TESTHOST=`sed -e s/#.*// $ALLHOSTSFILE`
@@ -654,7 +728,7 @@ if [ -z "$NODIFF" ]; then
fi
fi
# we can use the version of script in SNAPYARD/current now
# we can use the version of script in SNAPYARD/current now.
# Don't do the diff any more.
PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff"

View File

@@ -86,6 +86,31 @@ while [ $# -gt 0 ] ; do
cmdtest="test"
cmd=""
;;
setenv)
# set environment variable
shift
eval $1="$2"
export $1
shift
;;
setenvN)
# set environment variable with $1 values
# e.g., setenvN 3 x a b c is same as setenv x="a b c".
# a kludge now--the extra single quotes are needed
# else eval complains.
shift
envN=$1
shift
envname=$1
envalue=
while test $envN -gt 0; do
shift
envalue="$envalue $1"
envN=`expr $envN - 1`
done
eval $envname="'$envalue'"
export $envname
;;
srcdir)
#use srcdir option for test
srcdir="yes"
@@ -174,6 +199,11 @@ Usage: $PROGNAME [all] [checkout] [diff] [test] [srcdir] [release] [help]
release: Run release
clean: Run make clean
distclean:Run make distclean
setenv <name> <value>:
Set environment variable <name> to <value>.
setenvN <N> <name> <value> ...:
Set environment variable with <N> values.
E.g., setenvN 3 x a b c is same as setenv x="a b c".
srcdir: Use srcdir option (does not imply other commands)
"snapshot srcdir" is equivalent to "snapshot srcdir all"
"snapshot srcdir checkout" is equivalent to "snapshot checkout"
@@ -217,6 +247,11 @@ else
fi
BASEDIR=${HOME}/snapshots-${H5VERSION}
if [ ! -d ${BASEDIR} ]; then
echo "BASEDIR ($BASEDIR) does not exist"
exit 1
fi
CURRENT=${BASEDIR}/current
PREVIOUS=${BASEDIR}/previous
HOSTNAME=`hostname | cut -f1 -d.` # no domain part
@@ -238,11 +273,6 @@ done
#=============================
if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
TIMESTAMP "checkout"
# Create a working directory. Hopefully one is left over from last
# time that still has the contents of the previous release. But if
# not, just create one and assume that a snapshot is necessary.
test -d ${BASEDIR} || mkdir -p ${BASEDIR} || exit 1
# If there is a Makefile in ${CURRENT}, the last test done in it
# has not been distclean'ed. They would interfere with other
# --srcdir build since make considers the files in ${CURRENT}
@@ -259,7 +289,7 @@ if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
exit 1
fi
# Check out the current version from CVS
cvs -Q co -d ${CURRENT} ${CVSVERSION} hdf5 || exit 1
(cd $BASEDIR; cvs -Q co -P -d current ${CVSVERSION} hdf5 ) || exit 1
fi # Do CVS checkout

View File

@@ -3,4 +3,6 @@
# latest revision of that branch. If set to "hdf5", it uses the main
# version.
# H5VER tells runtest which version to run
H5VERSION=hdf5
H5VERSION=hdf5_1_6
H5VER="-r1.6"

View File

@@ -16,7 +16,6 @@ $Source = "";
#
%TypeString = ("haddr_t" => "a",
"hbool_t" => "b",
"htri_t" => "b",
"double" => "d",
"H5D_alloc_time_t" => "Da",
"H5D_fill_time_t" => "Df",
@@ -53,6 +52,7 @@ $Source = "";
"H5S_class_t" => "Sc",
"H5S_seloper_t" => "Ss",
"H5S_sel_type" => "St",
"htri_t" => "t",
"H5T_cset_t", => "Tc",
"H5T_direction_t", => "Td",
"H5T_norm_t" => "Tn",
@@ -63,6 +63,7 @@ $Source = "";
"H5T_class_t" => "Tt",
"H5T_str_t" => "Tz",
"void*" => "x",
"void**" => "x",
"FILE*" => "x",
"H5A_operator_t" => "x",
"H5D_operator_t" => "x",

29
c++/config/dec-osf5.x Executable file
View File

@@ -0,0 +1,29 @@
if test -z "$CXX"; then
CXX=cxx
CXX_BASENAME=cxx
fi
case $CXX_BASENAME in
g++)
CXXFLAGS="$CXXFLAGS -Wsign-compare" #Only works for some versions
DEBUG_CXXFLAGS="-g -fverbose-asm"
DEBUG_CPPFLAGS=
PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
PROD_CPPFLAGS=
PROFILE_CXXFLAGS="-pg"
PROFILE_CPPFLAGS=
;;
*)
CXXFLAGS="$CXXFLAGS -tlocal -D__USE_STD_IOSTREAM "
DEBUG_CXXFLAGS="-g"
DEBUG_CPPFLAGS=
PROD_CXXFLAGS="-O"
PROD_CPPFLAGS=
PROFILE_CXXFLAGS="-pg"
PROFILE_CPPFLAGS=
;;
esac

20
c++/config/freebsd Normal file
View File

@@ -0,0 +1,20 @@
# -*- shell-script -*-
#
# This file is part of the HDF5 build script. It is processed shortly
# after configure starts and defines, among other things, flags for
# the various compile modes.
#----------------------------------------------------------------------------
# Compiler flags. The CPPFLAGS values should not include package debug
# flags like `-DH5G_DEBUG' since these are added with the
# `--enable-debug' switch of configure.
#----------------------------------------------------------------------------
# Special setup to use pthread support if enable-threadsafe is on.
# Works with static executable only.
if test "X-" != "X-$enable_threadsafe"; then
CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
# enable_static_exec=yes
fi

View File

@@ -11,14 +11,24 @@ if test -z "$CXX"; then
CXX_BASENAME=aCC
fi
if test -z "$cxx_flags_set"; then
# +Z for PIC, +A for using archived libraries
CXXFLAGS="+Z +A"
CFLAGS="-g +O2"
case "$CXX" in
aCC)
# +Z for PIC, +A for using archived libraries
CXXFLAGS="$CXXFLAGS +Z +A"
CFLAGS="$CFLAGS -g +O2"
DEBUG_CXXFLAGS=-g
DEBUG_CPPFLAGS=
PROD_CXXFLAGS="-O -s"
PROD_CPPFLAGS=
PROFILE_CPPFLAGS=
cxx_flags_set=yes
fi
;;
*)
CXXFLAGS="$CXXFLAGS"
CFLAGS="$CFLAGS"
DEBUG_CXXFLAGS=-g
DEBUG_CPPFLAGS=
PROD_CXXFLAGS=
PROD_CPPFLAGS=
PROFILE_CPPFLAGS=
;;
esac

30
c++/config/ia64-linux-gnu Executable file
View File

@@ -0,0 +1,30 @@
if test -z "$CXX"; then
CXX=ecc
CXX_BASENAME=ecc
fi
case $CXX_BASENAME in
g++)
CXXFLAGS="$CXXFLAGS -Wsign-compare" #Only works for some versions
DEBUG_CXXFLAGS="-g -fverbose-asm"
DEBUG_CPPFLAGS=
PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
PROD_CPPFLAGS=
PROFILE_CXXFLAGS="-pg"
PROFILE_CPPFLAGS=
;;
*)
# Default to C99 standard.
CXXFLAGS="${CXXFLAGS:--std=c99}"
DEBUG_CXXFLAGS="-g -w2 -Wall"
DEBUG_CPPFLAGS=
PROD_CXXFLAGS="" #Default optimization O2 is used
PROD_CPPFLAGS=
PROFILE_CXXFLAGS="-pg"
PROFILE_CPPFLAGS=
;;
esac

View File

@@ -16,7 +16,7 @@ fi
if test -z "$cxx_flags_set"; then
# -LANG:std required for std use; -ptused causes templates used to be
# instantiated
CPPFLAGS="-LANG:std -ptused"
CPPFLAGS="$CPPFLAGS -LANG:std -ptused"
# libCio is a default library, since libtool before 1.5 doesn't fully
# support C++ yet, default libraries must be explicitly specified.

View File

@@ -25,14 +25,14 @@ cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
# Specify the "-features=tmplife" if the compiler can handle this...
if test -n "$cxx_version"; then
if test $cxx_vers_major -ge 5 -a $cxx_vers_minor -ge 3 -o $cxx_vers_major -gt 5; then
CXXFLAGS="-features=tmplife"
CXXFLAGS="$CXXFLAGS -features=tmplife"
fi
fi
# Try solaris native compiler flags
if test -z "$cxx_flags_set"; then
CXXFLAGS="$CXXFLAGS -instances=global"
CPPFLAGS="-LANG:std"
CPPFLAGS="$CPPFLAGS -LANG:std"
LIBS="$LIBS -lsocket"
DEBUG_CXXFLAGS=-g
DEBUG_CPPFLAGS=

84
c++/configure vendored
View File

@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Id: configure.in.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for HDF5 C++ 1.6.0-pre1.
# Generated by GNU Autoconf 2.53 for HDF5 C++ 1.6.3.
#
# Report bugs to <hdfhelp@ncsa.uiuc.edu>.
#
@@ -416,8 +416,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='HDF5 C++'
PACKAGE_TARNAME='hdf5-c--'
PACKAGE_VERSION='1.6.0-pre1'
PACKAGE_STRING='HDF5 C++ 1.6.0-pre1'
PACKAGE_VERSION='1.6.3'
PACKAGE_STRING='HDF5 C++ 1.6.3'
PACKAGE_BUGREPORT='hdfhelp@ncsa.uiuc.edu'
ac_unique_file="src/H5Library.cpp"
@@ -934,7 +934,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures HDF5 C++ 1.6.0-pre1 to adapt to many kinds of systems.
\`configure' configures HDF5 C++ 1.6.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -995,7 +995,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of HDF5 C++ 1.6.0-pre1:";;
short | recursive ) echo "Configuration of HDF5 C++ 1.6.3:";;
esac
cat <<\_ACEOF
@@ -1101,7 +1101,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
HDF5 C++ configure 1.6.0-pre1
HDF5 C++ configure 1.6.3
generated by GNU Autoconf 2.53
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -1116,7 +1116,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by HDF5 C++ $as_me 1.6.0-pre1, which was
It was created by HDF5 C++ $as_me 1.6.3, which was
generated by GNU Autoconf 2.53. Invocation command line was
$ $0 $@
@@ -10017,7 +10017,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by HDF5 C++ $as_me 1.6.0-pre1, which was
This file was extended by HDF5 C++ $as_me 1.6.3, which was
generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -10071,7 +10071,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
HDF5 C++ config.status 1.6.0-pre1
HDF5 C++ config.status 1.6.3
configured by $0, generated by GNU Autoconf 2.53,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -10527,3 +10527,69 @@ no_create=$saved_no_create
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
chmod 755 src/h5c++
if test -z "$ECHO_N" -o -z "$ECHO_C"; then
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ECHO_N=''
ECHO_C='
'
else
ECHO_N=-n
ECHO_C=''
fi
else
ECHO_N=''
ECHO_C='\c'
fi
fi
PRINT_PLAIN() {
echo $ECHO_N "$1$ECHO_C"
echo $ECHO_N "$1$ECHO_C" 1>>src/libhdf5.settings
}
PRINT_N() {
echo $ECHO_N "$1: $ECHO_C"
echo $ECHO_N "$1: $ECHO_C" 1>>src/libhdf5.settings
}
PRINT() {
echo "$1"
echo "$1" 1>>src/libhdf5.settings
}
IF_YES_NO() {
if test $# -lt 1; then
PRINT "No"
return
else
while test $# -gt 0; do
if test "$1" != "yes"; then
PRINT "No"
return
fi
shift
done
fi
PRINT "Yes"
}
IF_ENABLED_DISABLED() {
if test "$1" = "yes"; then
PRINT "Enabled"
else
PRINT "Disabled"
fi
}
PRINT "C++ Configure Summary"
PRINT "Compiling Options:"
PRINT_N " C++ Compiler"
PRINT "$CXX"
PRINT_N " CXXFLAGS"
PRINT "$CXXFLAGS"
PRINT "Features:"

View File

@@ -27,7 +27,7 @@ dnl
dnl NOTE: Don't forget to change the version number here when we do a
dnl release!!!
dnl
AC_INIT([HDF5 C++], [1.6.0-pre1], [hdfhelp@ncsa.uiuc.edu])
AC_INIT([HDF5 C++], [1.6.3], [hdfhelp@ncsa.uiuc.edu])
AC_CONFIG_SRCDIR([src/H5Library.cpp])
AC_CONFIG_AUX_DIR([../bin])
@@ -810,3 +810,75 @@ dnl Finally the makefiles
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
chmod 755 src/h5c++
dnl ----------------------------------------------------------------------
dnl Print out a summary of what we are going to build.
dnl
if test -z "$ECHO_N" -o -z "$ECHO_C"; then
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ECHO_N=''
ECHO_C='
'
else
ECHO_N=-n
ECHO_C=''
fi
else
ECHO_N=''
ECHO_C='\c'
fi
fi
PRINT_PLAIN() {
echo $ECHO_N "$1$ECHO_C"
echo $ECHO_N "$1$ECHO_C" 1>>src/libhdf5.settings
}
PRINT_N() {
echo $ECHO_N "$1: $ECHO_C"
echo $ECHO_N "$1: $ECHO_C" 1>>src/libhdf5.settings
}
PRINT() {
echo "$1"
echo "$1" 1>>src/libhdf5.settings
}
dnl ----------------------------------------------------------------------
dnl Print "Yes" if all arguments are "yes", otherwise "No"
dnl
IF_YES_NO() {
if test $# -lt 1; then
PRINT "No"
return
else
while test $# -gt 0; do
if test "$1" != "yes"; then
PRINT "No"
return
fi
shift
done
fi
PRINT "Yes"
}
IF_ENABLED_DISABLED() {
if test "$1" = "yes"; then
PRINT "Enabled"
else
PRINT "Disabled"
fi
}
PRINT "C++ Configure Summary"
PRINT "Compiling Options:"
PRINT_N " C++ Compiler"
PRINT "$CXX"
PRINT_N " CXXFLAGS"
PRINT "$CXXFLAGS"
PRINT "Features:"

View File

@@ -32,12 +32,11 @@ hdf5_builddir=$(top_builddir)/src
## List all source files here. The list of object files will be
## created by replacing the `.cpp' with a `.lo'. This list is necessary
## for building automatic dependencies.
TEST_SRC=compound.cpp h5group.cpp create.cpp readdata.cpp chunks.cpp \
extend_ds.cpp writedata.cpp
TEST_SRC=create.cpp readdata.cpp writedata.cpp compound.cpp extend_ds.cpp \
chunks.cpp h5group.cpp
TEST_OBJ=$(TEST_SRC:.cpp=.lo)
H5_FILES=Attributes.h5 SDScompound.h5 Select.h5 SDSextendible.h5 Group.h5 SDS.h5
EXAMPLE_PROGS=$(TEST_SRC) $(H5_FILES)
EXAMPLE_PROGS=$(TEST_SRC)
## These are the programs that `make all' or `make tests' will build and which
## `make check' will run. List them in the order they should be run.
@@ -47,7 +46,7 @@ TEST_PROGS=$(TEST_SRC:.cpp=)
## These are the files that `make clean' (and derivatives) will remove from
## this directory.
CLEAN=
CLEAN=*.h5
## How to build the programs... they all depend on the Fortran & C hdf5 libraries
$(TEST_PROGS): $(LIB) $(LIBHDF5)

Binary file not shown.

Binary file not shown.

View File

@@ -71,6 +71,12 @@ int main (void)
hsize_t chunk_dims[2] ={2, 5};
cparms.setChunk( RANK, chunk_dims );
/*
* Set fill value for the dataset
*/
int fill_val = 0;
cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
/*
* Create a new dataset within the file using cparms
* creation properties.

View File

@@ -21,29 +21,49 @@
#include "H5PropList.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5Alltypes.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Default constructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs() : H5Object() {}
// Constructor that takes an id
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Creates an AbstractDs instance using an existing id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs( const hid_t ds_id ) : H5Object( ds_id ) {}
// Copy constructor: makes copy of the original object; simply invokes
// base-class copy constructor.
//--------------------------------------------------------------------------
// Function: AbstractDs copy constructor
///\brief Copy constructor: makes a copy of the original AbstractDs object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {}
// Returns the class of the datatype that is used by this dataset
//--------------------------------------------------------------------------
// Function: AbstractDs::getTypeClass
///\brief Returns the class of the datatype that is used by this
/// object, which can be a dataset or an attribute.
///\return Datatype class identifier
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t AbstractDs::getTypeClass() const
{
// Gets the datatype used by this dataset or attribute.
// p_getType calls either H5Dget_type or H5Aget_type depending on
// p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
DataType datatype( p_getType());
DataType datatype(p_get_type());
// Gets the class of the datatype and validate it before returning
H5T_class_t type_class = H5Tget_class( datatype.getId());
@@ -52,97 +72,105 @@ H5T_class_t AbstractDs::getTypeClass() const
else
{
throw DataTypeIException("AbstractDs::getTypeClass",
"H5Tget_class returns something different than H5T_NO_CLASS");
"H5Tget_class returns H5T_NO_CLASS");
}
}
// Returns the generic datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getDataType
///\brief Returns the generic datatype of this abstract dataset, which
/// can be a dataset or an attribute.
///\return DataType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType AbstractDs::getDataType() const
{
// Gets the id of the datatype used by this dataset or attribute.
// p_getType calls either H5Dget_type or H5Aget_type depending on
// p_get_type calls either H5Dget_type or H5Aget_type depending on
// which object invokes getTypeClass
hid_t datatype_id = p_getType(); // returned value is already validated
hid_t datatype_id = p_get_type(); // returned value is already validated
// Create and return the DataType object
DataType datatype( datatype_id );
return( datatype );
}
// Returns the enumeration datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getEnumType
///\brief Returns the enumeration datatype of this abstract dataset which
/// can be a dataset or an attribute.
///\return EnumType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType AbstractDs::getEnumType() const
{
EnumType enumtype( p_getType());
return( enumtype );
EnumType enumtype(p_get_type());
return(enumtype);
}
// Returns the compound datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getCompType
///\brief Returns the compound datatype of this abstract dataset which
/// can be a dataset or an attribute.
///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType AbstractDs::getCompType() const
{
CompType comptype( p_getType());
return( comptype );
CompType comptype(p_get_type());
return(comptype);
}
// Returns the integer datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getIntType
///\brief Returns the integer datatype of this abstract dataset which
/// can be a dataset or an attribute.
///\return IntType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType AbstractDs::getIntType() const
{
IntType inttype( p_getType());
return( inttype );
IntType inttype(p_get_type());
return(inttype);
}
// Returns the floating-point datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getFloatType
///\brief Returns the floating-point datatype of this abstract dataset,
/// which can be a dataset or an attribute.
///\return FloatType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType AbstractDs::getFloatType() const
{
FloatType floatype( p_getType());
return( floatype );
FloatType floatype(p_get_type());
return(floatype);
}
// Returns the string datatype of this abstract dataset which
// can be a dataset or an attribute.
//--------------------------------------------------------------------------
// Function: AbstractDs::getStrType
///\brief Returns the string datatype of this abstract dataset which
/// can be a dataset or an attribute.
///\return StrType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType AbstractDs::getStrType() const
{
StrType strtype( p_getType());
return( strtype );
StrType strtype(p_get_type());
return(strtype);
}
/* This version of getDataType is older style. New style above doesn't
use overloading. Remove it when knowing for sure that the other way
is prefered
// Gets the specific datatype of this abstract dataset which can be a
// dataset or an attribute. Several overloaded getDataType's below
// are for specific sub-datatypes.
void AbstractDs::getDataType( EnumType& enumtype ) const
{
enumtype.setId( p_getType());
}
void AbstractDs::getDataType( CompType& comptype ) const
{
comptype.setId( p_getType());
}
void AbstractDs::getDataType( IntType& inttype ) const
{
inttype.setId( p_getType());
}
void AbstractDs::getDataType( FloatType& floatype ) const
{
floatype.setId( p_getType());
}
void AbstractDs::getDataType( StrType& strtype ) const
{
strtype.setId( p_getType());
}
end of old style of getDataType */
// Default destructor
//--------------------------------------------------------------------------
// Function: AbstractDs destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::~AbstractDs() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -26,13 +26,6 @@ namespace H5 {
#endif
class H5_DLLCPP AbstractDs : public H5Object {
public:
// Gets the dataspace of this abstract dataset - pure virtual
virtual DataSpace getSpace() const = 0;
// Gets the class of the datatype that is used by this abstract
// dataset
H5T_class_t getTypeClass() const;
// Gets a copy the datatype of that this abstract dataset uses.
// Note that this datatype is a generic one and can only be accessed
// via generic member functions, i.e., member functions belong
@@ -47,6 +40,13 @@ class H5_DLLCPP AbstractDs : public H5Object {
FloatType getFloatType() const;
StrType getStrType() const;
// Gets the dataspace of this abstract dataset - pure virtual
virtual DataSpace getSpace() const = 0;
// Gets the class of the datatype that is used by this abstract
// dataset
H5T_class_t getTypeClass() const;
// Copy constructor
AbstractDs( const AbstractDs& original );
@@ -61,7 +61,7 @@ class H5_DLLCPP AbstractDs : public H5Object {
private:
// This member function is implemented by DataSet and Attribute
virtual hid_t p_getType() const = 0;
virtual hid_t p_get_type() const = 0;
// This member function is implemented by DataSet and Attribute
virtual void p_close() const = 0;

View File

@@ -24,3 +24,5 @@
#include "H5FloatType.h"
#include "H5StrType.h"
#include "H5CompType.h"
#include "H5ArrayType.h"
#include "H5VarLenType.h"

173
c++/src/H5ArrayType.cpp Normal file
View File

@@ -0,0 +1,173 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
#include "H5Include.h"
#include "H5RefCounter.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5ArrayType.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//--------------------------------------------------------------------------
// Function: ArrayType default constructor
///\brief Default constructor: Creates a stub ArrayType
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType() : DataType()
{
// Initialize members
rank = -1;
dimensions = NULL;
}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
///\brief Creates an ArrayType object using an existing id.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
{
// Get the rank of the existing array and store it in this array
rank = H5Tget_array_ndims(existing_id);
if (rank < 0)
{
throw DataTypeIException("ArrayType overloaded constructor", "H5Tget_array_ndims failed");
}
// Get the dimensions of the existing array and store it in this array
dimensions = new hsize_t[rank];
//hsize_t rdims2[H5S_MAX_RANK];
int ret_value = H5Tget_array_dims(id, dimensions, NULL);
if (ret_value < 0)
{
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims failed");
}
}
//--------------------------------------------------------------------------
// Function: ArrayType copy constructor
///\brief Copy constructor: makes a copy of the original ArrayType object.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
{
rank = original.rank;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = original.dimensions[i];
}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
///\brief Creates a new array data type based on the specified
/// \a base_type.
///\param base_type - IN: Existing datatype
///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
///\param dims - IN: Size of each array dimension
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
{
hid_t new_type_id = H5Tarray_create(base_type.getId(), ndims, dims, NULL);
if (new_type_id <= 0)
{
throw DataTypeIException("ArrayType constructor", "H5Tarray_create failed");
}
id = new_type_id;
rank = ndims;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = dims[i];
}
//--------------------------------------------------------------------------
// Function: ArrayType::getArrayNDims
///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
{
// If the array's rank has not been stored, i.e. rank is init to -1,
// retrieve it via the C API
if (rank < 0)
{
rank = H5Tget_array_ndims(id);
if (rank < 0)
{
throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
}
}
return(rank);
}
//--------------------------------------------------------------------------
// Function: ArrayType::getArrayDims
///\brief Retrieves the size of all dimensions of an array datatype.
///\param dims - OUT: Sizes of dimensions
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
{
// if the array's dimensions have not been stored, retrieve them via C API
if (dimensions == NULL)
{
int ndims = H5Tget_array_dims(id, dims, NULL);
if (ndims < 0)
{
throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims failed");
}
// store the array's info in memory
rank = ndims;
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
dimensions[i] = dims[i];
}
// otherwise, simply copy what's in 'dimensions' to 'dims'
for (int i = 0; i < rank; i++)
dims[i] = dimensions[i];
return(rank);
}
//--------------------------------------------------------------------------
// Function: ArrayType destructor
///\brief Properly terminates access to this array datatype.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::~ArrayType()
{
// Free allocated memory
if (dimensions != NULL)
delete [] dimensions;
}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

57
c++/src/H5ArrayType.h Normal file
View File

@@ -0,0 +1,57 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class ArrayType inherits from DataType and provides wrappers for the
// HDF5 C's Array Datatypes.
#ifndef _H5ArrayType_H
#define _H5ArrayType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class H5_DLLCPP ArrayType : public DataType {
public:
// Constructor that creates a new array data type based on the
// specified base type.
ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
// Returns the number of dimensions of this array datatype.
int getArrayNDims();
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims);
// Copy constructor - makes copy of the original object
ArrayType( const ArrayType& original );
// Default destructor
virtual ~ArrayType();
protected:
// Default constructor
ArrayType();
// Constructor that takes an existing id
ArrayType( const hid_t existing_id );
private:
int rank; // Rank of the array
hsize_t* dimensions; // Sizes of the array dimensions
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
@@ -27,16 +29,38 @@
namespace H5 {
#endif
// Default constructor
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: AtomType default constructor [protected]
// Purpose Default constructor: creates a stub atomic datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType() {}
// Constructor that takes an existing id
//--------------------------------------------------------------------------
// Function: AtomType overloaded constructor [protected]
// Purpose Creates an AtomType object using an existing id.
// Parameter existing_id - IN: Id of an existing datatype
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Copy constructor: makes a copy of the original AtomType object.
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
///\brief Copy constructor: makes a copy of the original AtomType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
// Sets the total size for an atomic datatype.
//--------------------------------------------------------------------------
// Function: AtomType::setSize
///\brief Sets the total size for an atomic datatype.
///\param size - IN: Size to set
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setSize( size_t size ) const
{
// Call C routine H5Tset_size to set the total size
@@ -47,7 +71,17 @@ void AtomType::setSize( size_t size ) const
}
}
// Returns the byte order of an atomic datatype. Inheritance class???
//--------------------------------------------------------------------------
// Function: AtomType::getOrder
///\brief Returns the byte order of an atomic datatype.
///\param order_string - OUT: Text description of the returned byte order
///\return Byte order, which can be:
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder( string& order_string ) const
{
// Call C routine to get the byte ordering
@@ -68,7 +102,16 @@ H5T_order_t AtomType::getOrder( string& order_string ) const
return( type_order );
}
// Sets the byte ordering of an atomic datatype. Inheritance class???
//--------------------------------------------------------------------------
// Function: AtomType::setOrder
///\brief Sets the byte ordering of an atomic datatype.
///\param order - IN: Byte ordering constant, which can be:
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOrder( H5T_order_t order ) const
{
// Call C routine to set the byte ordering
@@ -79,7 +122,17 @@ void AtomType::setOrder( H5T_order_t order ) const
}
}
// Returns the precision of an atomic datatype.
//--------------------------------------------------------------------------
// Function: AtomType::getPrecision
///\brief Returns the precision of an atomic datatype.
///\return Number of significant bits
///\exception H5::DataTypeIException
///\par Description
/// The precision is the number of significant bits which,
/// unless padding is present, is 8 times larger than the
/// value returned by \c DataType::getSize().
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t AtomType::getPrecision() const
{
size_t num_signi_bits = H5Tget_precision( id ); // C routine
@@ -93,7 +146,16 @@ size_t AtomType::getPrecision() const
return( num_signi_bits );
}
// Sets the precision of an atomic datatype.
//--------------------------------------------------------------------------
// Function: AtomType::setPrecision
///\brief Sets the precision of an atomic datatype.
///\param precision - IN: Number of bits of precision
///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPrecision( size_t precision ) const
{
// Call C routine to set the datatype precision
@@ -104,10 +166,20 @@ void AtomType::setPrecision( size_t precision ) const
}
}
// Retrieves the bit offset of the first significant bit.
// 12/05/00: due to C API change
// - return type changed from size_t to int
// - offset = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
// Function: AtomType::getOffset
///\brief Retrieves the bit offset of the first significant bit.
///\return Offset value
///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset
// Programmer Binh-Minh Ribler - 2000
// Modification
// 12/05/00: due to C API change
// - return type changed from size_t to int
// - offset = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
int AtomType::getOffset() const
{
int offset = H5Tget_offset( id ); // C routine
@@ -121,7 +193,16 @@ int AtomType::getOffset() const
return( offset );
}
// Sets the bit offset of the first significant bit.
//--------------------------------------------------------------------------
// Function: AtomType::setOffset
///\brief Sets the bit offset of the first significant bit.
///\param offset - IN: Offset of first significant bit
///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOffset( size_t offset ) const
{
// Call C routine to set the bit offset
@@ -132,30 +213,58 @@ void AtomType::setOffset( size_t offset ) const
}
}
// Retrieves the padding type of the least and most-significant bit padding.
// these two are for Opaque type
//void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const
//{
//--------------------------------------------------------------------------
// Function: AtomType::getPad
///\brief Retrieves the padding type of the least and most-significant
/// bit padding.
///\param lsb - OUT: Least-significant bit padding type
///\param msb - OUT: Most-significant bit padding type
///\exception H5::DataTypeIException
///\par Description
/// Possible values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const
{
// Call C routine to get the padding type
//herr_t ret_value = H5Tget_pad( id, &lsb, &msb );
//if( ret_value < 0 )
//{
//throw DataTypeIException("AtomType::getPad", "H5Tget_pad failed");
//}
//}
herr_t ret_value = H5Tget_pad( id, &lsb, &msb );
if( ret_value < 0 )
{
throw DataTypeIException("AtomType::getPad", "H5Tget_pad failed");
}
}
// Sets the least and most-significant bits padding types
//void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
//{
//--------------------------------------------------------------------------
// Function: AtomType::getPad
///\brief Sets the least and most-significant bits padding types.
///\param lsb - IN: Least-significant bit padding type
///\param msb - IN: Most-significant bit padding type
///\exception H5::DataTypeIException
///\par Description
/// Valid values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
{
// Call C routine to set the padding type
//herr_t ret_value = H5Tset_pad( id, lsb, msb );
//if( ret_value < 0 )
//{
//throw DataTypeIException("AtomType::setPad", "H5Tset_pad failed");
//}
//}
herr_t ret_value = H5Tset_pad( id, lsb, msb );
if( ret_value < 0 )
{
throw DataTypeIException("AtomType::setPad", "H5Tset_pad failed");
}
}
// This destructor terminates access to the datatype; it calls ~DataType
//--------------------------------------------------------------------------
// Function: AtomType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -26,21 +26,12 @@ namespace H5 {
#endif
class H5_DLLCPP AtomType : public DataType {
public:
// Sets the total size for an atomic datatype.
void setSize( size_t size ) const;
// Returns the byte order of an atomic datatype.
H5T_order_t getOrder( string& order_string ) const;
// Sets the byte ordering of an atomic datatype.
void setOrder( H5T_order_t order ) const;
// Returns the precision of an atomic datatype.
size_t getPrecision() const;
// Sets the precision of an atomic datatype.
void setPrecision( size_t precision ) const;
// Retrieves the bit offset of the first significant bit.
// 12/05/00 - changed return type to int from size_t - C API
int getOffset() const;
@@ -48,12 +39,20 @@ class H5_DLLCPP AtomType : public DataType {
// Sets the bit offset of the first significant bit.
void setOffset( size_t offset ) const;
// The followings will go into Opaque type when completed
// Retrieves the padding type of the least and most-significant bit padding.
// void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
void getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const;
// Sets the least and most-significant bits padding types
// void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const;
// Returns the precision of an atomic datatype.
size_t getPrecision() const;
// Sets the precision of an atomic datatype.
void setPrecision( size_t precision ) const;
// Sets the total size for an atomic datatype.
void setSize( size_t size ) const;
// Copy constructor - makes copy of the original object
AtomType( const AtomType& original );
@@ -62,11 +61,13 @@ class H5_DLLCPP AtomType : public DataType {
virtual ~AtomType();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
AtomType();
// Constructor that takes an existing id
AtomType( const hid_t existing_id );
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}

View File

@@ -28,6 +28,8 @@
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5Attribute.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
@@ -35,14 +37,39 @@
namespace H5 {
#endif
// Copy constructor: makes a copy of the original object; simply invokes
// the base class copy constructor.
//--------------------------------------------------------------------------
// Function: Attribute default constructor
///\brief Default constructor: Creates a stub attribute
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
Attribute::Attribute() : AbstractDs() {}
//--------------------------------------------------------------------------
// Function: Attribute copy constructor
///\brief Copy constructor: makes a copy of the original Attribute object.
///\param original - IN: Original Attribute object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute( const Attribute& original ) : AbstractDs( original ) {}
// Creates a copy of an existing attribute using an id
Attribute::Attribute( const hid_t attr_id ) : AbstractDs( attr_id ) {}
//--------------------------------------------------------------------------
// Function: Attribute overloaded constructor
///\brief Creates an Attribute object using the id of an existing
/// attribute.
///\param existing_id - IN: Id of an existing attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const hid_t existing_id) : AbstractDs(existing_id) {}
// Writes data to this attribute.
//--------------------------------------------------------------------------
// Function: Attribute::write
///\brief Writes data to this attribute.
///\param mem_type - IN: Attribute datatype (in memory)
///\param buf - IN: Data to be written
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::write( const DataType& mem_type, const void *buf ) const
{
herr_t ret_value = H5Awrite( id, mem_type.getId(), buf );
@@ -52,6 +79,15 @@ void Attribute::write( const DataType& mem_type, const void *buf ) const
}
}
//--------------------------------------------------------------------------
// Function: Attribute::write
///\brief This is an overloaded member function, provided for convenience.
/// It writes a \a std::string to this attribute.
///\param mem_type - IN: Attribute datatype (in memory)
///\param strg - IN: Data to be written
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
void Attribute::write( const DataType& mem_type, const string& strg ) const
{
// Convert string to C-string
@@ -65,7 +101,32 @@ void Attribute::write( const DataType& mem_type, const string& strg ) const
}
}
// Reads data from this attribute.
//--------------------------------------------------------------------------
// Function: Attribute::read
///\brief Reads data from this attribute.
///\param mem_type - IN: Attribute datatype (in memory)
///\param buf - OUT: Buffer for read data
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::read( const DataType& mem_type, void *buf ) const
{
herr_t ret_value = H5Aread( id, mem_type.getId(), buf );
if( ret_value < 0 )
{
throw AttributeIException("Attribute::read", "H5Aread failed");
}
}
//--------------------------------------------------------------------------
// Function: Attribute::read
///\brief This is an overloaded member function, provided for convenience.
/// It reads a \a std::string from this attribute.
///\param mem_type - IN: Attribute datatype (in memory)
///\param strg - IN: Buffer for read string
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
void Attribute::read( const DataType& mem_type, string& strg ) const
{
size_t size = mem_type.getSize();
@@ -79,17 +140,13 @@ void Attribute::read( const DataType& mem_type, string& strg ) const
delete strg_C;
}
// Reads data from this attribute.
void Attribute::read( const DataType& mem_type, void *buf ) const
{
herr_t ret_value = H5Aread( id, mem_type.getId(), buf );
if( ret_value < 0 )
{
throw AttributeIException("Attribute::read", "H5Aread failed");
}
}
// Gets a copy of the dataspace for this attribute.
//--------------------------------------------------------------------------
// Function: Attribute::getSpace
///\brief Gets a copy of the dataspace for this attribute.
///\return Dataspace instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace Attribute::getSpace() const
{
// Calls C function H5Aget_space to get the id of the dataspace
@@ -107,11 +164,16 @@ DataSpace Attribute::getSpace() const
}
}
// This private member function calls the C API to get the generic datatype
// of the datatype that is used by this attribute. This function is used
// by the overloaded functions getDataType defined in AbstractDs for the
// generic datatype and specific sub-types.
hid_t Attribute::p_getType() const
//--------------------------------------------------------------------------
// Function: Attribute::p_get_type (private)
// Purpose Gets the datatype of this attribute.
// Return Id of the datatype
// Exception H5::AttributeIException
// Description
// This private function is used in AbstractDs.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t Attribute::p_get_type() const
{
hid_t type_id = H5Aget_type( id );
if( type_id > 0 )
@@ -122,7 +184,15 @@ hid_t Attribute::p_getType() const
}
}
// Gets the name of this attribute, returning its length.
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief Gets the name of this attribute, returning its length.
///\param buf_size - IN: Desired length of the name
///\param attr_name - OUT: Buffer for the name string
///\return Length of the attribute name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - Nov, 2001
//--------------------------------------------------------------------------
ssize_t Attribute::getName( size_t buf_size, string& attr_name ) const
{
char* name_C = new char[buf_size+1]; // temporary C-string for C API
@@ -135,13 +205,22 @@ ssize_t Attribute::getName( size_t buf_size, string& attr_name ) const
{
throw AttributeIException("Attribute::getName", "H5Aget_name failed");
}
// otherwise, convert the C string attribute name and return
// otherwise, convert the C attribute name and return
attr_name = name_C;
delete name_C;
return( name_size );
}
// Gets the name of this attribute, returning the name, not the length.
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it returns the
/// attribute's name, not the length.
///\return Name of the attribute
///\param buf_size - IN: Desired length of the name
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string Attribute::getName( size_t buf_size ) const
{
string attr_name;
@@ -150,8 +229,45 @@ string Attribute::getName( size_t buf_size ) const
// let caller catch exception if any
}
// This private function calls the C API H5Aclose to close this attribute.
// Used by the IdComponent::reset.
//--------------------------------------------------------------------------
// Function: Attribute::getName
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above functions in that it doesn't take
/// any arguments and returns the attribute's name.
///\return Name of the attribute
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
string Attribute::getName() const
{
// Try with 256 characters for the name first, if the name's length
// returned is more than that then, read the name again with the
// appropriate space allocation
char* name_C = new char[256]; // temporary C-string for C API
ssize_t name_size = H5Aget_name(id, 255, name_C);
string attr_name;
if (name_size >= 256)
name_size = getName(name_size, attr_name);
// otherwise, convert the C attribute name and return
else
attr_name = name_C;
delete name_C;
return( attr_name );
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Attribute::p_close (private)
// Purpose: Closes this attribute.
// Exception H5::AttributeIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Attribute::p_close() const
{
herr_t ret_value = H5Aclose( id );
@@ -160,17 +276,18 @@ void Attribute::p_close() const
throw AttributeIException(0, "H5Aclose failed");
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: Attribute destructor
///\brief Properly terminates access to this attribute.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::~Attribute()
{
// The attribute id will be closed properly
try {
resetIdComponent( this ); }
resetIdComponent(this); }
catch (Exception close_error) { // thrown by p_close
cerr << "Attribute::~Attribute - " << close_error.getDetailMsg() << endl;
}

View File

@@ -22,26 +22,21 @@ namespace H5 {
class H5_DLLCPP Attribute : public AbstractDs {
public:
// Writes data to this attribute.
void write(const DataType& mem_type, const void *buf ) const;
void write(const DataType& mem_type, const string& strg ) const;
// Gets the name of this attribute.
ssize_t getName( size_t buf_size, string& attr_name ) const;
string getName( size_t buf_size ) const; // returns name, not its length
string getName() const; // returns name, no argument
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
// Reads data from this attribute.
void read( const DataType& mem_type, void *buf ) const;
void read( const DataType& mem_type, string& strg ) const;
// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
// Gets the name of this attribute.
ssize_t getName( size_t buf_size, string& attr_name ) const;
string getName( size_t buf_size ) const; // returns name, not its length
// do not inherit iterateAttrs from H5Object
int iterateAttrs() { return 0; }
// Used by the API to appropriately close a attribute
virtual void p_close() const;
// Writes data to this attribute.
void write(const DataType& mem_type, const void *buf ) const;
void write(const DataType& mem_type, const string& strg ) const;
// Creates a copy of an existing attribute using the attribute id
Attribute( const hid_t attr_id );
@@ -49,6 +44,12 @@ class H5_DLLCPP Attribute : public AbstractDs {
// Copy constructor: makes a copy of an existing Attribute object.
Attribute( const Attribute& original );
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close an attribute
virtual void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor: properly terminates access to this attribute.
virtual ~Attribute();
private:
@@ -56,7 +57,13 @@ class H5_DLLCPP Attribute : public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_getType() const;
virtual hid_t p_get_type() const;
// do not inherit iterateAttrs from H5Object
int iterateAttrs() { return 0; }
// Default constructor
Attribute();
};
#ifndef H5_NO_NAMESPACE
}

View File

@@ -49,12 +49,22 @@
namespace H5 {
#endif
// Creates a new group at this location which can be a file or another group.
Group CommonFG::createGroup( const string& name, size_t size_hint ) const
{
return( createGroup( name.c_str(), size_hint ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::createGroup
///\brief Creates a new group at this location which can be a file
/// or another group.
///\param name - IN: Name of the group to create
///\param size_hint - IN: Indicates the number of bytes to reserve for
/// the names that will appear in the group
///\return Group instance
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// The optional \a size_hint specifies how much file space to
/// reserve for storing the names that will appear in this new
/// group. If a non-positive value is provided for the \a size_hint
/// then a default size is chosen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group CommonFG::createGroup( const char* name, size_t size_hint ) const
{
// Call C routine H5Gcreate to create the named group, giving the
@@ -72,11 +82,27 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
return( group );
}
// Opens an existing group in a location which can be a file or another group
Group CommonFG::openGroup( const string& name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::createGroup
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group CommonFG::createGroup( const string& name, size_t size_hint ) const
{
return( openGroup( name.c_str() ));
return( createGroup( name.c_str(), size_hint ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::openGroup
///\brief Opens an existing group in a location which can be a file
/// or another group.
///\param name - IN: Name of the group to open
///\return Group instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group CommonFG::openGroup( const char* name ) const
{
// Call C routine H5Gopen to open the named group, giving the
@@ -94,11 +120,29 @@ Group CommonFG::openGroup( const char* name ) const
return( group );
}
// Creates a new dataset at this location.
DataSet CommonFG::createDataSet( const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const
//--------------------------------------------------------------------------
// Function: CommonFG::openGroup
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group CommonFG::openGroup( const string& name ) const
{
return( createDataSet( name.c_str(), data_type, data_space, create_plist ));
return( openGroup( name.c_str() ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::createDataSet
///\brief Creates a new dataset at this location.
///\param name - IN: Name of the dataset to create
///\param data_type - IN: Datatype of the dataset
///\param data_space - IN: Dataspace for the dataset
///\param create_plist - IN: Creation properly list for the dataset
///\return DataSet instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const
{
// Obtain identifiers for C API
@@ -120,11 +164,26 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co
return( dataset );
}
// Opens an existing dataset at this location.
DataSet CommonFG::openDataSet( const string& name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::createDataSet
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet CommonFG::createDataSet( const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist ) const
{
return( openDataSet( name.c_str() ));
return( createDataSet( name.c_str(), data_type, data_space, create_plist ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::openDataSet
///\brief Opens an existing dataset at this location.
///\param name - IN: Name of the dataset to open
///\return DataSet instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet CommonFG::openDataSet( const char* name ) const
{
// Call C function H5Dopen to open the specified dataset, giving
@@ -142,12 +201,34 @@ DataSet CommonFG::openDataSet( const char* name ) const
return( dataset );
}
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id
void CommonFG::link( H5G_link_t link_type, const string& curr_name, const string& new_name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::openDataSet
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet CommonFG::openDataSet( const string& name ) const
{
link( link_type, curr_name.c_str(), new_name.c_str() );
return( openDataSet( name.c_str() ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::link
///\brief Creates a link of the specified type from \a new_name to
/// \a curr_name.
///\param link_type - IN: Link type; possible values are
/// \li \c H5G_LINK_HARD
/// \li \c H5G_LINK_SOFT
///\param curr_name - IN: Name of the existing object if link is a hard
/// link; can be anything for the soft link
///\param new_name - IN: New name for the object
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// Note that both names are interpreted relative to the
/// specified location.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* new_name ) const
{
herr_t ret_value = H5Glink( getLocId(), link_type, curr_name, new_name );
@@ -157,11 +238,25 @@ void CommonFG::link( H5G_link_t link_type, const char* curr_name, const char* ne
}
}
// Removes the specified name at this location.
void CommonFG::unlink( const string& name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::link
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a curr_name and \a new_name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::link( H5G_link_t link_type, const string& curr_name, const string& new_name ) const
{
unlink( name.c_str() );
link( link_type, curr_name.c_str(), new_name.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::unlink
///\brief Removes the specified name at this location.
///\param name - IN: Name of the object to be removed
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::unlink( const char* name ) const
{
herr_t ret_value = H5Gunlink( getLocId(), name );
@@ -171,11 +266,26 @@ void CommonFG::unlink( const char* name ) const
}
}
// Renames an object at this location.
void CommonFG::move( const string& src, const string& dst ) const
//--------------------------------------------------------------------------
// Function: CommonFG::unlink
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::unlink( const string& name ) const
{
move( src.c_str(), dst.c_str() );
unlink( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::move
///\brief Renames an object at this location.
///\param src - IN: Object's original name
///\param dst - IN: Object's new name
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::move( const char* src, const char* dst ) const
{
herr_t ret_value = H5Gmove( getLocId(), src, dst );
@@ -185,11 +295,27 @@ void CommonFG::move( const char* src, const char* dst ) const
}
}
// Returns information about an object
void CommonFG::getObjinfo( const string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const
//--------------------------------------------------------------------------
// Function: CommonFG::move
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a src and \a dst.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::move( const string& src, const string& dst ) const
{
getObjinfo( name.c_str(), follow_link, statbuf );
move( src.c_str(), dst.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjinfo
///\brief Returns information about an object.
///\param name - IN: Name of the object
///\param follow_link - IN: Link flag
///\param statbuf - OUT: Buffer to return information about the object
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& statbuf ) const
{
herr_t ret_value = H5Gget_objinfo( getLocId(), name, follow_link, &statbuf );
@@ -199,11 +325,27 @@ void CommonFG::getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& st
}
}
// Returns the name of the object that the symbolic link points to.
string CommonFG::getLinkval( const string& name, size_t size ) const
//--------------------------------------------------------------------------
// Function: CommonFG::getObjinfo
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::getObjinfo( const string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const
{
return( getLinkval( name.c_str(), size ));
getObjinfo( name.c_str(), follow_link, statbuf );
}
//--------------------------------------------------------------------------
// Function: CommonFG::getLinkval
///\brief Returns the name of the object that the symbolic link points to.
///\param name - IN: Symbolic link to the object
///\param size - IN: Maximum number of characters of value to be returned
///\return Name of the object
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string CommonFG::getLinkval( const char* name, size_t size ) const
{
char* value_C = new char[size+1]; // temporary C-string for C API
@@ -218,11 +360,33 @@ string CommonFG::getLinkval( const char* name, size_t size ) const
return( value );
}
// Sets the comment for an object specified by its name
void CommonFG::setComment( const string& name, const string& comment ) const
//--------------------------------------------------------------------------
// Function: CommonFG::getLinkval
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string CommonFG::getLinkval( const string& name, size_t size ) const
{
setComment( name.c_str(), comment.c_str() );
return( getLinkval( name.c_str(), size ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::setComment
///\brief Sets or resets the comment for an object specified by its name.
///\param name - IN: Name of the object
///\param comment - IN: New comment
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// If \a comment is an empty string or a null pointer, the comment
/// message is removed from the object.
/// Comments should be relatively short, null-terminated, ASCII
/// strings. They can be attached to any object that has an
/// object header, e.g., data sets, groups, named data types,
/// and data spaces, but not symbolic links.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::setComment( const char* name, const char* comment ) const
{
herr_t ret_value = H5Gset_comment( getLocId(), name, comment );
@@ -232,11 +396,27 @@ void CommonFG::setComment( const char* name, const char* comment ) const
}
}
// Retrieves comment for specified object
string CommonFG::getComment( const string& name, size_t bufsize ) const
//--------------------------------------------------------------------------
// Function: CommonFG::setComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name and \a comment.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::setComment( const string& name, const string& comment ) const
{
return( getComment( name.c_str(), bufsize ));
setComment( name.c_str(), comment.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::getComment
///\brief Retrieves comment for the specified object.
///\param name - IN: Name of the object
///\param bufsize - IN: Length of the comment to retrieve
///\return Comment string
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string CommonFG::getComment( const char* name, size_t bufsize ) const
{
// temporary C-string for the object's comment
@@ -254,11 +434,27 @@ string CommonFG::getComment( const char* name, size_t bufsize ) const
return( comment );
}
// Mounts the file 'child' onto this group
void CommonFG::mount( const string& name, H5File& child, PropList& plist ) const
//--------------------------------------------------------------------------
// Function: CommonFG::getComment
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string CommonFG::getComment( const string& name, size_t bufsize ) const
{
mount( name.c_str(), child, plist );
return( getComment( name.c_str(), bufsize ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief Mounts the file \a child onto this group.
///\param name - IN: Name of the group
///\param child - IN: File to mount
///\param plist - IN: Property list to use
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
{
// Obtain identifiers for C API
@@ -275,11 +471,25 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
}
}
// Unmounts the file named 'name' from this parent group
void CommonFG::unmount( const string& name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::mount
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::mount( const string& name, H5File& child, PropList& plist ) const
{
unmount( name.c_str() );
mount( name.c_str(), child, plist );
}
//--------------------------------------------------------------------------
// Function: CommonFG::unmount
///\brief Unmounts the specified file.
///\param name - IN: Name of the file to unmount
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::unmount( const char* name ) const
{
// Call C routine H5Fmount to do the mouting
@@ -292,10 +502,30 @@ void CommonFG::unmount( const char* name ) const
}
}
// This private member function calls the C API H5Topen to open the
// named datatype and returns the datatype's identifier. The function
// is used by the functions openXxxType's below for opening the sub-types
hid_t CommonFG::p_openDataType( const char* name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::unmount
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CommonFG::unmount( const string& name ) const
{
unmount( name.c_str() );
}
//--------------------------------------------------------------------------
// Function: CommonFG::p_open_data_type (private)
// Purpose Opens the named datatype and returns the datatype's identifier.
// Return Id of the datatype
// Exception H5::FileIException or H5::GroupIException
// Description
// This private function is used by the member functions
// CommonFG::openXxxType, where Xxx indicates the specific
// datatypes.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t CommonFG::p_open_data_type( const char* name ) const
{
// Call C function H5Topen to open the named datatype in this group,
// giving either the file or group id
@@ -313,80 +543,178 @@ hid_t CommonFG::p_openDataType( const char* name ) const
//
// The following member functions use the private function
// p_openDataType to open a named datatype in this location
// p_open_data_type to open a named datatype in this location
//
// Opens the named generic datatype in this group.
//--------------------------------------------------------------------------
// Function: CommonFG::openDataType
///\brief Opens the named generic datatype at this location.
///\param name - IN: Name of the datatype to open
///\return DataType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType CommonFG::openDataType( const char* name ) const
{
DataType data_type(p_open_data_type(name));
return( data_type );
}
//--------------------------------------------------------------------------
// Function: CommonFG::openDataType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType CommonFG::openDataType( const string& name ) const
{
return( openDataType( name.c_str()) );
}
DataType CommonFG::openDataType( const char* name ) const
{
DataType data_type( p_openDataType( name ));
return( data_type );
}
// Opens the named enumeration datatype in this group.
//--------------------------------------------------------------------------
// Function: CommonFG::openEnumType
///\brief Opens the named enumeration datatype at this location.
///\param name - IN: Name of the enumeration datatype to open
///\return EnumType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType CommonFG::openEnumType( const char* name ) const
{
EnumType enum_type(p_open_data_type(name));
return(enum_type);
}
//--------------------------------------------------------------------------
// Function: CommonFG::openEnumType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType CommonFG::openEnumType( const string& name ) const
{
return( openEnumType( name.c_str()) );
}
EnumType CommonFG::openEnumType( const char* name ) const
{
EnumType enum_type( p_openDataType( name ));
return( enum_type );
}
// Opens the named compound datatype in this group.
//--------------------------------------------------------------------------
// Function: CommonFG::openCompType
///\brief Opens the named compound datatype at this location.
///\param name - IN: Name of the compound datatype to open
///\return CompType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType CommonFG::openCompType( const char* name ) const
{
CompType comp_type(p_open_data_type(name));
return(comp_type);
}
//--------------------------------------------------------------------------
// Function: CommonFG::openCompType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType CommonFG::openCompType( const string& name ) const
{
return( openCompType( name.c_str()) );
}
CompType CommonFG::openCompType( const char* name ) const
{
CompType comp_type( p_openDataType( name ));
return( comp_type );
//--------------------------------------------------------------------------
// Function: CommonFG::openIntType
///\brief Opens the named integer datatype at this location.
///\param name - IN: Name of the integer datatype to open
///\return IntType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType CommonFG::openIntType( const char* name ) const
{
IntType int_type(p_open_data_type(name));
return(int_type);
}
// Opens the named integer datatype in this group.
//--------------------------------------------------------------------------
// Function: CommonFG::openIntType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType CommonFG::openIntType( const string& name ) const
{
return( openIntType( name.c_str()) );
}
IntType CommonFG::openIntType( const char* name ) const
//--------------------------------------------------------------------------
// Function: CommonFG::openFloatType
///\brief Opens the named floating-point datatype at this location.
///\param name - IN: Name of the floating-point datatype to open
///\return FloatType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType CommonFG::openFloatType( const char* name ) const
{
IntType int_type( p_openDataType( name ));
return( int_type );
FloatType float_type(p_open_data_type(name));
return(float_type);
}
// Opens the named floating-point datatype in this group.
//--------------------------------------------------------------------------
// Function: CommonFG::openFloatType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType CommonFG::openFloatType( const string& name ) const
{
return( openFloatType( name.c_str()) );
}
FloatType CommonFG::openFloatType( const char* name ) const
{
FloatType float_type( p_openDataType( name ));
return( float_type );
//--------------------------------------------------------------------------
// Function: CommonFG::openStrType
///\brief Opens the named string datatype at this location.
///\param name - IN: Name of the string datatype to open
///\return StrType instance
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType CommonFG::openStrType( const char* name ) const
{
StrType str_type(p_open_data_type(name));
return(str_type);
}
// Opens the named string datatype of this group
//--------------------------------------------------------------------------
// Function: CommonFG::openStrType
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType CommonFG::openStrType( const string& name ) const
{
return( openStrType( name.c_str()) );
}
StrType CommonFG::openStrType( const char* name ) const
{
StrType str_type( p_openDataType( name ));
return( str_type );
}
// Iterates a user's function over the entries of a group.
int CommonFG::iterateElems( const string& name, int *idx, H5G_iterate_t op , void* op_data )
{
return( iterateElems( name.c_str(), idx, op, op_data ));
}
//--------------------------------------------------------------------------
// Function: CommonFG::iterateElems
///\brief Iterates a user's function over the entries of a group.
///\param name - IN : Name of group to iterate over
///\param idx - IN/OUT: Starting (IN) and ending (OUT) entry indices
///\param op - IN : User's function to operate on each entry
///\param op_data - IN/OUT: Data associated with the operation
///\return The return value of the first operator that returns non-zero,
/// or zero if all members were processed with no operator
/// returning non-zero.
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void* op_data )
{
int ret_value = H5Giterate( getLocId(), name, idx, op, op_data );
@@ -397,14 +725,127 @@ int CommonFG::iterateElems( const char* name, int *idx, H5G_iterate_t op , void*
return( ret_value );
}
CommonFG::CommonFG()
{ // do nothing
//--------------------------------------------------------------------------
// Function: CommonFG::iterateElems
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int CommonFG::iterateElems( const string& name, int *idx, H5G_iterate_t op , void* op_data )
{
return( iterateElems( name.c_str(), idx, op, op_data ));
}
CommonFG::~CommonFG()
{ // do nothing
//--------------------------------------------------------------------------
// Function: CommonFG::getNumObjs
///\brief Returns the number of objects in this group.
///\return Number of objects
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
hsize_t CommonFG::getNumObjs() const
{
hsize_t num_objs;
herr_t ret_value = H5Gget_num_objs(getLocId(), &num_objs);
if(ret_value < 0)
{
throwException("getNumObjs", "H5Gget_num_objs failed");
}
return (num_objs);
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjnameByIdx
///\brief Retrieves the name of an object in this group, given the
/// object's index.
///\param idx - IN: Transient index of the object
///\param name - IN/OUT: Retrieved name of the object
///\param size - IN: Length to retrieve
///\return Actual size of the object name or 0, if object has no name
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// The value of idx can be any nonnegative number less than the
/// total number of objects in the group, which is returned by
/// the function \c CommonFG::getNumObjs. Note that this is a
/// transient index; thus, an object may have a different index
/// each time the group is opened.
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, string& name, size_t size) const
{
char* name_C = new char[size];
ssize_t name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, size);
if(name_len < 0)
{
throwException("getObjnameByIdx", "H5Gget_objname_by_idx failed");
}
name = string( name_C );
delete [] name_C;
return (name_len);
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
///\brief Returns the type of an object in this group, given the
/// object's index.
///\param idx - IN: Transient index of the object
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
{
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
if (obj_type == H5G_UNKNOWN)
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
return (obj_type);
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function because it also provides
/// the returned object type in text.
///\param idx - IN: Transient index of the object
///\param type_name - IN: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, string& type_name) const
{
H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
switch (obj_type)
{
case H5G_LINK: type_name = string("symbolic link"); break;
case H5G_GROUP: type_name = string("group"); break;
case H5G_DATASET: type_name = string("dataset"); break;
case H5G_TYPE: type_name = string("datatype"); break;
case H5G_UNKNOWN:
default:
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
}
return (obj_type);
}
//--------------------------------------------------------------------------
// Function: CommonFG default constructor
///\brief Default constructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CommonFG::CommonFG() {}
//--------------------------------------------------------------------------
// Function: CommonFG destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CommonFG::~CommonFG() {}
#ifndef H5_NO_NAMESPACE
}
#endif

View File

@@ -28,102 +28,119 @@ class Group;
class H5File;
class H5_DLLCPP CommonFG {
public:
// Creates a new group at this location which can be a file or another group.
Group createGroup( const string& name, size_t size_hint = 0 ) const;
Group createGroup( const char* name, size_t size_hint = 0 ) const;
// Creates a new group at this location which can be a file
// or another group.
Group createGroup(const char* name, size_t size_hint = 0) const;
Group createGroup(const string& name, size_t size_hint = 0) const;
// Opens an existing group in a location which can be a file or another group
Group openGroup( const string& name ) const;
Group openGroup( const char* name ) const;
// Opens an existing group in a location which can be a file
// or another group.
Group openGroup(const char* name) const;
Group openGroup(const string& name) const;
// Creates a new dataset at this location.
DataSet createDataSet( const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT ) const;
DataSet createDataSet( const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT ) const;
DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
DataSet createDataSet(const string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
// Opens an existing dataset at this location.
DataSet openDataSet( const string& name ) const;
DataSet openDataSet( const char* name ) const;
DataSet openDataSet(const char* name) const;
DataSet openDataSet(const string& name) const;
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id
void link( H5G_link_t link_type, const string& curr_name, const string& new_name ) const;
void link( H5G_link_t link_type, const char* curr_name, const char* new_name ) const;
// Retrieves comment for the HDF5 object specified by its name.
string getComment(const char* name, size_t bufsize) const;
string getComment(const string& name, size_t bufsize) const;
// Removes the specified name at this location.
void unlink( const string& name ) const;
void unlink( const char* name ) const;
// Sets the comment for an HDF5 object specified by its name.
void setComment(const char* name, const char* comment) const;
void setComment(const string& name, const string& comment) const;
// Get id of the location, either group or file - pure virtual so
// the subclass can get the correct id
virtual hid_t getLocId() const = 0;
// Returns the name of the HDF5 object that the symbolic link points to.
string getLinkval(const char* name, size_t size) const;
string getLinkval(const string& name, size_t size) const;
// Renames an object at this location.
void move( const string& src, const string& dst ) const;
void move( const char* src, const char* dst ) const;
// Returns the number of objects in this group.
hsize_t getNumObjs() const;
// Returns information about an HDF5 object, given by its name,
// at this location.
void getObjinfo( const string& name, hbool_t follow_link, H5G_stat_t& statbuf ) const;
void getObjinfo( const char* name, hbool_t follow_link, H5G_stat_t& statbuf ) const;
void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
void getObjinfo(const string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
// Returns the name of the HDF5 object that the symbolic link points to.
string getLinkval( const string& name, size_t size ) const;
string getLinkval( const char* name, size_t size ) const;
// Retrieves the name of an object in this group, given the
// object's index.
ssize_t getObjnameByIdx(hsize_t idx, string& name, size_t size) const;
// Sets the comment for an HDF5 object specified by its name
void setComment( const string& name, const string& comment ) const;
void setComment( const char* name, const char* comment ) const;
// Retrieves comment for the HDF5 object specified by its name
string getComment( const string& name, size_t bufsize ) const;
string getComment( const char* name, size_t bufsize ) const;
// Mounts the file 'child' onto this location
void mount( const string& name, H5File& child, PropList& plist ) const;
void mount( const char* name, H5File& child, PropList& plist) const;
// Unmounts the file named 'name' from this parent location
void unmount( const string& name ) const;
void unmount( const char* name ) const;
// Returns the type of an object in this group, given the
// object's index.
H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
H5G_obj_t getObjTypeByIdx(hsize_t idx, string& type_name) const;
// Iterates over the elements of this group - not implemented in
// C++ style yet
int iterateElems( const string& name, int *idx, H5G_iterate_t op, void *op_data );
int iterateElems( const char* name, int *idx, H5G_iterate_t op, void *op_data );
// C++ style yet.
int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
int iterateElems(const string& name, int *idx, H5G_iterate_t op, void *op_data);
// Opens a generic named datatype in this location
DataType openDataType( const string& name ) const;
DataType openDataType( const char* name ) const;
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id.
void link(H5G_link_t link_type, const char* curr_name, const char* new_name) const;
void link(H5G_link_t link_type, const string& curr_name, const string& new_name) const;
// Opens a named enumeration datatype in this location
EnumType openEnumType( const string& name ) const;
EnumType openEnumType( const char* name ) const;
// Removes the specified name at this location.
void unlink(const char* name) const;
void unlink(const string& name) const;
// Opens a named compound datatype in this location
CompType openCompType( const string& name ) const;
CompType openCompType( const char* name ) const;
// Mounts the file 'child' onto this location.
void mount(const char* name, H5File& child, PropList& plist) const;
void mount(const string& name, H5File& child, PropList& plist) const;
// Opens a named integer datatype in this location
IntType openIntType( const string& name ) const;
IntType openIntType( const char* name ) const;
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
void unmount(const string& name) const;
// Opens a named floating-point datatype in this location
FloatType openFloatType( const string& name ) const;
FloatType openFloatType( const char* name ) const;
// Renames an object at this location.
void move(const char* src, const char* dst) const;
void move(const string& src, const string& dst) const;
// Opens a named string datatype in this location
StrType openStrType( const string& name ) const;
StrType openStrType( const char* name ) const;
// Opens a generic named datatype in this location.
DataType openDataType(const char* name) const;
DataType openDataType(const string& name) const;
// for H5File and Group to throw appropriate exception
virtual void throwException(const string& func_name, const string& msg) const = 0;
// Opens a named enumeration datatype in this location.
EnumType openEnumType(const char* name) const;
EnumType openEnumType(const string& name) const;
// Opens a named compound datatype in this location.
CompType openCompType(const char* name) const;
CompType openCompType(const string& name) const;
// Opens a named integer datatype in this location.
IntType openIntType(const char* name) const;
IntType openIntType(const string& name) const;
// Opens a named floating-point datatype in this location.
FloatType openFloatType(const char* name) const;
FloatType openFloatType(const string& name) const;
// Opens a named string datatype in this location.
StrType openStrType(const char* name) const;
StrType openStrType(const string& name) const;
/// For subclasses, H5File and Group, to return the correct
/// object id, i.e. file or group id.
virtual hid_t getLocId() const = 0;
/// For subclasses, H5File and Group, to throw appropriate exception.
virtual void throwException(const string func_name, const string msg) const = 0;
// Default constructor.
CommonFG();
// Noop destructor.
virtual ~CommonFG();
private:
// Common code for member functions openXxxType
hid_t p_openDataType( const char* name ) const;
hid_t p_open_data_type(const char* name) const;
}; // end of CommonFG declaration

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5Alltypes.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"
@@ -31,19 +33,49 @@
namespace H5 {
#endif
// Creates a new compound datatype
CompType::CompType( size_t size ) : DataType( H5T_COMPOUND, size ) {}
// Creates a compound datatype using an existing id
CompType::CompType( const hid_t existing_id ) : DataType( existing_id ) {}
// Default constructor
//--------------------------------------------------------------------------
// Function: CompType default constructor
///\brief Default constructor: Creates a stub compound datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType() : DataType() {}
// Copy constructor: makes copy of the original CompType object
//--------------------------------------------------------------------------
// Function: CompType copy constructor
///\brief Copy constructor: makes copy of the original CompType object
///\param original - IN: Original CompType instance
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType( const CompType& original ) : DataType( original ) {}
// Gets the compound datatype of the specified dataset - reimplement this
//--------------------------------------------------------------------------
// Function: CompType overloaded constructor
///\brief Creates a CompType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing compound datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType( const hid_t existing_id ) : DataType( existing_id ) {}
//--------------------------------------------------------------------------
// Function: CompType overloaded constructor
///\brief Creates an empty compound datatype given a size, in bytes.
///\param size - IN: Number of bytes in the datatype to create
///\exception H5::DataTypeIException
// Description
// The DataType constructor calls the C API H5Tcreate to create
// the compound datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType( size_t size ) : DataType( H5T_COMPOUND, size ) {}
//--------------------------------------------------------------------------
// Function: CompType overloaded constructor
///\brief Gets the compound datatype of the specified dataset.
///\param dataset - IN: Dataset that this enum datatype associates with
///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType( const DataSet& dataset ) : DataType()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -56,7 +88,13 @@ CompType::CompType( const DataSet& dataset ) : DataType()
}
}
// Retrieves the number of members in this compound datatype.
//--------------------------------------------------------------------------
// Function: CompType::getNmembers
///\brief Returns the number of members in this compound datatype.
///\return Number of members
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int CompType::getNmembers() const
{
int num_members = H5Tget_nmembers( id );
@@ -68,7 +106,14 @@ int CompType::getNmembers() const
return( num_members );
}
// Retrieves the name of a member of this compound datatype.
//--------------------------------------------------------------------------
// Function: CompType::getMemberName
///\brief Returns the name of a member in this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return Name of member
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string CompType::getMemberName( int member_num ) const
{
char* member_name_C = H5Tget_member_name( id, member_num );
@@ -82,20 +127,18 @@ string CompType::getMemberName( int member_num ) const
return( member_name ); // return the member name string
}
/*-------------------------------------------------------------------------
* Function: getMemberIndex
*
* Purpose: Returns the index of a member in a compound data type.
* Members are stored in no particular order with numbers 0
* through N-1, where N is the value returned by the member
* function getNmembers.
*
* Return: Success: index of the member if exists.
* Failure: DataTypeIException
*
* BMR - May 16, 2002
*-------------------------------------------------------------------------
*/
//--------------------------------------------------------------------------
// Function: CompType::getMemberIndex
///\brief Returns the index of a member in this compound datatype.
///\param name - IN: Name of the member
///\return Index of member
///\exception H5::DataTypeIException
///\par Description
/// Members are stored in no particular order with numbers 0
/// through N-1, where N is the value returned by the member
/// function \c CompType::getNmembers.
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int CompType::getMemberIndex(const char* name) const
{
int member_index = H5Tget_member_index(id, name);
@@ -111,29 +154,25 @@ int CompType::getMemberIndex(const string& name) const
return(getMemberIndex(name.c_str()));
}
/*-------------------------------------------------------------------------
* Function: getMemberOffset
*
* Purpose: Returns the byte offset of the beginning of a member with
* respect to the beginning of the compound data type datum.
* Members are stored in no particular order with numbers 0
* through N-1, where N is the value returned by the member
* function getNmembers.
*
* Return: Success: Byte offset.
* Failure: Quincey: for now, 0 is not a failure
*
* BMR - 2000
*-------------------------------------------------------------------------
*/
//--------------------------------------------------------------------------
// Function: CompType::getMemberOffset
///\brief Returns the byte offset of the beginning of a member with
/// respect to the beginning of the compound data type datum.
///\param member_num - IN: Zero-based index of the member
///\return Byte offset
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
// Description
/// Members are stored in no particular order with numbers 0
/// through N-1, where N is the value returned by the member
/// function \c CompType::getNmembers.
//
// Note that byte offset being returned as 0 doesn't indicate
// a failure. (According to Quincey)
//--------------------------------------------------------------------------
size_t CompType::getMemberOffset( int member_num ) const
{
size_t offset = H5Tget_member_offset( id, member_num );
//if( offset == 0 )
//{
//throw DataTypeIException("CompType::getMemberOffset",
//"H5Tget_member_offset failed");
//}
return( offset );
}
@@ -145,7 +184,14 @@ int CompType::getMemberDims( int member_num, size_t* dims, int* perm ) const
// will complain
}
// Gets the type class of the specified member.
//--------------------------------------------------------------------------
// Function: CompType::getMemberClass
///\brief Gets the type class of the specified member.
///\param member_num - IN: Zero-based index of the member
///\return Type class of the member
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t CompType::getMemberClass( int member_num ) const
{
// get the member datatype first
@@ -170,7 +216,7 @@ H5T_class_t CompType::getMemberClass( int member_num ) const
// of the specified member. It provides the id to construct appropriate
// sub-types in the functions getMemberXxxType below, where Xxx indicates
// the sub-types.
hid_t CompType::p_getMemberType( int member_num ) const
hid_t CompType::p_get_member_type(int member_num) const
{
// get the id of the specified member first
hid_t member_type_id = H5Tget_member_type( id, member_num );
@@ -178,82 +224,144 @@ hid_t CompType::p_getMemberType( int member_num ) const
return( member_type_id );
else
{
// p_getMemberType is private, use caller's function name for api
// p_get_member_type is private, use caller's function name for api
throw DataTypeIException("CompType::getMemberDataType",
"H5Tget_member_type failed");
}
}
// Returns the datatype of the specified member in this compound datatype.
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the generic datatype of the specified member in this
/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return DataType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType CompType::getMemberDataType( int member_num ) const
{
DataType datatype( p_getMemberType( member_num ));
return( datatype );
DataType datatype(p_get_member_type(member_num));
return(datatype);
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the enumeration datatype of the specified member in
/// this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return EnumType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType CompType::getMemberEnumType( int member_num ) const
{
EnumType enumtype( p_getMemberType( member_num ));
return( enumtype );
EnumType enumtype(p_get_member_type(member_num));
return(enumtype);
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the compound datatype of the specified member in this
/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType CompType::getMemberCompType( int member_num ) const
{
CompType comptype( p_getMemberType( member_num ));
return( comptype );
CompType comptype(p_get_member_type(member_num));
return(comptype);
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the integer datatype of the specified member in this
/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return IntType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType CompType::getMemberIntType( int member_num ) const
{
IntType inttype( p_getMemberType( member_num ));
return( inttype );
IntType inttype(p_get_member_type(member_num));
return(inttype);
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the floating-point datatype of the specified member
/// in this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return FloatType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType CompType::getMemberFloatType( int member_num ) const
{
FloatType floatype( p_getMemberType( member_num ));
return( floatype );
FloatType floatype(p_get_member_type(member_num));
return(floatype);
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
///\brief Returns the string datatype of the specified member in this
/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return StrType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType CompType::getMemberStrType( int member_num ) const
{
StrType strtype( p_getMemberType( member_num ));
return( strtype );
}
StrType strtype(p_get_member_type(member_num));
return(strtype);
}
/* old style of getMemberType - using overloads; new style above
returns the appropriate datatypes but has different named functions.
In the old style, a datatype must be passed into the function.
May, 2004: These should be reconsidered to provide more convenience.
// Returns the datatype of the specified member in this compound datatype.
// Several overloading of getMemberType are for different datatypes
void CompType::getMemberType( int member_num, EnumType& enumtype ) const
{
p_getMemberType( member_num, enumtype );
p_get_member_type(member_num, enumtype);
}
void CompType::getMemberType( int member_num, CompType& comptype ) const
{
p_getMemberType( member_num, comptype );
p_get_member_type(member_num, comptype);
}
void CompType::getMemberType( int member_num, IntType& inttype ) const
{
p_getMemberType( member_num, inttype );
p_get_member_type(member_num, inttype);
}
void CompType::getMemberType( int member_num, FloatType& floatype ) const
{
p_getMemberType( member_num, floatype );
p_get_member_type(member_num, floatype);
}
void CompType::getMemberType( int member_num, StrType& strtype ) const
{
p_getMemberType( member_num, strtype );
p_get_member_type(member_num, strtype);
}
// end of overloading of getMemberType
*/
// Adds a new member to a compound datatype
//--------------------------------------------------------------------------
// Function: CompType::insertMember
///\brief Inserts a new member to this compound datatype.
///\param name - IN: Name of the new member
///\param offset - IN: Offset in memory structure of the field to insert
///\param new_member - IN: New member to be inserted
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CompType::insertMember( const string& name, size_t offset, const DataType& new_member ) const
{
// Convert string to C-string
@@ -270,7 +378,12 @@ void CompType::insertMember( const string& name, size_t offset, const DataType&
}
}
// Recursively removes padding from within a compound datatype.
//--------------------------------------------------------------------------
// Function: CompType::pack
///\brief Recursively removes padding from within a compound datatype.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void CompType::pack() const
{
// Calls C routine H5Tpack to remove padding
@@ -281,7 +394,11 @@ void CompType::pack() const
}
}
// This destructor just invokes the base-class' destructor
//--------------------------------------------------------------------------
// Function: CompType destructor
///\brief Properly terminates access to this compound datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::~CompType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -31,11 +31,13 @@ class H5_DLLCPP CompType : public DataType {
// Gets the compound datatype of the specified dataset
CompType( const DataSet& dataset ); // H5Dget_type
// Returns the number of members in this compound datatype.
int getNmembers() const;
// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
// to create another datatype of the same class
H5T_class_t getMemberClass( int member_num ) const;
// Returns the name of a member of this compound datatype.
string getMemberName( int member_num ) const;
// Returns the dimensionality of the specified member.
int getMemberDims( int member_num, size_t* dims, int* perm ) const;
// Returns the index of a member in this compound data type.
int getMemberIndex(const char* name) const;
@@ -44,13 +46,12 @@ class H5_DLLCPP CompType : public DataType {
// Returns the offset of a member of this compound datatype.
size_t getMemberOffset( int memb_no ) const;
// Returns the dimensionality of the specified member.
int getMemberDims( int member_num, size_t* dims, int* perm ) const;
// Returns the name of a member of this compound datatype.
string getMemberName( int member_num ) const;
// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
// to create another datatype of the same class
H5T_class_t getMemberClass( int member_num ) const;
// Returns the compound datatype of the specified member in
// this compound datatype.
CompType getMemberCompType( int member_num ) const;
// Returns the generic datatype of the specified member in
// this compound datatype.
@@ -60,10 +61,6 @@ class H5_DLLCPP CompType : public DataType {
// this compound datatype.
EnumType getMemberEnumType( int member_num ) const;
// Returns the compound datatype of the specified member in
// this compound datatype.
CompType getMemberCompType( int member_num ) const;
// Returns the integer datatype of the specified member in
// this compound datatype.
IntType getMemberIntType( int member_num ) const;
@@ -76,6 +73,9 @@ class H5_DLLCPP CompType : public DataType {
// this compound datatype.
StrType getMemberStrType( int member_num ) const;
// Returns the number of members in this compound datatype.
int getNmembers() const;
// Adds a new member to this compound datatype.
void insertMember( const string& name, size_t offset, const DataType& new_member ) const;
@@ -91,12 +91,13 @@ class H5_DLLCPP CompType : public DataType {
// Copy constructor - makes a copy of original object
CompType( const CompType& original );
// Noop destructor.
virtual ~CompType();
private:
// Contains common code that is used by the member functions
// getMemberXxxType
hid_t p_getMemberType( int member_num ) const;
hid_t p_get_member_type(int member_num) const;
};
#ifndef H5_NO_NAMESPACE
}

View File

@@ -25,8 +25,9 @@
#include "H5Object.h"
#include "H5AbstractDs.h"
#include "H5Attribute.h"
#include "H5DataType.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DxferProp.h"
#include "H5FaccProp.h"
#include "H5FcreatProp.h"
@@ -37,8 +38,9 @@
#include "H5FloatType.h"
#include "H5StrType.h"
#include "H5CompType.h"
#include "H5ArrayType.h"
#include "H5VarLenType.h"
#include "H5DataSet.h"
#include "H5CommonFG.h"
#include "H5Group.h"
#include "H5File.h"
#include "H5Library.h"

90
c++/src/H5CppDoc.h Normal file
View File

@@ -0,0 +1,90 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _H5CPPDOC_H
#define _H5CPPDOC_H
//-------------------------------------------------------------------------
// The following section will be used to generate the 'Mainpage'
// and the 'Examples' for the RM.
// ------------------------------------------------------------------------
/*! \mainpage notitle
*
* \section intro_sec Introduction
*
* The C++ API provides C++ wrappers for the HDF5 C library.
* It is assumed that the user has knowledge of the HDF5 file format
* and its components. If you are not familiar with HDF5 file format,
* and would like to find out more, please refer to the HDF5 documentation
* at http://hdf.ncsa.uiuc.edu/HDF5/doc/H5.intro.html
*
* Because the HDF5 library maps very well to
* the object oriented design approach, classes in the C++ API can
* closely represent the interfaces of the HDF5 APIs, as followed:
*
* \verbatim
HDF5 C APIs C++ Classes
----------- -----------
Attribute Interface (H5A) Attribute
Datasets Interface (H5D) DataSet
Error Interface (H5E) Exception
File Interface (H5F) H5File
Group Interface (H5G) Group
Identifier Interface (H5I) IdComponent
Property List Interface (H5P) PropList and subclasses
Dataspace Interface (H5S) DataSpace
Datatype Interface (H5T) DataType and subclasses
\endverbatim
* \section install_sec Installation
*
* Please refer to the file release_docs/INSTALL_Windows_withcpp.txt
* under the top directory for information about installing, building,
* and testing the C++ API.
*
*
*/
/// This example shows how to create datasets.
///\par
///\example create.cpp
///\par
/// This example shows how to write datasets.
///\example writedata.cpp
///\par
/// This example shows how to read datasets.
///\example readdata.cpp
///\par
/// This example shows how to create a compound datatype,
/// write an array which has the compound datatype to the file,
/// and read back fields' subsets.
///\example compound.cpp
///\par
/// This example shows how to work with extendible datasets.
///\example extend_ds.cpp
///\par
/// This example shows how to read data from a chunked dataset.
///\example chunks.cpp
///\par
/// This example shows how to work with groups.
///\example h5group.cpp
#endif

View File

@@ -28,8 +28,9 @@
#include "H5Object.h"
#include "H5PropList.h"
#include "H5DxferProp.h"
#include "H5DataType.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
#include "H5DataSet.h"
@@ -38,17 +39,36 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: DataSet default constructor
///\brief Default constructor: creates a stub DataSet.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::DataSet() : AbstractDs() {}
// Creates a copy of DataSet using an existing id
DataSet::DataSet( const hid_t dataset_id ) : AbstractDs( dataset_id ) {}
//--------------------------------------------------------------------------
// Function: DataSet overloaded constructor
///\brief Creates an DataSet object using the id of an existing dataset.
///\param existing_id - IN: Id of an existing dataset
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::DataSet(const hid_t existing_id) : AbstractDs(existing_id) {}
// Copy constructor makes a copy of the original object by using base
// class' copy constructors
//--------------------------------------------------------------------------
// Function: DataSet copy constructor
///\brief Copy constructor: makes a copy of the original DataSet object.
///\param original - IN: DataSet instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::DataSet( const DataSet& original ) : AbstractDs( original ) {}
// Gets a copy of the dataspace of this dataset
//--------------------------------------------------------------------------
// Function: DataSet::getSpace
///\brief Gets a copy of the dataspace of this dataset.
///\return DataSpace instance
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace DataSet::getSpace() const
{
// Calls C function H5Dget_space to get the id of the dataspace
@@ -67,7 +87,7 @@ DataSpace DataSet::getSpace() const
// This private member function calls the C API to get the identifier
// of the datatype that is used by this dataset. It is used
// by the various AbstractDs functions to get the specific datatype.
hid_t DataSet::p_getType() const
hid_t DataSet::p_get_type() const
{
hid_t type_id = H5Dget_type( id );
if( type_id > 0 )
@@ -78,7 +98,13 @@ hid_t DataSet::p_getType() const
}
}
// Gets the dataset creation property list
//--------------------------------------------------------------------------
// Function: DataSet::getCreatePlist
///\brief Gets the dataset creation property list.
///\return DSetCreatPropList instance
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList DataSet::getCreatePlist() const
{
hid_t create_plist_id = H5Dget_create_plist( id );
@@ -91,7 +117,13 @@ DSetCreatPropList DataSet::getCreatePlist() const
return( create_plist );
}
// Returns the amount of storage required for a dataset.
//--------------------------------------------------------------------------
// Function: DataSet::getStorageSize
///\brief Returns the amount of storage required for a dataset.
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t DataSet::getStorageSize() const
{
hsize_t storage_size = H5Dget_storage_size( id );
@@ -104,27 +136,75 @@ hsize_t DataSet::getStorageSize() const
}
}
// Returns the number of bytes required to store VL data.
//--------------------------------------------------------------------------
// Function: DataSet::getOffset
///\brief Returns the address of this dataset in the file.
///\return Address of dataset
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
haddr_t DataSet::getOffset() const
{
haddr_t ds_addr; // for address of dataset
ds_addr = H5Dget_offset(id);
if( ds_addr == HADDR_UNDEF )
{
throw DataSetIException("DataSet::getOffset", "H5Dget_offset returned HADDR_UNDEF");
}
return(ds_addr);
}
//--------------------------------------------------------------------------
// Function: DataSet::getSpaceStatus
///\brief Determines whether space has been allocated for a dataset.
///\param status - OUT: Space allocation status
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::getSpaceStatus(H5D_space_status_t& status) const
{
herr_t ret_value = H5Dget_space_status(id, &status);
if( ret_value < 0 )
{
throw DataSetIException("DataSet::getSpaceStatus", "H5Dget_space_status failed");
}
}
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief Returns the number of bytes required to store VL data.
///\return Amount of storage
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
{
// Obtain identifiers for C API
//hid_t type_id = type.getId();
//hid_t space_id = space.getId();
//hsize_t size;
hid_t type_id = type.getId();
hid_t space_id = space.getId();
//herr_t ret_value = H5Dget_vlen_buf_size( id, type_id, space_id, &size );
//if( ret_value >= 0 )
// return( size );
//else
//{
//throw DataSetIException();
//}
throw DataSetIException( "DataSet::getVlenBufSize",
"Currently not implemented yet.");
return (0);
hsize_t size; // for amount of storage
herr_t ret_value = H5Dvlen_get_buf_size( id, type_id, space_id, &size );
if( ret_value < 0 )
{
throw DataSetIException("DataSet::getStorageSize", "H5Dget_storage_size failed");
}
return( size );
}
// Reclaims VL datatype memory buffers.
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
///\brief Reclaims VL datatype memory buffers.
///\param type - IN: Datatype, which is the datatype stored in the buffer
///\param space - IN: Selection for the memory buffer to free the
/// VL datatypes within
///\param xfer_plist - IN: Property list used to create the buffer
///\param buf - IN: Pointer to the buffer to be reclaimed
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList& xfer_plist, void* buf ) const
{
// Obtain identifiers for C API
@@ -139,8 +219,21 @@ void DataSet::vlenReclaim( DataType& type, DataSpace& space, DSetMemXferPropList
}
}
// Reads raw data from the specified dataset into buf, converting from
// file datatype and dataspace to memory datatype and dataspace.
//--------------------------------------------------------------------------
// Function: DataSet::read
///\brief Reads raw data from the specified dataset.
///\param buf - IN: Buffer for read data
///\param mem_type - IN: Memory datatype
///\param mem_space - IN: Memory dataspace
///\param file_space - IN: Dataset's dataspace in the file
///\param xfer_plist - IN: Transfer property list for this I/O operation
///\exception H5::DataSetIException
///\par Description
/// This function reads raw data from this dataset into the
/// buffer \a buf, converting from file datatype and dataspace
/// to memory datatype \a mem_type and dataspace \a mem_space.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
{
// Obtain identifiers for C API
@@ -156,6 +249,12 @@ void DataSet::read( void* buf, const DataType& mem_type, const DataSpace& mem_sp
}
}
//--------------------------------------------------------------------------
// Function: DataSet::read
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c std::string for the buffer.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::read( string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
{
// Allocate C character string for reading
@@ -170,9 +269,22 @@ void DataSet::read( string& strg, const DataType& mem_type, const DataSpace& mem
delete strg_C;
}
// Writes raw data from an application buffer buffer to a dataset,
// converting from memory datatype and dataspace to file datatype
// and dataspace.
//--------------------------------------------------------------------------
// Function: DataSet::write
///\brief Writes raw data from an application buffer to a dataset.
///\param buf - IN: Buffer containing data to be written
///\param mem_type - IN: Memory datatype
///\param mem_space - IN: Memory dataspace
///\param file_space - IN: Dataset's dataspace in the file
///\param xfer_plist - IN: Transfer property list for this I/O operation
///\exception H5::DataSetIException
///\par Description
/// This function writes raw data from an application buffer
/// \a buf to a dataset, converting from memory datatype
/// \a mem_type and dataspace \a mem_space to file datatype
/// and dataspace.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
{
// Obtain identifiers for C API
@@ -188,6 +300,12 @@ void DataSet::write( const void* buf, const DataType& mem_type, const DataSpace&
}
}
//--------------------------------------------------------------------------
// Function: DataSet::write
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c std::string for the buffer.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::write( const string& strg, const DataType& mem_type, const DataSpace& mem_space, const DataSpace& file_space, const DSetMemXferPropList& xfer_plist ) const
{
// Convert string to C-string
@@ -198,7 +316,23 @@ void DataSet::write( const string& strg, const DataType& mem_type, const DataSpa
write(strg_C, mem_type, mem_space, file_space, xfer_plist);
}
// Iterates over all selected elements in a dataspace.
//--------------------------------------------------------------------------
// Function: DataSet::iterateElems
///\brief Iterates over all selected elements in a dataspace.
///\param buf - IN/OUT: Pointer to the buffer in memory containing the
/// elements to iterate over
///\param type - IN: Datatype for the elements stored in \a buf
///\param space - IN: Dataspace for \a buf. Also contains the selection
/// to iterate over.
///\param op - IN: Function pointer to the routine to be called for
/// each element in \a buf iterated over
///\param op_data - IN/OUT: Pointer to any user-defined data associated
/// with the operation
///\exception H5::DataSetIException
///\note This function may not work correctly yet - it's still
/// under development.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data )
{
// Obtain identifiers for C API
@@ -213,7 +347,17 @@ int DataSet::iterateElems( void* buf, const DataType& type, const DataSpace& spa
}
}
// Extends a dataset with unlimited dimension.
//--------------------------------------------------------------------------
// Function: DataSet::extend
///\brief Extends a dataset with unlimited dimension.
///\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:
/// http:
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::extend( const hsize_t* size ) const
{
herr_t ret_value = H5Dextend( id, size );
@@ -223,25 +367,17 @@ void DataSet::extend( const hsize_t* size ) const
}
}
/*--------------------------------------------------------------------------
NAME
fillMemBuf
PURPOSE
Fills a selection in memory with a value
USAGE
fillMemBuf(fill, fill_type, buf, buf_type, space)
fillMemBuf(buf, buf_type, space)
void *buf; IN/OUT: Memory buffer to fill selection within
DataType& buf_type; IN: Datatype of the elements in buffer
DataSpace& space; IN: Dataspace describing memory buffer &
containing selection to use.
const void *fill; IN: Pointer to fill value to use - default NULL
DataType& fill_type; IN: Datatype of the fill value
DESCRIPTION
Use the selection in the dataspace to fill elements in a memory buffer.
COMMENTS, BUGS, ASSUMPTIONS
Second usage uses all zeros as fill value
--------------------------------------------------------------------------*/
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
///\brief Fills a selection in memory with a value.
///\param fill - IN: Pointer to fill value to use - default NULL
///\param fill_type - IN: Datatype of the fill value
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
{
hid_t fill_type_id = fill_type.getId();
@@ -253,6 +389,18 @@ void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataT
throw DataSetIException("DataSet::fillMemBuf", "H5Dfill failed");
}
}
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it only takes the
/// the last three arguments.
///\param buf - IN/OUT: Memory buffer to fill selection within
///\param buf_type - IN: Datatype of the elements in buffer
///\param space - IN: Dataspace describing memory buffer & containing selection to use
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
{
hid_t buf_type_id = buf_type.getId();
@@ -264,8 +412,84 @@ void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
}
}
// This private function calls the C API H5Dclose to close this dataset.
// Used by IdComponent::reset
//--------------------------------------------------------------------------
// Function: DataSet::Reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
///\return A reference
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* DataSet::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
{
return(p_reference(name, dataspace.getId(), ref_type));
}
//--------------------------------------------------------------------------
// Function: DataSet::Reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param name - IN: Name of the object to be referenced
///\return A reference
///\exception H5::ReferenceIException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* DataSet::Reference(const char* name) const
{
return(p_reference(name, -1, H5R_OBJECT));
}
//--------------------------------------------------------------------------
// Function: DataSet::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref_type - IN: Type of reference to query
///\param ref - IN: Reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
// H5G_DATASET Object is a dataset.
// H5G_TYPE Object is a named datatype
// Exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t DataSet::getObjType(void *ref, H5R_type_t ref_type) const
{
return(p_get_obj_type(ref, ref_type));
}
//--------------------------------------------------------------------------
// Function: DataSet::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref_type - IN: Type of reference to get region of - default
/// to H5R_DATASET_REGION
///\param ref - IN: Reference to get region of
///\return DataSpace instance
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace DataSet::getRegion(void *ref, H5R_type_t ref_type) const
{
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSet::p_close (private)
// Purpose: Closes this dataset.
// Exception H5::DataSetIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSet::p_close() const
{
herr_t ret_value = H5Dclose( id );
@@ -274,17 +498,18 @@ void DataSet::p_close() const
throw DataSetIException(0, "H5Dclose failed");
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: DataSet destructor
///\brief Properly terminates access to this dataset.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSet::~DataSet()
{
// The dataset id will be closed properly
try {
resetIdComponent( this ); }
resetIdComponent( this ); }
catch (Exception close_error) { // thrown by p_close
cerr << "DataSet::~DataSet - " << close_error.getDetailMsg() << endl;
}

View File

@@ -24,12 +24,26 @@ namespace H5 {
class H5_DLLCPP DataSet : public AbstractDs {
public:
// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const;
// Extends the dataset with unlimited dimension.
void extend( const hsize_t* size ) const;
// Fills a selection in memory with a value
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
// Fills a selection in memory with zero
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
// Returns the address of this dataset in the file.
haddr_t getOffset() const;
// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const;
// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t& status) const;
// Gets the storage size of this dataset.
hsize_t getStorageSize() const;
@@ -52,28 +66,34 @@ class H5_DLLCPP DataSet : public AbstractDs {
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
int iterateElems( void* buf, const DataType& type, const DataSpace& space, H5D_operator_t op, void* op_data = NULL );
// Extends the dataset with unlimited dimension.
void extend( const hsize_t* size ) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Fills a selection in memory with a value
void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
// Fills a selection in memory with zero
void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a copy of an existing DataSet using its id
// Note: used by CommonFG to return a DataSet; should be modified
// to use friend template function instead)
DataSet( const hid_t dataset_id );
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Used by the API to appropriately close a dataset
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Creates a copy of an existing DataSet using its id.
DataSet(const hid_t existing_id);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close a dataset.
virtual void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
// Default constructor.
DataSet();
// Copy constructor
// Copy constructor.
DataSet( const DataSet& original );
// Destructor: properly terminates access to this dataset.
virtual ~DataSet();
private:
@@ -81,7 +101,7 @@ class H5_DLLCPP DataSet : public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_getType() const;
virtual hid_t p_get_type() const;
};
#ifndef H5_NO_NAMESPACE
}

View File

@@ -20,8 +20,8 @@
#endif
#include "H5Include.h"
#include "H5Exception.h"
#include "H5RefCounter.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5Idtemplates.h"
#include "H5DataSpace.h"
@@ -30,12 +30,20 @@
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for default dataspace.
//--------------------------------------------------------------------------
const DataSpace DataSpace::ALL( H5S_ALL );
// Default constructor
DataSpace::DataSpace() : IdComponent() {}
// This constructor creates a DataSpace instance, given a dataspace type
//--------------------------------------------------------------------------
// Function: DataSpace constructor
///\brief Creates a new dataspace given a dataspace type.
///\param type - IN: Type of the dataspace to be created, which
/// currently can be either \c H5S_SCALAR or \c H5S_SIMPLE;
/// default to \c H5S_SCALAR.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace( H5S_class_t type ) : IdComponent()
{
id = H5Screate( type );
@@ -45,7 +53,15 @@ DataSpace::DataSpace( H5S_class_t type ) : IdComponent()
}
}
// Creates a new simple data space and opens it for access.
//--------------------------------------------------------------------------
// Function: DataSpace overloaded constructor
///\brief Creates a new simple dataspace.
///\param rank - IN: Number of dimensions of dataspace.
///\param dims - IN: An array of the size of each dimension.
///\param maxdims - IN: An array of the maximum size of each dimension.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) : IdComponent()
{
id = H5Screate_simple( rank, dims, maxdims );
@@ -55,51 +71,76 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
}
}
/* Constructor that takes an existing dataspace id
Description:
Uses an HDF5 id to create a DataSpace identifier instance.
This id can be either an existing dataspace id or a default
dataspace id. Design note: in the case of default dataspace,
the identifier still has reference counter; the p_close function
will take care of not to call H5Sclose on the default id.
*/
DataSpace::DataSpace( const hid_t space_id ) : IdComponent( space_id ) {}
//--------------------------------------------------------------------------
// Function: DataSpace overloaded constructor
///\brief Creates a DataSpace object using the id of an existing
/// dataspace.
///\param existing_id - IN: Id of an existing dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace(const hid_t existing_id) : IdComponent(existing_id) {}
// Copy constructor: makes a copy of the original DataSpace instance
//--------------------------------------------------------------------------
// Function: DataSpace copy constructor
///\brief Copy constructor: makes a copy of the original DataSpace object.
///\param original - IN: DataSpace object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace( const DataSpace& original ) : IdComponent( original ) {}
// Makes a copy of an existing dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::copy
///\brief Makes a copy of an existing dataspace.
///\param like_space - IN: Dataspace to be copied
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::copy( const DataSpace& like_space )
{
// reset the identifier of this instance - send 'this' in so that
// reset the identifier of this object - send 'this' in so that
// H5Sclose can be called appropriately
try {
resetIdComponent( this ); }
catch (Exception close_error) { // thrown by p_close
throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
}
try {
resetIdComponent( this ); }
catch (Exception close_error) { // thrown by p_close
throw DataSpaceIException("DataSpace::copy", close_error.getDetailMsg());
}
// call C routine to copy the dataspace
id = H5Scopy( like_space.getId() );
// new ref counter for this id
// new ref counter for this id
ref_count = new RefCounter;
if( id <= 0 )
{
throw DataSpaceIException("DataSpace::copy", "H5Scopy failed");
}
}
// Makes a copy of the dataspace on the right hand side and stores
// the new id in the left hand side object.
//--------------------------------------------------------------------------
// Function: DataSpace::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the existing dataspace
///\return Reference to DataSpace instance
///\exception H5::DataSpaceIException
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace& DataSpace::operator=( const DataSpace& rhs )
{
copy(rhs);
return(*this);
}
// Determines whether this dataspace is a simple dataspace.
//--------------------------------------------------------------------------
// Function: DataSpace::isSimple
///\brief Determines whether this dataspace is a simple dataspace.
///\return \c true if the dataspace is a simple dataspace, and \c false,
/// otherwise
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataSpace::isSimple () const
{
htri_t simple = H5Sis_simple( id );
@@ -114,7 +155,18 @@ bool DataSpace::isSimple () const
}
}
// Sets the offset of this simple dataspace.
//--------------------------------------------------------------------------
// Function: DataSpace::offsetSimple
///\brief Sets the offset of this simple dataspace.
///\param offset - IN: Offset to position the selection at
///\exception H5::DataSpaceIException
///\par Description
/// This function creates an offset for the selection within
/// an extent, allowing the same shaped selection to be moved
/// to different locations within a dataspace without requiring
/// it to be re-defined.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::offsetSimple ( const hssize_t* offset ) const
{
herr_t ret_value = H5Soffset_simple( id, offset );
@@ -124,7 +176,16 @@ void DataSpace::offsetSimple ( const hssize_t* offset ) const
}
}
// Retrieves dataspace dimension size and maximum size
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentDims
///\brief Retrieves dataspace dimension size and maximum size.
///\param dims - IN: Name of the new member
///\param maxdims - IN: Pointer to the value of the new member
///\return Number of dimensions, the same value as returned by
/// \c DataSpace::getSimpleExtentNdims()
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DataSpace::getSimpleExtentDims ( hsize_t *dims, hsize_t *maxdims ) const
{
int ndims = H5Sget_simple_extent_dims( id, dims, maxdims );
@@ -136,7 +197,13 @@ int DataSpace::getSimpleExtentDims ( hsize_t *dims, hsize_t *maxdims ) const
return( ndims );
}
// Determines the dimensionality of a dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentNdims
///\brief Returns the dimensionality of a dataspace.
///\return Number of dimensions
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DataSpace::getSimpleExtentNdims () const
{
int ndims = H5Sget_simple_extent_ndims( id );
@@ -148,10 +215,17 @@ int DataSpace::getSimpleExtentNdims () const
return( ndims );
}
// Determines the number of elements in a dataspace
// 12/05/00: due to C API change
// return type hssize_t vs. hsize_t
// num_elements = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentNpoints
///\brief Returns the number of elements in a dataspace.
///\return Number of elements
///\exception H5::DataSpaceIException
// Modification
// 12/05/00: due to C API change
// return type hssize_t vs. hsize_t
// num_elements = -1 when failure occurs vs. 0
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t DataSpace::getSimpleExtentNpoints () const
{
hssize_t num_elements = H5Sget_simple_extent_npoints( id );
@@ -165,7 +239,13 @@ hssize_t DataSpace::getSimpleExtentNpoints () const
}
}
// Determine the current class of a dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::getSimpleExtentType
///\brief Returns the current class of a dataspace.
///\return Class of the dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5S_class_t DataSpace::getSimpleExtentType () const
{
H5S_class_t class_name = H5Sget_simple_extent_type( id );
@@ -177,7 +257,13 @@ H5S_class_t DataSpace::getSimpleExtentType () const
return( class_name );
}
// Copies the extent of a dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::extentCopy
///\brief Copies the extent of a dataspace.
///\param dest_space - IN: Dataspace to copy from
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::extentCopy ( DataSpace& dest_space ) const
{
hid_t dest_space_id = dest_space.getId();
@@ -188,7 +274,15 @@ void DataSpace::extentCopy ( DataSpace& dest_space ) const
}
}
// Sets or resets the size of an existing dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentSimple
///\brief Sets or resets the size of an existing dataspace.
///\param rank - IN: Rank of the dataspace
///\param current_size - IN: Array containing current size of dataspace
///\param maximum_size - IN: Array containing maximum size of dataspace
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size ) const
{
herr_t ret_value;
@@ -199,7 +293,12 @@ void DataSpace::setExtentSimple( int rank, const hsize_t *current_size, const hs
}
}
// Removes the extent from a dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::setExtentNone
///\brief Removes the extent from a dataspace.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::setExtentNone () const
{
herr_t ret_value = H5Sset_extent_none( id );
@@ -209,7 +308,13 @@ void DataSpace::setExtentNone () const
}
}
// Determines the number of elements in a dataspace selection
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectNpoints
///\brief Returns the number of elements in a dataspace selection.
///\return Number of elements
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t DataSpace::getSelectNpoints () const
{
hssize_t num_elements = H5Sget_select_npoints( id );
@@ -221,7 +326,13 @@ hssize_t DataSpace::getSelectNpoints () const
return( num_elements );
}
// Get number of hyperslab blocks
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectHyperNblocks
///\brief Returns number of hyperslab blocks.
///\return Number of hyperslab blocks
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t DataSpace::getSelectHyperNblocks () const
{
hssize_t num_blocks = H5Sget_select_hyper_nblocks( id );
@@ -233,7 +344,15 @@ hssize_t DataSpace::getSelectHyperNblocks () const
return( num_blocks );
}
// Gets the list of hyperslab blocks currently selected
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectHyperBlocklist
///\brief Gets the list of hyperslab blocks currently selected
///\param startblock - IN: Hyperslab block to start with
///\param numblocks - IN: Number of hyperslab blocks to get
///\param buf - IN: List of hyperslab blocks selected
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const
{
herr_t ret_value;
@@ -245,7 +364,13 @@ void DataSpace::getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks,
}
}
// Gets the number of element points in the current selection
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectElemNpoints
///\brief Returns the number of element points in the current selection.
///\return Number of element points
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t DataSpace::getSelectElemNpoints () const
{
hssize_t num_points = H5Sget_select_elem_npoints( id );
@@ -257,7 +382,19 @@ hssize_t DataSpace::getSelectElemNpoints () const
return( num_points );
}
// Gets the list of element points currently selected
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectElemPointlist
///\brief Gets the list of element points currently selected
///\param startpoint - IN: Element point to start with
///\param numpoints - IN: Number of element points to get
///\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:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElemPointList
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const
{
herr_t ret_value;
@@ -269,7 +406,19 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
}
}
// Gets the bounding box containing the current selection
//--------------------------------------------------------------------------
// Function: DataSpace::getSelectBounds
///\brief Gets the bounding box containing the current selection.
///\param start - IN: Starting coordinates of the bounding box
///\param end - IN: Ending coordinates of the bounding box, i.e.,
/// the coordinates of the diagonally opposite corner
///\exception H5::DataSpaceIException
///\par Description
/// For more information, please refer to the C layer Reference
/// Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const
{
herr_t ret_value = H5Sget_select_bounds( id, start, end );
@@ -280,7 +429,22 @@ void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const
}
}
// Selects array elements to be included in the selection for a dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::H5Sselect_elements
///\brief Selects array elements to be included in the selection for
/// this dataspace.
///\param op - IN: Operator specifying how the new selection is to be
/// combined with the existing selection for the dataspace
///\param num_elements - IN: Number of elements to be selected
///\param coord - IN: A 2-dimensional array of 0-based values
/// 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:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const
{
herr_t ret_value;
@@ -292,7 +456,12 @@ void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, co
}
}
// Selects the entire dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::selectAll
///\brief Selects the entire dataspace.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectAll () const
{
herr_t ret_value = H5Sselect_all( id );
@@ -302,7 +471,12 @@ void DataSpace::selectAll () const
}
}
//Resets the selection region to include no elements
//--------------------------------------------------------------------------
// Function: DataSpace::selectNone
///\brief Resets the selection region to include no elements.
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectNone () const
{
herr_t ret_value = H5Sselect_none( id );
@@ -313,7 +487,15 @@ void DataSpace::selectNone () const
}
}
// Verifies that the selection is within the extent of the dataspace
//--------------------------------------------------------------------------
// Function: DataSpace::selectValid
///\brief Verifies that the selection is within the extent of the
/// dataspace.
///\return \c true if the selection is within the extent of the
/// dataspace, and \c false, otherwise
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataSpace::selectValid () const
{
htri_t ret_value = H5Sselect_valid( id );
@@ -328,7 +510,21 @@ bool DataSpace::selectValid () const
}
}
// Selects a hyperslab region to add to the current selected region
//--------------------------------------------------------------------------
// Function: DataSpace::selectHyperslab
///\brief Selects a hyperslab region to add to the current selected region.
///\param op - IN: Operation to perform on current selection
///\param count - IN: Offset of the start of hyperslab
///\param start - IN: Number of blocks included in the hyperslab
///\param stride - IN: Hyperslab stride
///\param block - IN: Size of block in the hyperslab
///\exception H5::DataSpaceIException
///\par Description
/// For more information, please refer to the C layer Reference
/// Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride, const hsize_t *block ) const
{
herr_t ret_value;
@@ -340,7 +536,16 @@ void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const h
}
}
// Closes the dataspace if it is not a constant
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataSpace::p_close (private)
// Purpose: Closes the dataspace if it is not a constant.
// Exception H5::DataSpaceIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataSpace::p_close() const
{
hid_t space_id = id;
@@ -353,12 +558,13 @@ void DataSpace::p_close() const
}
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: DataSpace destructor
///\brief Properly terminates access to this dataspace.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::~DataSpace()
{
// The dataspace id will be closed properly

View File

@@ -26,22 +26,37 @@ class H5_DLLCPP DataSpace : public IdComponent {
static const DataSpace ALL;
// Creates a dataspace object given the space type
DataSpace( H5S_class_t type ); // H5Screate
DataSpace(H5S_class_t type = H5S_SCALAR);
// Creates a simple dataspace
DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims = NULL); // H5Screate_simple
// Makes copy of an existing dataspace.
void copy( const DataSpace& like_space ); // H5Scopy
DataSpace(int rank, const hsize_t * dims, const hsize_t * maxdims = NULL);
// Assignment operator
DataSpace& operator=( const DataSpace& rhs );
// Determines if this dataspace is a simple one.
bool isSimple() const;
// Makes copy of an existing dataspace.
void copy(const DataSpace& like_space);
// Sets the offset of this simple dataspace.
void offsetSimple( const hssize_t* offset ) const;
// Copies the extent of this dataspace.
void extentCopy( DataSpace& dest_space ) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hssize_t* start, hssize_t* end ) const;
// Gets the number of element points in the current selection.
hssize_t getSelectElemNpoints() const;
// Retrieves the list of element points currently selected.
void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
// Gets the list of hyperslab blocks currently selected.
void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
// Get number of hyperslab blocks.
hssize_t getSelectHyperNblocks() const;
// Gets the number of elements in this dataspace selection.
hssize_t getSelectNpoints() const;
// Retrieves dataspace dimension size and maximum size.
int getSimpleExtentDims( hsize_t *dims, hsize_t *maxdims = NULL ) const;
@@ -56,39 +71,21 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Gets the current class of this dataspace.
H5S_class_t getSimpleExtentType() const;
// Copies the extent of this dataspace.
void extentCopy( DataSpace& dest_space ) const;
// Determines if this dataspace is a simple one.
bool isSimple() const;
// Sets or resets the size of this dataspace.
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
// Sets the offset of this simple dataspace.
void offsetSimple( const hssize_t* offset ) const;
// Removes the extent from this dataspace.
void setExtentNone() const;
// Gets the number of elements in this dataspace selection.
hssize_t getSelectNpoints() const;
// Get number of hyperslab blocks.
hssize_t getSelectHyperNblocks() const;
// Gets the list of hyperslab blocks currently selected.
void getSelectHyperBlocklist( hsize_t startblock, hsize_t numblocks, hsize_t *buf ) const;
// Gets the number of element points in the current selection.
hssize_t getSelectElemNpoints() const;
// Retrieves the list of element points currently selected.
void getSelectElemPointlist( hsize_t startpoint, hsize_t numpoints, hsize_t *buf ) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hssize_t* start, hssize_t* end ) const;
// Selects the entire dataspace.
void selectAll() const;
// Selects array elements to be included in the selection for
// this dataspace.
void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const;
// Selects the entire dataspace.
void selectAll() const;
// Selects a hyperslab region to add to the current selected region.
void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
// Resets the selection region to include no elements.
void selectNone() const;
@@ -96,22 +93,24 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Verifies that the selection is within the extent of the dataspace.
bool selectValid() const;
// Selects a hyperslab region to add to the current selected region.
void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
// Removes the extent from this dataspace.
void setExtentNone() const;
// Uses an existing dataspace identifier to make a DataSpace object
// or uses a default id to create a default dataspace object
DataSpace( const hid_t space_id );
// Sets or resets the size of this dataspace.
void setExtentSimple( int rank, const hsize_t *current_size, const hsize_t *maximum_size = NULL ) const;
// Used by the API to close the dataspace
void p_close() const;
// Default constructor
DataSpace();
// Creates a DataSpace object using an existing dataspace id.
DataSpace(const hid_t space_id);
// Copy constructor: makes a copy of the original DataSpace object.
DataSpace( const DataSpace& original );
DataSpace(const DataSpace& original);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to close the dataspace
void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor: properly terminates access to this dataspace.
virtual ~DataSpace();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -25,7 +25,10 @@
#include "H5IdComponent.h"
#include "H5Idtemplates.h"
#include "H5PropList.h"
#include "H5DataSpace.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5PredType.h"
@@ -35,14 +38,31 @@
namespace H5 {
#endif
// Constructor creates a copy of an existing DataType using its id.
// 'predefined' is default to false; when a default datatype is
// created, this argument is set to true so H5Tclose will not be
// called on it later.
DataType::DataType( const hid_t existing_id, bool predefined ) : H5Object( existing_id ), is_predtype( predefined ) {
}
//--------------------------------------------------------------------------
// Function: DataType overloaded constructor
///\brief Creates a datatype using an existing datatype's id
///\param existing_id - IN: Id of the existing datatype
///\param predefined - IN: Indicates whether or not this datatype is
/// a predefined datatype; default to \c false
// Description
// Constructor creates a copy of an existing DataType using
// its id. The argument "predefined" is default to false;
// when a default datatype is created, this argument is set
// to true so H5Tclose will not be called on it later. - need
// a reassessment after changing to the new ref counting mech.
// - BMR 5/2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing_id), is_predtype(predefined) {}
// Creates a datatype given its class and size
//--------------------------------------------------------------------------
// Function: DataType overloaded constructor
///\brief Creates a object given its class and size
///\param type_class - IN: Class of datatype to create
///\param size - IN: Number of bytes in the datatype to create
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is_predtype( false )
{
// Call C routine to create the new datatype
@@ -53,18 +73,30 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is
}
}
// Default constructor
DataType::DataType() : H5Object(), is_predtype( false )
{
}
//--------------------------------------------------------------------------
// Function: DataType default constructor
///\brief Default constructor: Creates a stub datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType() : H5Object(), is_predtype( false ) {}
// Copy constructor: makes a copy of this DataType object.
DataType::DataType( const DataType& original ) : H5Object( original )
//--------------------------------------------------------------------------
// Function: DataType copy constructor
///\brief Copy constructor: makes a copy of the original DataType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType(const DataType& original) : H5Object(original)
{
is_predtype = original.is_predtype; // copy data member from original
}
// Copies an existing datatype to this datatype object
//--------------------------------------------------------------------------
// Function: DataType::copy
///\brief Copies an existing datatype to this datatype object
///\param like_type - IN: Datatype to be copied
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::copy( const DataType& like_type )
{
// reset the identifier of this instance, H5Tclose will be called
@@ -87,15 +119,32 @@ void DataType::copy( const DataType& like_type )
}
}
// Makes a copy of the type on the right hand side and stores the new
// id in the left hand side object.
//--------------------------------------------------------------------------
// Function: DataType::operator=
///\brief Assignment operator
///\param rhs - IN: Reference to the existing datatype
///\return Reference to DataType instance
///\exception H5::DataTypeIException
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType& DataType::operator=( const DataType& rhs )
{
copy(rhs);
return(*this);
}
// Determines whether two datatypes refer to the same actual datatype.
//--------------------------------------------------------------------------
// Function: DataType::operator==
///\brief Compares this DataType against the given one to determines
/// whether the two objects refer to the same actual datatype.
///\param compared_type - IN: Reference to the datatype to compare
///\return true if the datatypes are equal, and false, otherwise.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataType::operator==(const DataType& compared_type ) const
{
// Call C routine H5Tequal to determines whether two datatype
@@ -112,27 +161,19 @@ bool DataType::operator==(const DataType& compared_type ) const
}
}
// Operates a user's function on each attribute of an object - commented
// out because it should use the one from H5Object; need to check
// the parameter list??? - work in progress
//int DataType::iterate( unsigned * idx, H5A_operator_t op, void *op_data )
//{
//}
// Creates a new variable-length datatype - Note: should use inheritance -
// work in progress
//DataType DataType::vlenCreate( const DataType& base_type )
//{
//}
//--------------------------------------------------------------------------
// Function: DataType::commit
///\brief Commits a transient datatype to a file, creating a new
/// named datatype
///\param loc - IN: Either a file or a group
///\param name - IN: Name of the datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
// Commits a transient datatype to a file, creating a new named datatype
void DataType::commit( H5Object& loc, const string& name ) const
void DataType::commit( CommonFG& loc, const char* name ) const
{
commit( loc, name.c_str() );
}
void DataType::commit( H5Object& loc, const char* name ) const
{
hid_t loc_id = loc.getId(); // get location id for C API
hid_t loc_id = loc.getLocId(); // get location id for C API
// Call C routine to commit the transient datatype
herr_t ret_value = H5Tcommit( loc_id, name, id );
@@ -141,8 +182,26 @@ void DataType::commit( H5Object& loc, const char* name ) const
throw DataTypeIException("DataType::commit", "H5Tcommit failed");
}
}
//--------------------------------------------------------------------------
// Function: DataType::commit
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::commit( CommonFG& loc, const string& name ) const
{
commit( loc, name.c_str() );
}
// Determines whether a datatype is a named type or a transient type.
//--------------------------------------------------------------------------
// Function: DataType::committed
///\brief Determines whether a datatype is a named type or a
/// transient type.
///\return true if the datatype is a named type, and false, otherwise.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataType::committed() const
{
// Call C function to determine if a datatype is a named one
@@ -157,7 +216,16 @@ bool DataType::committed() const
}
}
// Finds a conversion function.
//--------------------------------------------------------------------------
// Function: DataType::find
///\brief Finds a conversion function that can handle a conversion
/// from this datatype to the specified datatype, \a dest.
///\param dest - IN: Destination datatype
///\param pcdata - IN: Pointer to type conversion data
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
{
// Call C routine to find the conversion function
@@ -169,7 +237,19 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
return( func );
}
// Converts data from between specified datatypes.
//--------------------------------------------------------------------------
// Function: DataType::convert
///\brief Converts data from this datatype to the specified datatypes.
///\param dest - IN: Destination datatype
///\param nelmts - IN: Size of array \a buf
///\param buf - IN/OUT: Array containing pre- and post-conversion
/// values
///\param background - IN: Optional backgroud buffer
///\param plist - IN: Dataset transfer property list
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const
{
// Get identifiers for C API
@@ -203,7 +283,19 @@ H5T_overflow_t DataType::getOverflow(void) const
// NULL can be returned as well
}
// Locks a datatype.
//--------------------------------------------------------------------------
// Function: DataType::lock
///\brief Locks a datatype, making it read-only and non-destructible.
///\exception H5::DataTypeIException
///\par Descrition
/// This is normally done by the library for predefined data
/// types so the application doesn't inadvertently change or
/// delete a predefined type.
///
/// Once a data type is locked it can never be unlocked unless
/// the entire library is closed.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::lock() const
{
// Call C routine to lock the datatype
@@ -214,7 +306,13 @@ void DataType::lock() const
}
}
// Returns the datatype class identifier.
//--------------------------------------------------------------------------
// Function: DataType::getClass
///\brief Returns the datatype class identifier.
///\return Datatype class identifier
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t DataType::getClass() const
{
H5T_class_t type_class = H5Tget_class( id );
@@ -228,7 +326,13 @@ H5T_class_t DataType::getClass() const
return( type_class );
}
// Returns the size of a datatype.
//--------------------------------------------------------------------------
// Function: DataType::getSize
///\brief Returns the size of a datatype.
///\return Datatype size in bytes
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t DataType::getSize() const
{
// Call C routine to get the datatype size
@@ -241,8 +345,13 @@ size_t DataType::getSize() const
return( type_size );
}
// Returns the base datatype from which a datatype is derived.
// - just for DataType?
//--------------------------------------------------------------------------
// Function: DataType::getSuper
///\brief Returns the base datatype from which a datatype is derived.
///\return DataType object
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType DataType::getSuper() const
{
// Call C routine to get the base datatype from which the specified
@@ -262,11 +371,22 @@ DataType DataType::getSuper() const
}
}
// Registers the specified conversion function.
void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
{
registerFunc( pers, name.c_str(), dest, func );
}
//--------------------------------------------------------------------------
// Function: DataType::registerFunc
///\brief Registers the specified conversion function.
///\param pers - IN: Conversion option
/// \li \c H5T_PERS_HARD for hard conversion functions
/// \li \c H5T_PERS_SOFT for soft conversion functions.
///\param name - IN: Name displayed in diagnostic output.
///\param dest - IN: Destination datatype.
///\param func - IN: Function to convert between source and
/// destination datatypes.
///\exception H5::DataTypeIException
///\par Description
/// For more information, please see:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
{
hid_t dest_id = dest.getId(); // get id of the destination datatype
@@ -278,12 +398,31 @@ void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType&
throw DataTypeIException("DataType::registerFunc", "H5Tregister failed");
}
}
// Removes a conversion function from all conversion paths.
void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
//--------------------------------------------------------------------------
// Function: DataType::registerFunc
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
{
unregister( pers, name.c_str(), dest, func );
registerFunc( pers, name.c_str(), dest, func );
}
//--------------------------------------------------------------------------
// Function: DataType::unregister
///\brief Removes a conversion function from all conversion paths.
///\param pers - IN: Conversion option
/// \li \c H5T_PERS_HARD for hard conversion functions
/// \li \c H5T_PERS_SOFT for soft conversion functions.
///\param name - IN: Name displayed in diagnostic output.
///\param dest - IN: Destination datatype.
///\param func - IN: Function to convert between source and
/// destination datatypes.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
{
hid_t dest_id = dest.getId(); // get id of the dest datatype for C API
@@ -295,12 +434,26 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de
throw DataTypeIException("DataType::unregister", "H5Tunregister failed");
}
}
// Tags an opaque datatype.
void DataType::setTag( const string& tag ) const
//--------------------------------------------------------------------------
// Function: DataType::unregister
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
{
setTag( tag.c_str());
unregister( pers, name.c_str(), dest, func );
}
//--------------------------------------------------------------------------
// Function: DataType::setTag
///\brief Tags an opaque datatype.
///\param tag - IN: Descriptive ASCII string with which the opaque
/// datatype is to be tagged.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::setTag( const char* tag ) const
{
// Call C routine H5Tset_tag to tag an opaque datatype.
@@ -310,8 +463,25 @@ void DataType::setTag( const char* tag ) const
throw DataTypeIException("DataType::setTag", "H5Tset_tag failed");
}
}
//--------------------------------------------------------------------------
// Function: DataType::setTag
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::setTag( const string& tag ) const
{
setTag( tag.c_str());
}
// Gets the tag associated with an opaque datatype.
//--------------------------------------------------------------------------
// Function: DataType::getTag
///\brief Gets the tag associated with an opaque datatype.
///\return Tag associated with the opaque datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string DataType::getTag() const
{
char* tag_Cstr = H5Tget_tag( id );
@@ -331,8 +501,128 @@ string DataType::getTag() const
}
}
// This private function calls the C API H5Tclose to close this datatype.
// Used by H5Object::p_reset.
//--------------------------------------------------------------------------
// Function: DataType::detectClass
///\brief Checks whether a datatype contains (or is) a certain type of
/// datatype.
///\return true if this datatype contains or is the specified type,
/// and false, otherwise.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::detectClass(H5T_class_t cls) const
{
htri_t ret_value = H5Tdetect_class(id, cls);
if( ret_value > 0 )
return true;
else if( ret_value == 0 )
return false;
else
{
throw DataTypeIException("DataType::detectClass",
"H5Tdetect_class returns negative value");
}
}
//--------------------------------------------------------------------------
// Function: DataType::isVariableStr
///\brief Check whether this datatype is a variable-length string.
///\return true if this datatype is a variable-length string, and
/// false, otherwise.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::isVariableStr() const
{
htri_t is_varlen_str = H5Tis_variable_str(id);
if( is_varlen_str == 1 )
return true;
else if( is_varlen_str == 0 )
return false;
else
{
throw DataTypeIException("DataType::isVariableStr",
"H5Tis_variable_str returns negative value");
}
}
//--------------------------------------------------------------------------
// Function: DataType::Reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
///\return A reference
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* DataType::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
{
return(p_reference(name, dataspace.getId(), ref_type));
}
//--------------------------------------------------------------------------
// Function: DataType::Reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param name - IN: Name of the object to be referenced
///\return A reference
///\exception H5::ReferenceIException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* DataType::Reference(const char* name) const
{
return(p_reference(name, -1, H5R_OBJECT));
}
//--------------------------------------------------------------------------
// Function: DataType::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query
///\return Object type, which can be one of the following:
/// \li \c H5G_LINK Object is a symbolic link.
/// \li \c H5G_GROUP Object is a group.
/// \li \c H5G_DATASET Object is a dataset.
/// \li \c H5G_TYPE Object is a named datatype
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t DataType::getObjType(void *ref, H5R_type_t ref_type) const
{
return(p_get_obj_type(ref, ref_type));
}
//--------------------------------------------------------------------------
// Function: DataType::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace DataType::getRegion(void *ref, H5R_type_t ref_type) const
{
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: DataType::p_close (private)
// Purpose: Closes the datatype if it is not a predefined type.
// Exception H5::DataTypeIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::p_close() const
{
// If this datatype is not a predefined type, call H5Tclose on it.
@@ -345,12 +635,13 @@ void DataType::p_close() const
}
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: DataType destructor
///\brief Properly terminates access to this datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::~DataType()
{
// The datatype id will be closed properly

View File

@@ -25,45 +25,36 @@ class H5_DLLCPP DataType : public H5Object {
// Creates a datatype given its class and size
DataType( const H5T_class_t type_class, size_t size );
// Copy constructor: makes a copy of the original object
DataType( const DataType& original );
// Copies an existing datatype to this datatype object
void copy( const DataType& like_type );
// Returns the datatype class identifier.
H5T_class_t getClass() const;
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
void commit( H5Object& loc, const string& name ) const;
void commit( H5Object& loc, const char* name ) const;
void commit( CommonFG& loc, const char* name ) const;
void commit( CommonFG& loc, const string& name ) const;
// Determines whether this datatype is a named datatype or
// a transient datatype.
bool committed() const;
// Converts data from between specified datatypes.
void convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const;
// Checks whether this datatype contains (or is) a certain type class.
bool detectClass(H5T_class_t cls) const;
// Finds a conversion function that can handle the conversion
// this datatype to the given datatype, dest.
H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const;
// Converts data from between specified datatypes.
void convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const;
// Sets the overflow handler to a specified function.
void setOverflow(H5T_overflow_t func) const;
// Returns the datatype class identifier.
H5T_class_t getClass() const;
// Returns a pointer to the current global overflow function.
H5T_overflow_t getOverflow(void) const;
// Assignment operator
DataType& operator=( const DataType& rhs );
// Determines whether two datatypes are the same.
bool operator==(const DataType& compared_type ) const;
// Locks a datatype.
void lock() const;
// Sets the overflow handler to a specified function.
void setOverflow(H5T_overflow_t func) const;
// Returns the size of a datatype.
size_t getSize() const;
@@ -72,6 +63,25 @@ class H5_DLLCPP DataType : public H5Object {
// Note: not quite right for specific types yet???
DataType getSuper() const;
// Gets the tag associated with an opaque datatype.
string getTag() const;
// Tags an opaque datatype.
void setTag( const string& tag ) const;
void setTag( const char* tag ) const;
// Checks whether this datatype is a variable-length string.
bool isVariableStr() const;
// Locks a datatype.
void lock() const;
// Assignment operator
DataType& operator=( const DataType& rhs );
// Determines whether two datatypes are the same.
bool operator==(const DataType& compared_type ) const;
// Registers a conversion function.
void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
@@ -80,19 +90,18 @@ class H5_DLLCPP DataType : public H5Object {
void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
// Tags an opaque datatype.
void setTag( const string& tag ) const;
void setTag( const char* tag ) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Gets the tag associated with an opaque datatype.
string getTag() const;
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a new variable-length datatype - not implemented yet
// Will be moved into a subclass when completed
//DataType vlenCreate( const DataType& base_type );
// Used by the API to appropriately close a datatype
void p_close() const;
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Creates a copy of an existing DataType using its id
DataType( const hid_t type_id, bool predtype = false );
@@ -100,6 +109,15 @@ class H5_DLLCPP DataType : public H5Object {
// Default constructor
DataType();
// Copy constructor: makes a copy of the original object
DataType( const DataType& original );
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close a datatype
void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor: properly terminates access to this datatype.
virtual ~DataType();
protected:

View File

@@ -20,22 +20,57 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DataType.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for dataset creation default property
//--------------------------------------------------------------------------
const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_DEFAULT );
// Creates a dataset creation property list
//--------------------------------------------------------------------------
// Function: DSetCreatPropList default constructor
///\brief Default constructor: creates a stub dataset creation property list
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {}
// Copy constructor: makes a copy of the original DSetCreatPropList object;
//--------------------------------------------------------------------------
// Function: DSetCreatPropList copy constructor
///\brief Copy constructor: makes a copy of the original
/// DSetCreatPropList object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {}
// Sets the size of the chunks used to store a chunked layout dataset.
//--------------------------------------------------------------------------
// Function: DSetCreatPropList overloaded constructor
///\brief Creates a DSetCreatPropList object using the id of an
/// existing dataset creation property list.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList( plist_id ) {}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setChunk
///\brief Sets the size of the chunks used to store a chunked layout
/// dataset.
///\param ndims - IN: Number of dimensions of each chunk
///\param dim - IN: Array containing the size of each chunk
///\exception H5::PropListIException
///\par Description
/// The \a ndims parameter currently must have the same value as
/// the rank of the dataset. The values of the \a dim array
/// define the size of the chunks to store the dataset's raw
/// data. As a side-effect, the layout of the dataset will be
/// changed to \c H5D_CHUNKED, if it is not so already.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
{
herr_t ret_value = H5Pset_chunk( id, ndims, dim );
@@ -45,20 +80,15 @@ void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
}
}
// Gets the layout of the raw data storage of the data that uses this
// property list
H5D_layout_t DSetCreatPropList::getLayout() const
{
H5D_layout_t layout = H5Pget_layout( id );
if( layout == H5D_LAYOUT_ERROR )
{
throw PropListIException("DSetCreatPropList::getLayout",
"H5Pget_layout returns H5D_LAYOUT_ERROR");
}
return( layout );
}
// Retrieves the size of the chunks used to store a chunked layout dataset.
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getChunk
///\brief Retrieves the size of the chunks used to store a chunked
/// layout dataset.
///\param max_ndims - IN: Size of \a dim array
///\param dim - OUT: Array to store the chunk dimensions
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
{
int chunk_size = H5Pget_chunk( id, max_ndims, dim );
@@ -70,8 +100,17 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
return( chunk_size );
}
// Sets the type of storage used store the raw data for a dataset.
void DSetCreatPropList::setLayout(hid_t plist, H5D_layout_t layout ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setLayout
///\brief Sets the type of storage used store the raw data for a dataset.
///\param layout - IN: Type of storage layout for raw data
///\exception H5::PropListIException
///\par Description
/// For information on setting layout type, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setLayout(H5D_layout_t layout) const
{
herr_t ret_value = H5Pset_layout( id, layout );
if( ret_value < 0 )
@@ -81,7 +120,45 @@ void DSetCreatPropList::setLayout(hid_t plist, H5D_layout_t layout ) const
}
}
// Sets compression method and compression level
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getLayout
///\brief Retrieves the layout type of this property list
///\return Layout type, which can be:
/// \li \c H5D_COMPACT - raw data is stored in the object
/// header in the file.
/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the
/// object header in one contiguous chunk in
/// the file.
/// \li \c H5D_CHUNKED - raw data is stored separately from the
/// object header in chunks in separate locations
/// in the file.
///\exception H5::PropListIException
///\par Description
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_layout_t DSetCreatPropList::getLayout() const
{
H5D_layout_t layout = H5Pget_layout( id );
if( layout == H5D_LAYOUT_ERROR )
{
throw PropListIException("DSetCreatPropList::getLayout",
"H5Pget_layout returns H5D_LAYOUT_ERROR");
}
return( layout );
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setDeflate
///\brief Sets compression method and compression level
///\param level - IN: Compression level, should [0..9], inclusive
///\exception H5::PropListIException
///\par Description
/// The function sets the compression method for this property
/// list to \c H5D_COMPRESS_DEFLATE and the compression level to
/// \a level. Lower compression levels are faster but result in
/// less compression.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setDeflate( int level ) const
{
herr_t ret_value = H5Pset_deflate( id, level );
@@ -92,8 +169,25 @@ void DSetCreatPropList::setDeflate( int level ) const
}
}
// Sets a dataset fill value
void DSetCreatPropList::setFillValue( DataType& fvalue_type, const void* value ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFillValue
///\brief Sets a dataset fill value
///\param fvalue_type - IN: Data type for the value passed via \a value
///\param value - IN: Pointer to buffer containing the fill value
///\exception H5::PropListIException
///\par Description
/// The datatype may differ from that of the dataset, but it must
/// be one that the HDF5 library is able to convert \a value to
/// the dataset datatype when the dataset is created.
/// The default fill value is 0 (zero,) which is interpreted
/// according to the actual dataset datatype.
///\par
/// For information on setting fill value, please refer to the
/// C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* value ) const
{
herr_t ret_value = H5Pset_fill_value( id, fvalue_type.getId(), value );
if( ret_value < 0 )
@@ -103,8 +197,20 @@ void DSetCreatPropList::setFillValue( DataType& fvalue_type, const void* value )
}
}
// Retrieves a dataset fill value
void DSetCreatPropList::getFillValue( DataType& fvalue_type, void* value ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getFillValue
///\brief Retrieves a dataset fill value
///\param fvalue_type - IN: Data type for the value passed via \a value
///\param value - OUT: Pointer to buffer to hold the retrieved fill value
///\exception H5::PropListIException
///\par Description
/// The fill value is returned through \a value pointer
/// and the memory is allocated by the caller. The fill
/// value will be converted from its current data type to the
/// specified by \a fvalue_type.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value ) const
{
herr_t ret_value = H5Pget_fill_value( id, fvalue_type.getId(), value );
if( ret_value < 0 )
@@ -114,10 +220,52 @@ void DSetCreatPropList::getFillValue( DataType& fvalue_type, void* value ) const
}
}
// Adds a filter to the filter pipeline
void DSetCreatPropList::setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::isFillValueDefined
///\brief Check if fill value has been defined for this property
///\return
/// \li \c H5D_FILL_VALUE_UNDEFINED =0,
/// \li \c H5D_FILL_VALUE_DEFAULT =1,
/// \li \c H5D_FILL_VALUE_USER_DEFINED =2
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
{
herr_t ret_value = H5Pset_filter( id, filter, flags, cd_nelmts, cd_values );
H5D_fill_value_t status;
herr_t ret_value = H5Pfill_value_defined(id, &status);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::isFillValueDefined",
"H5Pfill_value_defined returned H5D_FILL_VALUE_ERROR (-1)");
}
else
return (status);
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFilter
///\brief Adds a filter to the filter pipeline
///\param filter_id - IN: Filter to add
///\param flags - IN: Specifies general properties of the filter
///\param cd_nelmts - IN: Number of elements in cd_values
///\param cd_values - IN: Auxiliary data for the filter
///\exception H5::PropListIException
///\par Description
/// The \a flags argument is a bit vector of the field:
/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
/// If this bit is set then the filter is optional. If the filter
/// fails during a \c DataSet::write() operation then the filter
/// is just excluded from the pipeline for the chunk for which it
/// failed; the filter will not participate in the pipeline
/// during a \c DataSet::read() of the chunk. If this bit is clear
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const
{
herr_t ret_value = H5Pset_filter( id, filter_id, flags, cd_nelmts, cd_values );
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::setFilter",
@@ -125,7 +273,33 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter, unsigned int flags, size
}
}
// Returns the number of filters in the pipeline
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::removeFilter
///\brief Removes one or more filters
///\param filter_id - IN: Filter to remove
///\exception H5::PropListIException
///\par Description
/// Deletes a filter from the dataset creation property list;
/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
{
herr_t ret_value = H5Premove_filter( id, filter_id);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::removeFilter",
"H5Premove_filter failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getNfilters
///\brief Returns the number of filters in the pipeline
///\return Number of filters
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getNfilters() const
{
int num_filters = H5Pget_nfilters( id );
@@ -138,22 +312,262 @@ int DSetCreatPropList::getNfilters() const
return( num_filters );
}
// Returns information about a filter in a pipeline
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getFilter
///\brief Returns information about a filter in a pipeline
///\param filter_number - IN: Filter to get, range [0..N-1], where
/// N is returned by H5Pget_nfilters()
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
/// of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
///\param namelen - OUT: Length of \a name
///\param name - OUT: Name of the filter
///\return Filter id
///\exception H5::PropListIException
///\par Description
/// Failure occurs when \a filter_number is out of range.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[] ) const
{
H5Z_filter_t filter;
filter = H5Pget_filter( id, filter_number, &flags, &cd_nelmts,
cd_values, namelen, name );
if( filter == H5Z_FILTER_ERROR )
H5Z_filter_t filter_id;
filter_id = H5Pget_filter(id, filter_number, &flags, &cd_nelmts,
cd_values, namelen, name);
if (filter_id == H5Z_FILTER_ERROR)
{
throw PropListIException("DSetCreatPropList::getFilter",
"H5Pget_filter returned H5Z_FILTER_ERROR");
}
else
return( filter );
return(filter_id);
}
// Adds an external file to the list of external files
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getFilterById
///\brief Returns information about a filter in a pipeline given the
/// filter id
///\param filter_id - IN: Filter to get
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
/// of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
///\param namelen - IN: Length of \a name
///\param name - OUT: Name of the filter
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[]) const
{
herr_t ret_value = H5Pget_filter_by_id(id, filter_id, &flags, &cd_nelmts,
cd_values, namelen, name );
if (ret_value < 0)
{
throw PropListIException("DSetCreatPropList::getFilterById",
"H5Pget_filter_by_id failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::modifyFilter
///\brief Modifies the specified filter
///\param filter_id - IN: Filter to get
///\param flags - OUT: General properties of the filter
///\param cd_nelmts - IN: Number of elements in \a cd_values
/// \n OUT: Number of values defined by the filter
///\param cd_values - OUT: Array to hold the data; allocated by the user
///\exception H5::PropListIException
///\par Description
/// The \a flags argument is a bit vector of the field:
/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
/// If this bit is set then the filter is optional. If the filter
/// fails during a DataSet::write() operation then the filter
/// is just excluded from the pipeline for the chunk for which it
/// failed; the filter will not participate in the pipeline
/// during a DataSet::read() of the chunk. If this bit is clear
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const
{
herr_t ret_value = H5Pmodify_filter(id, filter_id, flags, cd_nelmts, cd_values);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::modifyFilter",
"H5Pmodify_filter failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::allFiltersAvail
///\brief Queries whether all the filters set in this property list
/// are available currently.
///\return true if all filters available, and false if one or more
/// filters not currently available
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DSetCreatPropList::allFiltersAvail()
{
htri_t ret_value = H5Pall_filters_avail(id);
if( ret_value > 0 )
return true;
else if( ret_value == 0 )
return false;
else // Raise exception when H5Pall_filters_avail returns a negative value
{
throw PropListIException("DSetCreatPropList::allFiltersAvail", "H5Pall_filters_avail returned negative value");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setShuffle
///\brief Sets method of the shuffle filter
///\exception H5::PropListIException
///\par Description
/// Please refer to the Reference Manual of \c H5Pset_shuffle for
/// details.
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setShuffle()
{
herr_t ret_value = H5Pset_shuffle(id);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::setShuffle",
"H5Pset_shuffle failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getAllocTime
///\brief Get space allocation time for this property.
///\return Space allocation time.
///\exception H5::PropListIException
///\par Description
/// The values of space allocation time can be one of the
/// followings:
/// \li \c H5D_ALLOC_TIME_DEFAULT
/// \li \c H5D_ALLOC_TIME_EARLY
/// \li \c H5D_ALLOC_TIME_LATE
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_alloc_time_t DSetCreatPropList::getAllocTime()
{
H5D_alloc_time_t alloc_time;
herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::getAllocTime",
"H5Pget_alloc_time failed");
}
else
return (alloc_time);
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getFillTime
///\brief Gets fill value writing time.
///\return Fill value writing time
///\exception H5::PropListIException
///\par Description
/// Valid values for fill value writing time include
/// \li \c H5D_FILL_TIME_NEVER
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_time_t DSetCreatPropList::getFillTime()
{
H5D_fill_time_t fill_time;
herr_t ret_value = H5Pget_fill_time(id, &fill_time);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::getFillTime",
"H5Pget_fill_time failed");
}
else
return (fill_time);
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setAllocTime
///\brief Sets space allocation time for dataset during creation.
///\param alloc_time - IN: Allocation time
///\exception H5::PropListIException
///\par Description
/// Valid values for space allocation time include:
/// \li \c H5D_ALLOC_TIME_DEFAULT
/// \li \c H5D_ALLOC_TIME_EARLY
/// \li \c H5D_ALLOC_TIME_LATE
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
{
herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::setAllocTime",
"H5Pset_alloc_time failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFillTime
///\brief Sets fill value writing time for dataset.
///\return Fill value writing time
///\exception H5::PropListIException
///\par Description
/// Valid values for fill value writing time include
/// \li \c H5D_FILL_TIME_NEVER
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
{
herr_t ret_value = H5Pset_fill_time(id, fill_time);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::setFillTime",
"H5Pset_fill_time failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFletcher32
///\brief Sets Fletcher32 checksum of EDC for this property list.
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFletcher32()
{
herr_t ret_value = H5Pset_fletcher32(id);
if( ret_value < 0 )
{
throw PropListIException("DSetCreatPropList::setFletcher32",
"H5Pset_fletcher32 failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setExternal
///\brief Adds an external file to the list of external files
///\param name - IN: Name of the external file
///\param offset - IN: Location where the data starts in the file
///\param size - IN: Number of bytes reserved in the file for the data
///\exception H5::PropListIException
///\par Description
/// If a dataset is splitted across multiple files then the files
/// should be defined in order. The total size of the dataset is
/// the sum of the \a size arguments for all the external files. If
/// the total size is larger than the size of a dataset then the
/// dataset can be extended (provided the data space also allows
/// the extending).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t size ) const
{
herr_t ret_value = H5Pset_external( id, name, offset, size );
@@ -164,7 +578,13 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz
}
}
// Returns the number of external files for a dataset
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getExternalCount
///\brief Returns the number of external files for a dataset
///\return Number of external files
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getExternalCount() const
{
int num_ext_files = H5Pget_external_count( id );
@@ -177,7 +597,28 @@ int DSetCreatPropList::getExternalCount() const
return( num_ext_files );
}
// Returns information about an external file
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getExternal
///\brief Returns information about an external file
///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
/// returned by getExternalCount()
///\param name_size - IN: Maximum length of \a name
///\param name - IN: Name of the external file
///\param offset - IN: Location to return an offset value
///\param size - OUT: Location to return the size of the external file data
///\exception H5::PropListIException
///\par Description
/// The parameter \a idx ranges [0..N-1] where N is returned by
/// getExternalCount(). At most \a name_size characters are copied
/// into the name array. If the external file name is longer than
/// name_size with the null terminator, the return value is not
/// null terminated (similar to strncpy()).
/// If \a name_size is zero or \a name is a null pointer, the
/// external file name will not be returned. If \a offset or
/// \a size are null pointers then the corresponding information
/// will not be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const
{
herr_t ret_value = H5Pget_external( id, idx, name_size, name, &offset, &size );
@@ -188,7 +629,11 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_
}
}
// Default destructor
//--------------------------------------------------------------------------
// Function: DSetCreatPropList destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::~DSetCreatPropList () {}
#ifndef H5_NO_NAMESPACE

View File

@@ -21,62 +21,96 @@ namespace H5 {
#endif
class H5_DLLCPP DSetCreatPropList : public PropList {
public:
public:
// Default dataset creation property list.
static const DSetCreatPropList DEFAULT;
// Creates a dataset creation property list
DSetCreatPropList();
// Queries whether all the filters set in this property list are
// available currently.
bool allFiltersAvail();
// Copy constructor: creates a copy of a DSetCreatPropList object;
// often used by the compiler when passing by value occurs.
DSetCreatPropList( const DSetCreatPropList& orig );
// Get space allocation time for this property.
H5D_alloc_time_t getAllocTime();
// Sets the type of storage used to store the raw data for the
// dataset that uses this property list
void setLayout(hid_t plist, H5D_layout_t layout ) const;
// Gets the layout of the raw data storage of the data that uses this
// property list
H5D_layout_t getLayout() const;
// Sets the size of the chunks used to store a chunked layout dataset.
void setChunk( int ndims, const hsize_t* dim ) const;
// Set space allocation time for dataset during creation.
void setAllocTime(H5D_alloc_time_t alloc_time);
// Retrieves the size of the chunks used to store a chunked layout dataset.
int getChunk( int max_ndims, hsize_t* dim ) const;
// Sets compression method and compression level
void setDeflate( int level ) const;
// Sets the size of the chunks used to store a chunked layout dataset.
void setChunk( int ndims, const hsize_t* dim ) const;
// Sets a dataset fill value
void setFillValue( DataType& fvalue_type, const void* value ) const;
// Retrieves a dataset fill value
void getFillValue( DataType& fvalue_type, void* value ) const;
// Adds a filter to the filter pipeline
void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
// Returns the number of filters in the pipeline
int getNfilters() const;
// Returns information about a filter in a pipeline
H5Z_filter_t getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[] ) const;
// Adds an external file to the list of external files
void setExternal( const char* name, off_t offset, hsize_t size ) const;
// Returns the number of external files for a dataset
int getExternalCount() const;
// Returns information about an external file
// Returns information about an external file.
void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
// Creates a copy of an existing dataset creation property list
// using the property list id
DSetCreatPropList( const hid_t plist_id ) : PropList( plist_id ) {}
// Returns the number of external files for a dataset.
int getExternalCount() const;
// Default destructor
// Gets fill value writing time.
H5D_fill_time_t getFillTime();
// Sets fill value writing time for dataset.
void setFillTime(H5D_fill_time_t fill_time);
// Retrieves a dataset fill value.
void getFillValue( const DataType& fvalue_type, void* value ) const;
// Sets a dataset fill value.
void setFillValue( const DataType& fvalue_type, const void* value ) const;
// Returns information about a filter in a pipeline.
H5Z_filter_t getFilter(int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[]) const;
// Returns information about a filter in a pipeline given the filter id.
void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[]) const;
// Gets the layout of the raw data storage of the data that uses this
// property list.
H5D_layout_t getLayout() const;
// Sets the type of storage used to store the raw data for the
// dataset that uses this property list.
void setLayout(H5D_layout_t layout) const;
// Returns the number of filters in the pipeline.
int getNfilters() const;
// Checks if fill value has been defined for this property.
H5D_fill_value_t isFillValueDefined();
// Modifies the specified filter.
void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
// Remove one or all filters from the filter pipeline.
void removeFilter( H5Z_filter_t filter_id) const;
// Sets compression method and compression level.
void setDeflate( int level ) const;
// Adds an external file to the list of external files.
void setExternal( const char* name, off_t offset, hsize_t size ) const;
// Adds a filter to the filter pipeline.
void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
// Sets Fletcher32 checksum of EDC for this property list.
void setFletcher32();
// Sets method of the shuffle filter.
void setShuffle();
// Default constructor: creates a stub dataset creation property list.
DSetCreatPropList();
// Copy constructor: creates a copy of a DSetCreatPropList object.
DSetCreatPropList(const DSetCreatPropList& orig);
// Creates a copy of an existing dataset creation property list
// using the property list id.
DSetCreatPropList(const hid_t plist_id);
// Noop destructor.
virtual ~DSetCreatPropList();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -25,16 +25,49 @@
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for default dataset memory and transfer property list.
//--------------------------------------------------------------------------
const DSetMemXferPropList DSetMemXferPropList::DEFAULT( H5P_DEFAULT );
// Creates a dataset memory and transfer property list
DSetMemXferPropList::DSetMemXferPropList() : PropList( H5P_DATASET_XFER) {}
//--------------------------------------------------------------------------
// Function Default constructor
///\brief Default constructor: creates a stub dataset memory and
/// transfer property list object.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
// Copy constructor: makes a copy of the original DSetMemXferPropList object;
DSetMemXferPropList::DSetMemXferPropList( const DSetMemXferPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
// Function DSetMemXferPropList copy constructor
///\brief Copy constructor: makes a copy of the original
/// DSetMemXferPropList object
///\param original - IN: Original dataset memory and transfer property
/// list object to copy
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList& original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function DSetMemXferPropList overloaded constructor
///\brief Creates a DSetMemXferPropList object using the id of an
/// existing DSetMemXferPropList.
///\param plist_id - IN: Id of an existing dataset memory and transfer
/// property list
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_id) {}
#ifdef H5_WANT_H5_V1_4_COMPAT
// Sets type conversion and background buffers
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setBuffer
///\brief Sets type conversion and background buffers.
///\param size - IN: Size, in bytes, of the type conversion and background buffers
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setBuffer( hsize_t size, void* tconv, void* bkg ) const
{
herr_t ret_value = H5Pset_buffer( id, size, tconv, bkg );
@@ -45,7 +78,15 @@ void DSetMemXferPropList::setBuffer( hsize_t size, void* tconv, void* bkg ) cons
}
}
// Reads buffer settings
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getBuffer
///\brief Reads buffer settings.
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\return Buffer size, in bytes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
{
hsize_t buffer_size = H5Pget_buffer( id, tconv, bkg );
@@ -57,7 +98,15 @@ hsize_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
return( buffer_size );
}
#else /* H5_WANT_H5_V1_4_COMPAT */
// Sets type conversion and background buffers
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setBuffer
///\brief Sets type conversion and background buffers.
///\param size - IN: Size, in bytes, of the type conversion and background buffers
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setBuffer( size_t size, void* tconv, void* bkg ) const
{
herr_t ret_value = H5Pset_buffer( id, size, tconv, bkg );
@@ -68,7 +117,15 @@ void DSetMemXferPropList::setBuffer( size_t size, void* tconv, void* bkg ) const
}
}
// Reads buffer settings
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getBuffer
///\brief Reads buffer settings.
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\return Buffer size, in bytes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
{
size_t buffer_size = H5Pget_buffer( id, tconv, bkg );
@@ -81,7 +138,13 @@ size_t DSetMemXferPropList::getBuffer( void** tconv, void** bkg ) const
}
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets the dataset transfer property list status to TRUE or FALSE
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setPreserve
///\brief Sets the dataset transfer property list status to true or false.
///\param status - IN: Status to set, true or false
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setPreserve( bool status ) const
{
herr_t ret_value = H5Pset_preserve( id, (hbool_t) status );
@@ -92,7 +155,13 @@ void DSetMemXferPropList::setPreserve( bool status ) const
}
}
// Checks status of the dataset transfer property list
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getPreserve
///\brief Checks status of the dataset transfer property list.
///\return Status of the dataset transfer property list
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DSetMemXferPropList::getPreserve() const
{
int ret_value = H5Pget_preserve( id );
@@ -108,7 +177,21 @@ bool DSetMemXferPropList::getPreserve() const
}
#ifdef H5_WANT_H5_V1_4_COMPAT
// Indicates whether to cache hyperslab blocks during I/O
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setHyperCache
///\brief Indicates whether to cache hyperslab blocks during I/O
///\param cache - IN: Flag indicating whether caching is to be set
/// to on (1) or off (0)
///\param limit - IN: Maximum size of the hyperslab block to cache or
/// 0 (zero) for no limit
///\exception H5::PropListIException
///\note This function is deprecated in HDF5 Release 1.6 and will
/// eventually be removed from the HDF5 distribution. It is
/// provided in this release only to enable backward compatibility
/// with HDF5 Releases 1.4.x and is enabled only if the HDF5
/// library is configured with the flag H5_WANT_H5_V1_4_COMPAT.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setHyperCache( bool cache, unsigned limit ) const
{
herr_t ret_value = H5Pset_hyper_cache( id, cache, limit );
@@ -119,7 +202,22 @@ void DSetMemXferPropList::setHyperCache( bool cache, unsigned limit ) const
}
}
// Returns information regarding the caching of hyperslab blocks during I/O
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getHyperCache
///\brief Returns information regarding the caching of hyperslab
/// blocks during I/O.
///\param cache - OUT: Flag indicating whether caching is set
/// to on (1) or off (0)
///\param limit - OUT: Maximum size of the hyperslab block to cache or
/// 0 (zero) for no limit
///\exception H5::PropListIException
///\note This function is deprecated in HDF5 Release 1.6 and will
/// eventually be removed from the HDF5 distribution. It is
/// provided in this release only to enable backward compatibility
/// with HDF5 Releases 1.4.x and is enabled only if the HDF5
/// library is configured with the flag H5_WANT_H5_V1_4_COMPAT.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::getHyperCache( bool& cache, unsigned& limit ) const
{
unsigned temp_cache; // C routine takes hid_t, unsigned*, unsigned*
@@ -136,7 +234,15 @@ void DSetMemXferPropList::getHyperCache( bool& cache, unsigned& limit ) const
}
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets B-tree split ratios for a dataset transfer property list
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setBtreeRatios
///\brief Sets B-tree split ratios for a dataset transfer property list.
///\param left - IN: B-tree split ratio for left-most nodes
///\param middle - IN: B-tree split ratio for right-most nodes and lone nodes
///\param right - IN: B-tree split ratio for all other nodes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setBtreeRatios( double left, double middle, double right ) const
{
herr_t ret_value = H5Pset_btree_ratios( id, left, middle, right );
@@ -147,7 +253,15 @@ void DSetMemXferPropList::setBtreeRatios( double left, double middle, double rig
}
}
// Gets B-tree split ratios for a dataset transfer property list
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getBtreeRatios
///\brief Gets B-tree split ratios for a dataset transfer property list.
///\param left - OUT: B-tree split ratio for left-most nodes
///\param middle - OUT: B-tree split ratio for right-most nodes and lone nodes
///\param right - OUT: B-tree split ratio for all other nodes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double& right ) const
{
herr_t ret_value = H5Pget_btree_ratios( id, &left, &middle, &right );
@@ -158,7 +272,16 @@ void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double&
}
}
// Sets the memory manager for variable-length datatype allocation
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setVlenMemManager
///\brief Sets the memory manager for variable-length datatype allocation.
///\param alloc_func - IN: User's allocate routine
///\param alloc_info - IN: User's allocation parameters
///\param free_func - IN: User's free routine
///\param free_info - IN: User's free parameters
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setVlenMemManager( H5MM_allocate_t alloc_func, void* alloc_info, H5MM_free_t free_func, void* free_info ) const
{
herr_t ret_value = H5Pset_vlen_mem_manager( id, alloc_func, alloc_info,
@@ -170,20 +293,28 @@ void DSetMemXferPropList::setVlenMemManager( H5MM_allocate_t alloc_func, void* a
}
}
// alloc_func and free_func are set to NULL, indicating that system malloc and
// free are to be used
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setVlenMemManager
///\brief Sets the memory manager for variable-length datatype
/// allocation - system \c malloc and \c free will be used.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::setVlenMemManager() const
{
setVlenMemManager( NULL, NULL, NULL, NULL );
//herr_t ret_value = H5Pset_vlen_mem_manager( id, NULL, NULL, NULL, NULL );
//if( ret_value < 0 )
//{
//throw PropListIException("DSetMemXferPropList::setVlenMemManager",
//"H5Pset_vlen_mem_manager failed");
//}
}
// Gets the memory manager for variable-length datatype allocation
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getVlenMemManager
///\brief Gets the memory manager for variable-length datatype allocation
///\param alloc_func - OUT: User's allocate routine
///\param alloc_info - OUT: User's allocation parameters
///\param free_func - OUT: User's free routine
///\param free_info - OUT: User's free parameters
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void** alloc_info, H5MM_free_t& free_func, void** free_info ) const
{
herr_t ret_value = H5Pget_vlen_mem_manager( id, &alloc_func, alloc_info, &free_func, free_info );
@@ -194,36 +325,173 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
}
}
/* this function is in parallel mode only - not supported at this time.
// Sets the transfer mode
void DSetMemXferPropList::setXfer( H5D_transfer_t data_xfer_mode = H5D_XFER_INDEPENDENT ) const
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setMulti
///\brief Sets the data transfer property list for the multi-file driver.
///\param memb_dxpl - OUT: Array of data access property lists
///\exception H5::PropListIException
///\par Description
/// This function can only be used after the member map has
/// been set with FileAccPropList::setMulti (not done - BMR.)
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
{
herr_t ret_value = H5Pset_xfer( ... );
if( ret_value < 0 )
herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::setXfer",
"H5Pset_xfer failed");
throw PropListIException("DSetMemXferPropList::setMulti",
"H5Pset_dxpl_multi failed");
}
}
// this function is in parallel mode only - not supported at this time.
// Gets the transfer mode
H5D_transfer_t DSetMemXferPropList::getXfer() const
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getMulti
///\brief Returns multi-file data transfer property list information.
///\param memb_dxpl - OUT: Array of data access property lists
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
{
H5D_transfer_t xfer = H5Pget_xfer( id );
// BMR - need to find out what the value is for ?? when this function
// is supported
if( xfer == ?? )
herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::getXfer",
"H5Pget_xfer failed");
throw PropListIException("DSetMemXferPropList::getMulti",
"H5Pget_dxpl_multi failed");
}
return( xfer );
}
*/
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setSmallDataBlockSize
///\brief Sets the size of a contiguous block reserved for small data.
///\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:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSmallData
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
{
herr_t ret_value = H5Pset_small_data_block_size(id, size);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::setSmallDataBlockSize",
"H5Pset_small_data_block_size failed");
}
}
// Default destructor
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getSmallDataBlockSize
///\brief Returns the current small data block size setting.
///\return Size of the small data block, in bytes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
hsize_t DSetMemXferPropList::getSmallDataBlockSize()
{
hsize_t size;
herr_t ret_value = H5Pget_small_data_block_size(id, &size);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::getSmallDataBlockSize",
"H5Pget_small_data_block_size failed");
}
return(size);
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setHyperVectorSize
///\brief Sets number of I/O vectors to be read/written in hyperslab I/O.
///\exception H5::PropListIException
///\par Description
/// For information, please refer to the C layer Reference
/// Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetHyperVectorSize
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
{
herr_t ret_value = H5Pset_hyper_vector_size(id, vector_size);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::setHyperVectorSize",
"H5Pset_hyper_vector_size failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getSmallDataBlockSize
///\brief Returns the number of I/O vectors to be read/written in
/// hyperslab I/O.
///\return Number of I/O vectors
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
size_t DSetMemXferPropList::getHyperVectorSize()
{
size_t vector_size;
herr_t ret_value = H5Pget_hyper_vector_size(id, &vector_size);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::getHyperVectorSize",
"H5Pget_hyper_vector_size failed");
}
return(vector_size);
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::setEDCCheck
///\brief Enables or disables error-detecting for a dataset reading
/// process.
///\param check - IN: Specifies whether error detection is enabled or
/// disabled
///\exception H5::PropListIException
///\par Description
/// The error detection algorithm used is the algorithm previously
/// specified in the corresponding dataset creation property
/// list. This function does not affect the use of error
/// detection in the writing process.
///\par
/// Valid values are as follows:
/// \li \c H5Z_ENABLE_EDC (default)
/// \li \c H5Z_DISABLE_EDC
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)
{
herr_t ret_value = H5Pset_edc_check(id, check);
if (ret_value < 0)
{
throw PropListIException("DSetMemXferPropList::setEDCCheck",
"H5Pset_edc_check failed");
}
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList::getEDCCheck
///\brief Determines whether error-detection is enabled for dataset reads.
///\return \c H5Z_ENABLE_EDC or \c H5Z_DISABLE_EDC
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - July, 2004
//--------------------------------------------------------------------------
H5Z_EDC_t DSetMemXferPropList::getEDCCheck()
{
H5Z_EDC_t check = H5Pget_edc_check(id);
if (check < 0)
{
throw PropListIException("DSetMemXferPropList::getEDCCheck",
"H5Pget_edc_check failed");
}
return(check);
}
//--------------------------------------------------------------------------
// Function: DSetMemXferPropList destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::~DSetMemXferPropList() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -22,73 +22,93 @@ namespace H5 {
class H5_DLLCPP DSetMemXferPropList : public PropList {
public:
// Default dataset memory and transfer property list.
static const DSetMemXferPropList DEFAULT;
// Creates a dataset memory and transfer property list
DSetMemXferPropList();
// Copy constructor: creates a copy of a DSetMemXferPropList object
DSetMemXferPropList( const DSetMemXferPropList& orig );
#ifdef H5_WANT_H5_V1_4_COMPAT
// Sets type conversion and background buffers
void setBuffer( hsize_t size, void* tconv, void* bkg ) const;
// Sets type conversion and background buffers.
void setBuffer( hsize_t size, void* tconv, void* bkg ) const;
// Reads buffer settings.
hsize_t getBuffer( void** tconv, void** bkg ) const;
// Indicates whether to cache hyperslab blocks during I/O.
void setHyperCache( bool cache, unsigned limit = 0 ) const;
// Returns information regarding the caching of hyperslab blocks during I/O.
void getHyperCache( bool& cache, unsigned& limit ) const;
// Reads buffer settings
hsize_t getBuffer( void** tconv, void** bkg ) const;
#else /* H5_WANT_H5_V1_4_COMPAT */
// Sets type conversion and background buffers
void setBuffer( size_t size, void* tconv, void* bkg ) const;
// Sets type conversion and background buffers.
void setBuffer( size_t size, void* tconv, void* bkg ) const;
// Reads buffer settings
size_t getBuffer( void** tconv, void** bkg ) const;
// Reads buffer settings.
size_t getBuffer( void** tconv, void** bkg ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets the dataset transfer property list status to TRUE or FALSE
void setPreserve( bool status ) const;
// Checks status of the dataset transfer property list
bool getPreserve() const;
#ifdef H5_WANT_H5_V1_4_COMPAT
// Indicates whether to cache hyperslab blocks during I/O
void setHyperCache( bool cache, unsigned limit = 0 ) const;
// Returns information regarding the caching of hyperslab blocks during I/O
void getHyperCache( bool& cache, unsigned& limit ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets B-tree split ratios for a dataset transfer property list
// Sets B-tree split ratios for a dataset transfer property list.
void setBtreeRatios( double left, double middle, double right ) const;
// Gets B-tree split ratios for a dataset transfer property list
// Gets B-tree split ratios for a dataset transfer property list.
void getBtreeRatios( double& left, double& middle, double& right ) const;
// Sets the dataset transfer property list status to TRUE or FALSE.
void setPreserve( bool status ) const;
// Checks status of the dataset transfer property list.
bool getPreserve() const;
// Sets the memory manager for variable-length datatype
// allocation in H5Dread and H5Dvlen_reclaim
// allocation in H5Dread and H5Dvlen_reclaim.
void setVlenMemManager( H5MM_allocate_t alloc, void* alloc_info,
H5MM_free_t free, void* free_info ) const;
// alloc and free are set to NULL, indicating that system
// malloc and free are to be used
// malloc and free are to be used.
void setVlenMemManager() const;
// Gets the memory manager for variable-length datatype
// allocation in H5Dread and H5Tvlen_reclaim
// allocation in H5Dread and H5Tvlen_reclaim.
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
H5MM_free_t& free, void** free_info ) const;
// Sets the transfer mode - parallel mode, not currently supported
//void setXfer( H5D_transfer_t data_xfer_mode = H5D_XFER_INDEPENDENT ) const;
// Sets the data transfer property list for the multi-file driver.
void setMulti(const hid_t *memb_dxpl);
// Gets the transfer mode - parallel mode, not currently supported
//H5D_transfer_t getXfer() const;
// Returns multi-file data transfer property list information.
void getMulti(hid_t *memb_dxpl);
// Sets the size of a contiguous block reserved for small data.
void setSmallDataBlockSize(hsize_t size);
// Returns the current small data block size setting.
hsize_t getSmallDataBlockSize();
// Sets number of I/O vectors to be read/written in hyperslab I/O.
void setHyperVectorSize(size_t vector_size);
// Returns the number of I/O vectors to be read/written in
// hyperslab I/O.
size_t getHyperVectorSize();
// Enables or disables error-detecting for a dataset reading
// process.
void setEDCCheck(H5Z_EDC_t check);
// Determines whether error-detection is enabled for dataset reads.
H5Z_EDC_t getEDCCheck();
// Default constructor: creates a dataset memory and transfer prop list.
DSetMemXferPropList();
// Copy constructor: makes a copy of a DSetMemXferPropList object.
DSetMemXferPropList(const DSetMemXferPropList& orig);
// Creates a copy of an existing dataset memory and transfer
// property list using the property list id
DSetMemXferPropList (const hid_t plist_id) : PropList( plist_id ) {}
// property list using the property list id.
DSetMemXferPropList (const hid_t plist_id);
// Default destructor
// Noop destructor.
virtual ~DSetMemXferPropList();
};

View File

@@ -23,6 +23,8 @@
#include "H5AbstractDs.h"
#include "H5DxferProp.h"
#include "H5DataSpace.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSet.h"
#include "H5AtomType.h"
@@ -33,20 +35,48 @@
namespace H5 {
#endif
// Creates an empty enumeration datatype based on a native signed
// integer type.
EnumType::EnumType( size_t size ) : DataType( H5T_ENUM, size ) {}
// Default constructor
//--------------------------------------------------------------------------
// Function: EnumType default constructor
///\brief Default constructor: Creates a stub datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType() : DataType() {}
// Creates a enumeration datatype using an existing id
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Creates an EnumType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType( const hid_t existing_id ) : DataType( existing_id ) {}
// Copy constructor: makes a copy of the original EnumType object.
//--------------------------------------------------------------------------
// Function: EnumType copy constructor
///\brief Copy constructor: makes a copy of the original EnumType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType( const EnumType& original ) : DataType( original ) {}
// Gets the enum datatype of the specified dataset
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Creates an empty enumeration datatype given a size, in bytes.
///\param size - IN: Number of bytes in the datatype to create
///\exception H5::DataTypeIException
// Description
// The DataType constructor calls the C API H5Tcreate to create
// the enum datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType( size_t size ) : DataType( H5T_ENUM, size ) {}
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Gets the enum datatype of the specified dataset.
///\param dataset - IN: Dataset that this enum datatype associates with
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType( const DataSet& dataset ) : DataType()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -59,7 +89,13 @@ EnumType::EnumType( const DataSet& dataset ) : DataType()
}
}
// Creates a new enum datatype based on an integer datatype
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Creates a new enum datatype based on an integer datatype.
///\param data_type - IN: Base datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType( const IntType& data_type ) : DataType()
{
// Calls C function H5Tenum_create to get the id of the datatype
@@ -72,11 +108,14 @@ EnumType::EnumType( const IntType& data_type ) : DataType()
}
}
// Inserts a new member to this enumeration datatype.
void EnumType::insert( const string& name, void *value ) const
{
insert( name.c_str(), value );
}
//--------------------------------------------------------------------------
// Function: EnumType::insert
///\brief Inserts a new member to this enumeration datatype.
///\param name - IN: Name of the new member
///\param value - IN: Pointer to the value of the new member
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void EnumType::insert( const char* name, void *value ) const
{
// Calls C routine H5Tenum_insert to insert the new enum datatype member.
@@ -87,7 +126,27 @@ void EnumType::insert( const char* name, void *value ) const
}
}
// Returns the symbol name corresponding to a specified member of an enumeration datatype.
//--------------------------------------------------------------------------
// Function: EnumType::insert
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void EnumType::insert( const string& name, void *value ) const
{
insert( name.c_str(), value );
}
//--------------------------------------------------------------------------
// Function: EnumType::nameOf
///\brief Returns the symbol name corresponding to a specified member
/// of this enumeration datatype.
///\param value - IN: Pointer to the value of the enum datatype
///\param size - IN: Size for the name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string EnumType::nameOf( void *value, size_t size ) const
{
char* name_C = new char[size+1]; // temporary C-string for C API
@@ -102,16 +161,19 @@ string EnumType::nameOf( void *value, size_t size ) const
}
// otherwise, create the string to hold the datatype name and return it
string name = string( name_C );
delete name_C;
delete [] name_C;
return( name );
}
// Retrieves the value corresponding to a member of an enumeration
// datatype, given the member's name.
void EnumType::valueOf( const string& name, void *value ) const
{
valueOf( name.c_str(), value );
}
//--------------------------------------------------------------------------
// Function: EnumType::valueOf
///\brief Retrieves the value corresponding to a member of this
/// enumeration datatype, given the member's name.
///\param name - IN: Name of the queried member
///\param value - OUT: Pointer to the retrieved value
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void EnumType::valueOf( const char* name, void *value ) const
{
// Calls C routine H5Tenum_valueof to get the enum datatype value
@@ -122,20 +184,28 @@ void EnumType::valueOf( const char* name, void *value ) const
}
}
/*-------------------------------------------------------------------------
* Function: getMemberIndex
*
* Purpose: Returns the index of a member in an enumeration data type.
* Members are stored in no particular order with numbers 0
* through N-1, where N is the value returned by the member
* function getNmembers.
*
* Return: Success: index of the member if exists.
* Failure: DataTypeIException
*
* BMR - May 16, 2002
*-------------------------------------------------------------------------
*/
//--------------------------------------------------------------------------
// Function: EnumType::valueOf
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void EnumType::valueOf( const string& name, void *value ) const
{
valueOf( name.c_str(), value );
}
//--------------------------------------------------------------------------
// Function: EnumType::getMemberIndex
///\brief Returns the index of a member in this enumeration datatype.
///\param name - IN: Name of the queried member
///\return Index of the member if it exists. Index will have the value
/// between 0 and \c N-1, where \c N is the value returned by the
/// member function \c EnumType::getNmembers.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int EnumType::getMemberIndex(const char *name) const
{
int member_index = H5Tget_member_index(id, name);
@@ -146,13 +216,46 @@ int EnumType::getMemberIndex(const char *name) const
}
return( member_index );
}
//--------------------------------------------------------------------------
// Function: EnumType::getMemberIndex
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int EnumType::getMemberIndex(const string& name) const
{
return(EnumType::getMemberIndex(name.c_str()));
}
// Retrieves the value of a member in this enumeration datatype, given the
// member's index.
//--------------------------------------------------------------------------
// Function: EnumType::getNmembers
///\brief Returns the number of members in this enumeration datatype.
///\return Number of members
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
int EnumType::getNmembers() const
{
int num_members = H5Tget_nmembers( id );
if( num_members < 0 )
{
throw DataTypeIException("CompType::getNmembers",
"H5Tget_nmembers returns negative number of members");
}
return( num_members );
}
//--------------------------------------------------------------------------
// Function: EnumType::getMemberValue
///\brief Retrieves the value of a member in this enumeration datatype,
/// given the member's index.
///\param memb_no - IN: Index of the queried member
///\param value - OUT: Pointer to the retrieved value
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void EnumType::getMemberValue( int memb_no, void *value ) const
{
// Call C routine H5Tget_member_value to get the datatype member's value
@@ -163,7 +266,11 @@ void EnumType::getMemberValue( int memb_no, void *value ) const
}
}
// Default destructor
//--------------------------------------------------------------------------
// Function: EnumType destructor
///\brief Properly terminates access to this enum datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::~EnumType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -27,6 +27,35 @@ class H5_DLLCPP EnumType : public DataType {
// integer type, whose size is given by size.
EnumType( size_t size );
// Gets the enum datatype of the specified dataset
EnumType( const DataSet& dataset ); // H5Dget_type
// Creates a new enum datatype based on an integer datatype
EnumType( const IntType& data_type ); // H5Tenum_create
// Returns the number of members in this enumeration datatype.
int getNmembers () const;
// Returns the index of a member in this enumeration data type.
int getMemberIndex(const char* name) const;
int getMemberIndex(const string& name) const;
// Returns the value of an enumeration datatype member
void getMemberValue( int memb_no, void *value ) const;
// Inserts a new member to this enumeration type.
void insert( const char* name, void *value ) const;
void insert( const string& name, void *value ) const;
// Returns the symbol name corresponding to a specified member
// of this enumeration datatype.
string nameOf( void *value, size_t size ) const;
// Returns the value corresponding to a specified member of this
// enumeration datatype.
void valueOf( const char* name, void *value ) const;
void valueOf( const string& name, void *value ) const;
// Default constructor
EnumType();
@@ -36,32 +65,6 @@ class H5_DLLCPP EnumType : public DataType {
// Copy constructor: makes a copy of the original EnumType object.
EnumType( const EnumType& original );
// Gets the enum datatype of the specified dataset
EnumType( const DataSet& dataset ); // H5Dget_type
// Creates a new enum datatype based on an integer datatype
EnumType( const IntType& data_type ); // H5Tenum_create
// Inserts a new member to this enumeration type.
void insert( const string& name, void *value ) const;
void insert( const char* name, void *value ) const;
// Returns the symbol name corresponding to a specified member
// of this enumeration datatype.
string nameOf( void *value, size_t size ) const;
// Returns the value corresponding to a specified member of this
// enumeration datatype.
void valueOf( const string& name, void *value ) const;
void valueOf( const char* name, void *value ) const;
// Returns the index of a member in this enumeration data type.
int getMemberIndex(const char* name) const;
int getMemberIndex(const string& name) const;
// Returns the value of an enumeration datatype member
void getMemberValue( int memb_no, void *value ) const;
virtual ~EnumType();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -1,7 +1,7 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
@@ -22,62 +22,92 @@ namespace H5 {
#endif // H5_NO_STD
#endif
// Default constructor
Exception::Exception() : detailMessage(""), funcName("") {}
const string Exception::DEFAULT_MSG("No detailed information provided");
// Constructor taking only a detailed message as string object
//Exception::Exception(const string& message) : detailMessage(message) {}
//--------------------------------------------------------------------------
// Function: Exception default constructor
///\brief Default constructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::Exception() : detail_message(""), func_name("") {}
// Constructor taking a function name and a detailed message as string objects
Exception::Exception(const string& func_name, const string& message) : detailMessage(message), funcName(func_name) {}
//--------------------------------------------------------------------------
// Function: Exception overloaded constructor
///\brief Creates an exception with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::Exception(const string func_name, const string message) : detail_message(message), func_name(func_name) {}
// Constructor taking a detailed message as character string
// digital alpha (gondolin) produces compilation error at static_cast<string>
// so I replaced this constructor by the one below it
//Exception::Exception( const char* message) : detailMessage(static_cast<string>(message)) {}
//Exception::Exception(const char* message)
//{
//detailMessage = string(message);
//}
// Constructor taking a function name and a detailed message as character
// strings
Exception::Exception(const char* func_name, const char* message)
{
detailMessage = string(message);
if (func_name != NULL)
funcName = string(func_name);
}
// copy constructor
//--------------------------------------------------------------------------
// Function: Exception copy constructor
///\brief Copy constructor: makes a copy of the original Exception object.
///\param orig - IN: Exception instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::Exception( const Exception& orig )
{
detailMessage = orig.detailMessage;
funcName = orig.funcName;
detail_message = orig.detail_message;
func_name = orig.func_name;
}
// Returns the character string that describes an error specified by
// a major error number.
string Exception::getMajorString( H5E_major_t major_num ) const
//--------------------------------------------------------------------------
// Function: Exception::getMajorString
///\brief Returns a text string that describes the error
/// specified by a major error number.
///\param err_major - IN: Major error number
///\return Major error string
///\par Description
/// In the failure case, the string "Invalid major error number"
/// will be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string Exception::getMajorString(H5E_major_t err_major) const
{
// calls the C API routine to get the major string - Note: in the
// failure case, the string "Invalid major error number" will be returned.
string major_str( H5Eget_major( major_num ));
string major_str(H5Eget_major(err_major));
return( major_str );
}
// Returns the character string that describes an error specified by
// a minor error number.
string Exception::getMinorString( H5E_minor_t minor_num ) const
//--------------------------------------------------------------------------
// Function: Exception::getMinorString
///\brief Returns a text string that describes the error
/// specified by a minor error number.
///\param err_minor - IN: Minor error number
///\return Minor error string
///\par Description
/// In the failure case, the string "Invalid minor error number"
/// will be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string Exception::getMinorString(H5E_minor_t err_minor) const
{
// calls the C API routine to get the minor string - Note: in the
// failure case, the string "Invalid minor error number" will be returned.
string minor_str( H5Eget_minor( minor_num ));
string minor_str(H5Eget_minor(err_minor));
return( minor_str );
}
// Turns on the automatic error printing.
void Exception::setAutoPrint( H5E_auto_t func, void* client_data )
//--------------------------------------------------------------------------
// Function: Exception::setAutoPrint
///\brief Turns on the automatic error printing.
///\param func - IN: Function to be called upon an error condition
///\param client_data - IN: Data passed to the error function
///\par Description
/// When the library is first initialized the auto printing
/// function, \a func, is set to the C API \c H5Eprint and
/// \a client_data is the standard error stream pointer, \c stderr.
/// Automatic stack traversal is always in the \c H5E_WALK_DOWNWARD
/// direction.
///\par
/// Users are encouraged to write their own more specific error
/// handlers
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::setAutoPrint( H5E_auto_t& func, void* client_data )
{
// calls the C API routine H5Eset_auto to set the auto printing to
// the specified function.
@@ -86,7 +116,11 @@ void Exception::setAutoPrint( H5E_auto_t func, void* client_data )
throw Exception( "Exception::setAutoPrint", "H5Eset_auto failed" );
}
// Turns off the automatic error printing.
//--------------------------------------------------------------------------
// Function: Exception::dontPrint
///\brief Turns off the automatic error printing from the C library.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::dontPrint()
{
// calls the C API routine H5Eset_auto with NULL parameters to turn
@@ -96,8 +130,16 @@ void Exception::dontPrint()
throw Exception( "Exception::dontPrint", "H5Eset_auto failed" );
}
// Retrieves the current settings for the automatic error stack traversal
// function and its data.
//--------------------------------------------------------------------------
// Function: Exception::getAutoPrint
///\brief Retrieves the current settings for the automatic error
/// stack traversal function and its data.
///\param func - OUT: Current setting for the function to be
/// called upon an error condition
///\param client_data - OUT: Current setting for the data passed to
/// the error function
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::getAutoPrint( H5E_auto_t& func, void** client_data )
{
// calls the C API routine H5Eget_auto to get the current setting of
@@ -107,7 +149,14 @@ void Exception::getAutoPrint( H5E_auto_t& func, void** client_data )
throw Exception( "Exception::getAutoPrint", "H5Eget_auto failed" );
}
// Clears the error stack for the current thread.
//--------------------------------------------------------------------------
// Function: Exception::clearErrorStack
///\brief Clears the error stack for the current thread.
///\par Description
/// The stack is also cleared whenever a C API function is
/// called, with certain exceptions (for instance, \c H5Eprint).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::clearErrorStack()
{
// calls the C API routine H5Eclear to clear the error stack
@@ -116,7 +165,47 @@ void Exception::clearErrorStack()
throw Exception( "Exception::clearErrorStack", "H5Eclear failed" );
}
// Walks the error stack for the current thread, calling the specified function.
//--------------------------------------------------------------------------
// Function: Exception::walkErrorStack
///\brief Walks the error stack for the current thread, calling the
/// specified function.
///\param direction - IN: Direction in which the error stack is to be walked
///\param func - IN: Function to be called for each error encountered
///\param client_data - IN: Data passed to the error function
///\par Description
/// Valid values for \a direction include:
/// \li \c H5E_WALK_UPWARD - begin with the most specific error
/// and end at the API
/// \li \c H5E_WALK_DOWNWARD - begin at the API and end at the
/// inner-most function where the error was first detected
///\par
/// The function specified by \a func will be called for each
/// error in the error stack. The \c H5E_walk_t prototype is as
/// follows:
///\code
/// typedef herr_t (*H5E_walk_t)(int n, H5E_error_t *err_desc, void *client_data)
/// int n - Indexed position of the error in the stack; it begins at zero
/// regardless of stack traversal direction
/// H5E_error_t *err_desc - Pointer to a data structure describing the
/// error. This structure is listed below.
/// void *client_data - Pointer to client data in the format expected by
/// the user-defined function.
///\endcode
///\par
/// Data structure to describe the error:
///\code
/// typedef struct H5E_error_t {
/// hid_t cls_id; //class ID
/// hid_t maj_num; //major error ID
/// hid_t min_num; //minor error number
/// const char *func_name; //function in which error occurred
/// const char *file_name; //file in which error occurred
/// unsigned line; //line in file where error occurs
/// const char *desc; //optional supplied description
/// } H5E_error_t;
///\endcode
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk_t func, void* client_data )
{
// calls the C API routine H5Ewalk to walk the error stack
@@ -125,87 +214,301 @@ void Exception::walkErrorStack( H5E_direction_t direction, H5E_walk_t func, void
throw Exception( "Exception::walkErrorStack", "H5Ewalk failed" );
}
// Returns the detailed message set at the time the exception is thrown
//--------------------------------------------------------------------------
// Function: Exception::getDetailMsg
///\brief Returns the detailed message set at the time the exception
/// is thrown.
///\return Text message - \c std::string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string Exception::getDetailMsg() const
{
return(detailMessage);
return(detail_message);
}
//--------------------------------------------------------------------------
// Function: Exception::getCDetailMsg
///\brief Returns the detailed message set at the time the exception
/// is thrown.
///\return Text message - \c char pointer
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
const char* Exception::getCDetailMsg() const
{
return(detailMessage.c_str());
return(detail_message.c_str());
}
// Returns the function name where the exception is thrown
//--------------------------------------------------------------------------
// Function: Exception::getFuncName
///\brief Returns the name of the function, where the exception is thrown.
///\return Text message - \c std::string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string Exception::getFuncName() const
{
return(funcName);
}
const char* Exception::getCFuncName() const
{
return(funcName.c_str());
return(func_name);
}
// Prints the error stack in a default manner.
//--------------------------------------------------------------------------
// Function: Exception::getCFuncName
///\brief Returns the name of the function, where the exception is thrown.
///\return Text message - \c char pointer
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
const char* Exception::getCFuncName() const
{
return(func_name.c_str());
}
//--------------------------------------------------------------------------
// Function: Exception::printError
///\brief Prints the error stack in a default manner.
///\param stream - IN: File pointer
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Exception::printError( FILE* stream ) const
{
herr_t ret_value = H5Eprint( NULL ); // print to stderr
herr_t ret_value = H5Eprint(stream); // print to stderr
if( ret_value < 0 )
throw Exception( "Exception::printError", "H5Eprint failed" );
}
//--------------------------------------------------------------------------
// Function: Exception destructor
///\brief Noop destructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::~Exception() {}
//--------------------------------------------------------------------------
// Subclass: FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: FileIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
FileIException::FileIException():Exception(){}
FileIException::FileIException(const string& func_name, const string& message) : Exception(func_name, message) {}
FileIException::FileIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: FileIException overloaded constructor
///\brief Creates a FileIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
FileIException::FileIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: FileIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
FileIException::~FileIException() {}
//--------------------------------------------------------------------------
// Subclass: GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: GroupIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
GroupIException::GroupIException():Exception(){}
GroupIException::GroupIException(const string& func_name, const string& message) : Exception(func_name, message) {}
GroupIException::GroupIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: GroupIException overloaded constructor
///\brief Creates a GroupIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
GroupIException::GroupIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: GroupIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
GroupIException::~GroupIException() {}
//--------------------------------------------------------------------------
// Subclass: DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataSpaceIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
DataSpaceIException::DataSpaceIException():Exception(){}
DataSpaceIException::DataSpaceIException(const string& func_name, const string& message) : Exception(func_name, message) {}
DataSpaceIException::DataSpaceIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataSpaceIException overloaded constructor
///\brief Creates a DataSpaceIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
DataSpaceIException::DataSpaceIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataSpaceIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataSpaceIException::~DataSpaceIException() {}
//--------------------------------------------------------------------------
// Subclass: DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataTypeIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
DataTypeIException::DataTypeIException():Exception(){}
DataTypeIException::DataTypeIException(const string& func_name, const string& message) : Exception(func_name, message) {}
DataTypeIException::DataTypeIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataTypeIException overloaded constructor
///\brief Creates a DataTypeIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
DataTypeIException::DataTypeIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataTypeIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataTypeIException::~DataTypeIException() {}
//--------------------------------------------------------------------------
// Subclass: PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: PropListIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
PropListIException::PropListIException():Exception(){}
PropListIException::PropListIException(const string& func_name, const string& message) : Exception(func_name, message) {}
PropListIException::PropListIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: PropListIException overloaded constructor
///\brief Creates a PropListIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
PropListIException::PropListIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: PropListIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
PropListIException::~PropListIException() {}
//--------------------------------------------------------------------------
// Subclass: DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataSetIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
DataSetIException::DataSetIException():Exception(){}
DataSetIException::DataSetIException(const string& func_name, const string& message) : Exception(func_name, message) {}
DataSetIException::DataSetIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataSetIException overloaded constructor
///\brief Creates a DataSetIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
DataSetIException::DataSetIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: DataSetIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
DataSetIException::~DataSetIException() {}
//--------------------------------------------------------------------------
// Subclass: AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: AttributeIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
AttributeIException::AttributeIException():Exception(){}
AttributeIException::AttributeIException(const string& func_name, const string& message) : Exception(func_name, message) {}
AttributeIException::AttributeIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: AttributeIException overloaded constructor
///\brief Creates an AttributeIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
AttributeIException::AttributeIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: AttributeIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
AttributeIException::~AttributeIException() {}
//--------------------------------------------------------------------------
// Subclass: ReferenceException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: ReferenceException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
ReferenceException::ReferenceException():Exception(){}
ReferenceException::ReferenceException(const string& func_name, const string& message) : Exception(func_name, message) {}
ReferenceException::ReferenceException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: ReferenceException overloaded constructor
///\brief Creates a ReferenceException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
ReferenceException::ReferenceException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: ReferenceException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
ReferenceException::~ReferenceException() {}
//--------------------------------------------------------------------------
// Subclass: LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: LibraryIException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
LibraryIException::LibraryIException():Exception(){}
LibraryIException::LibraryIException(const string& func_name, const string& message) : Exception(func_name, message) {}
LibraryIException::LibraryIException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: LibraryIException overloaded constructor
///\brief Creates a LibraryIException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
LibraryIException::LibraryIException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: LibraryIException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
LibraryIException::~LibraryIException() {}
//--------------------------------------------------------------------------
// Subclass: IdComponentException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: IdComponentException default constructor
///\brief Default constructor.
//--------------------------------------------------------------------------
IdComponentException::IdComponentException(): Exception() {}
IdComponentException::IdComponentException(const string& func_name, const string& message) : Exception(func_name, message) {}
IdComponentException::IdComponentException(const char* func_name, const char* message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: IdComponentException overloaded constructor
///\brief Creates a IdComponentException with the name of the function,
/// in which the failure occurs, and an optional detailed message.
///\param func_name - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
//--------------------------------------------------------------------------
IdComponentException::IdComponentException(const string func_name, const string message) : Exception(func_name, message) {}
//--------------------------------------------------------------------------
// Function: IdComponentException destructor
///\brief Noop destructor.
//--------------------------------------------------------------------------
IdComponentException::~IdComponentException() {}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

View File

@@ -27,22 +27,15 @@ namespace H5 {
class H5_DLLCPP Exception {
public:
// Default constructor
Exception();
// Creates an exception with a function name where the failure occurs
// and an optional detailed message
Exception( const string& func_name, const string& message = 0);
Exception( const char* func_name, const char* message = NULL);
Exception(const string func_name, const string message = DEFAULT_MSG);
// copy constructor
Exception( const Exception& orig);
// Returns the character string that describes an error specified by
// Returns a character string that describes the error specified by
// a major error number.
string getMajorString( H5E_major_t major_num ) const;
// Returns the character string that describes an error specified by
// Returns a character string that describes the error specified by
// a minor error number.
string getMinorString( H5E_minor_t minor_num ) const;
@@ -53,7 +46,7 @@ class H5_DLLCPP Exception {
const char* getCFuncName() const; // function name as a char string
// Turns on the automatic error printing.
static void setAutoPrint( H5E_auto_t func, void* client_data);
static void setAutoPrint( H5E_auto_t& func, void* client_data);
// Turns off the automatic error printing.
static void dontPrint();
@@ -73,6 +66,12 @@ class H5_DLLCPP Exception {
// Prints the error stack in a default manner.
virtual void printError( FILE* stream = NULL ) const;
// Default constructor
Exception();
// copy constructor
Exception( const Exception& orig);
// virtual Destructor
virtual ~Exception();
@@ -83,87 +82,81 @@ class H5_DLLCPP Exception {
#if defined(WIN32)
#pragma warning(disable: 4251)
#endif
string detailMessage;
string funcName;
string detail_message;
string func_name;
protected:
// Default value for detail_message
static const string DEFAULT_MSG;
};
class H5_DLLCPP FileIException : public Exception {
public:
FileIException( const string func_name, const string message = DEFAULT_MSG);
FileIException();
FileIException( const string& func_name, const string& message = NULL);
FileIException( const char* func_name, const char* message = NULL);
virtual ~FileIException();
};
class H5_DLLCPP GroupIException : public Exception {
public:
GroupIException( const string func_name, const string message = DEFAULT_MSG);
GroupIException();
GroupIException( const string& func_name, const string& message=NULL);
GroupIException( const char* func_name, const char* message = NULL);
virtual ~GroupIException();
};
class H5_DLLCPP DataSpaceIException : public Exception {
public:
DataSpaceIException(const string func_name, const string message = DEFAULT_MSG);
DataSpaceIException();
DataSpaceIException(const string& func_name, const string& message=NULL);
DataSpaceIException(const char* func_name, const char* message = NULL);
virtual ~DataSpaceIException();
};
class H5_DLLCPP DataTypeIException : public Exception {
public:
DataTypeIException(const string func_name, const string message = DEFAULT_MSG);
DataTypeIException();
DataTypeIException(const string& func_name, const string& message = NULL);
DataTypeIException(const char* func_name, const char* message = NULL);
virtual ~DataTypeIException();
};
class H5_DLLCPP PropListIException : public Exception {
public:
PropListIException(const string func_name, const string message = DEFAULT_MSG);
PropListIException();
PropListIException(const string& func_name, const string& message=NULL);
PropListIException(const char* func_name, const char* message = NULL);
virtual ~PropListIException();
};
class H5_DLLCPP DataSetIException : public Exception {
public:
DataSetIException(const string func_name, const string message = DEFAULT_MSG);
DataSetIException();
DataSetIException(const string& func_name, const string& message=NULL);
DataSetIException(const char* func_name, const char* message = NULL);
virtual ~DataSetIException();
};
class H5_DLLCPP AttributeIException : public Exception {
public:
AttributeIException(const string func_name, const string message = DEFAULT_MSG);
AttributeIException();
AttributeIException(const string& func_name, const string& message=NULL);
AttributeIException(const char* func_name, const char* message = NULL);
virtual ~AttributeIException();
};
class H5_DLLCPP ReferenceException : public Exception {
public:
ReferenceException(const string func_name, const string message = DEFAULT_MSG);
ReferenceException();
ReferenceException(const string& func_name, const string& message=NULL);
ReferenceException(const char* func_name, const char* message = NULL);
virtual ~ReferenceException();
};
class H5_DLLCPP LibraryIException : public Exception {
public:
LibraryIException(const string func_name, const string message = DEFAULT_MSG);
LibraryIException();
LibraryIException(const string& func_name, const string& message=NULL);
LibraryIException(const char* func_name, const char* message = NULL);
virtual ~LibraryIException();
};
class H5_DLLCPP IdComponentException : public Exception {
public:
IdComponentException(const string func_name, const string message = DEFAULT_MSG);
IdComponentException();
IdComponentException(const string& func_name, const string& message=NULL);
IdComponentException(const char* func_name, const char* message = NULL);
virtual ~IdComponentException();
};

View File

@@ -25,145 +25,457 @@
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for default property
//--------------------------------------------------------------------------
const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT );
// Creates a file access property list
//--------------------------------------------------------------------------
// Function: FileAccPropList default constructor
///\brief Default constructor: creates a file access property list.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {}
// Copy constructor: makes a copy of the original FileAccPropList object;
FileAccPropList::FileAccPropList( const FileAccPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
// Function: FileAccPropList copy constructor
///\brief Copy constructor: makes a copy of the original FileAccPropList.
/// FileAccPropList object
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const FileAccPropList& orig) : PropList(orig) {}
/* commented out for 1.3.x, only in 1.2.x
//--------------------------------------------------------------------------
// Function: FileAccPropList overloaded constructor
///\brief Creates a file access property list using the id of an
/// existing one.
// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) {}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setStdio
///\brief Modifies this property list to use the \c H5FD_STDIO driver.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setStdio() const
{
herr_t ret_value = H5Pset_stdio( id );
herr_t ret_value = H5Pset_fapl_stdio(id);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setStdio", "H5Pset_stdio failed");
throw PropListIException("FileAccPropList::setStdio", "H5Pset_fapl_stdio failed");
}
}
bool FileAccPropList::getStdio() const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getDriver
///\brief Return the ID of the low-level file driver.
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t FileAccPropList::getDriver() const
{
herr_t ret_value = H5Pget_stdio( id );
if( ret_value < 0 )
return( false );
else
return( true );
}
H5F_driver_t FileAccPropList::getDriver() const
{
H5F_driver_t driver = H5Pget_driver( id );
if( driver == H5F_LOW_ERROR )
hid_t driver = H5Pget_driver( id );
if (driver < 0)
{
throw PropListIException("FileAccPropList::getDriver", "H5Pget_driver failed");
}
return( driver );
}
void FileAccPropList::setSec2() const
//--------------------------------------------------------------------------
// Function: FileAccPropList::setDriver
///\brief Set file driver for this property list.
///\param new_driver_id - IN: File driver
///\param new_driver_info - IN: Struct containing the driver-specific properites
///\exception H5::PropListIException
///\par Description
/// For a list of valid driver identifiers, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
{
herr_t ret_value = H5Pset_sec2( id );
if( ret_value < 0 )
herr_t ret_value = H5Pset_driver(id, new_driver_id, new_driver_info);
if (ret_value < 0)
{
throw PropListIException("FileAccPropList::setSec2", "H5Pset_sec2 failed");
throw PropListIException("FileAccPropList::setDriver", "H5Pset_driver failed");
}
}
bool FileAccPropList::getSec2() const
//--------------------------------------------------------------------------
// Function: FileAccPropList::setFamilyOffset
///\brief Sets offset for family driver.
///\param offset - IN: offset value
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFamilyOffset(hsize_t offset) const
{
herr_t ret_value = H5Pget_sec2( id );
if( ret_value < 0 )
return( false );
else
return( true );
}
void FileAccPropList::setCore( size_t increment ) const
{
herr_t ret_value = H5Pset_core( id, increment );
if( ret_value < 0 )
herr_t ret_value = H5Pset_family_offset(id, offset);
if (ret_value < 0)
{
throw PropListIException("FileAccPropList::setCore", "H5Pset_core failed");
throw PropListIException("FileAccPropList::setFamilyOffset", "H5Pset_family_offset failed");
}
}
bool FileAccPropList::getCore( size_t& increment) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFamilyOffset
///\brief Get offset for family driver.
///\return Offset for family driver
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getFamilyOffset() const
{
herr_t ret_value = H5Pget_core( id, &increment );
if( ret_value < 0 )
return( false );
else
return( true );
hsize_t offset;
herr_t ret_value = H5Pget_family_offset(id, &offset);
if (ret_value < 0)
{
throw PropListIException("FileAccPropList::getFamilyOffset", "H5Pget_family_offset failed");
}
return(offset);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setCore
///\brief Modifies this file access property list to use the \c H5FD_CORE
/// driver.
///\param increment - IN: Specifies how much memory to increase each
/// time more memory is needed, in bytes
///\param backing_store - IN: Indicating whether to write the file
/// contents to disk when the file is closed
///\exception H5::PropListIException
///\par Description
/// For more details on the use of \c H5FD_CORE driver, please
/// refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplCore
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
{
herr_t ret_value = H5Pset_fapl_core (id, increment, backing_store);
if (ret_value < 0)
{
throw PropListIException ("FileAccPropList::setCore", "H5Pset_fapl_core failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getCore
///\brief Queries core file driver properties.
///\param increment - OUT: Size of memory increment, in bytes
///\param backing_store - OUT: Indicating whether to write the file
/// contents to disk when the file is closed
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
{
herr_t ret_value = H5Pget_fapl_core(id, &increment, &backing_store);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getCore", "H5Pget_fapl_core failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setFamily
///\brief Sets this file access property list to use the family driver.
///\param memb_size - IN: Size in bytes of each file member
///\param memb_plist - IN: File access property list to be used for
/// each family member
///\exception H5::PropListIException
///\par Description
/// Note that \a memb_size is used only when creating a new file.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const
{
herr_t ret_value = H5Pset_family( id, memb_size, memb_plist.getId() );
herr_t ret_value = H5Pset_fapl_family (id, memb_size, memb_plist.getId() );
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setFamily", "H5Pset_family failed");
throw PropListIException("FileAccPropList::setFamily", "H5Pset_fapl_family failed");
}
}
//Note: working on this return value here. added copy constructor
//that uses PropList copy const. but din't work
// Determines whether the file access property list is set to the family
// driver then retrieves the family member's property list and returns
// true or false
bool FileAccPropList::getFamily( hsize_t& memb_size, FileAccPropList& memb_plist ) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFamily
///\brief Returns information about the family file access property
/// list.
///\param memb_size - OUT: Size in bytes of each file member
///\param memb_plist - OUT: Retrieved file access property list for each
/// file member
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const
{
hid_t memb_plist_id;
herr_t ret_value = H5Pget_family( id, &memb_size, &memb_plist_id );
herr_t ret_value = H5Pget_fapl_family( id, &memb_size, &memb_plist_id );
if( ret_value < 0 )
{
memb_plist.setId( 0 );
return( false );
}
else
{
memb_plist.setId( memb_plist_id );
return( true );
throw PropListIException("FileAccPropList::getFamily", "H5Pget_fapl_family failed");
}
memb_plist.setId(memb_plist_id);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFamily
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts and its return value.
///\param memb_size - OUT: Size in bytes of each file member
///\return The file access property list for each file member
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
{
hid_t memb_plist_id;
herr_t ret_value = H5Pget_fapl_family( id, &memb_size, &memb_plist_id );
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getFamily", "H5Pget_fapl_family failed");
}
FileAccPropList memb_plist(memb_plist_id);
return(memb_plist);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief Emulates the old split file driver, which stored meta data
/// in one file and raw data in another file.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c char*
///\param raw_ext - IN: Raw data filename extension as \c char*
///\exception H5::PropListIException
///\par Description
/// Temporary - For information, please refer to:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
hid_t meta_pid = meta_plist.getId();
hid_t raw_pid = raw_plist.getId();
herr_t ret_value = H5Pset_split( id, meta_ext, meta_pid, raw_ext, raw_pid );
herr_t ret_value = H5Pset_fapl_split( id, meta_ext, meta_pid, raw_ext, raw_pid );
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setSplit", "H5Pset_split failed");
{
throw PropListIException("FileAccPropList::setSplit", "H5Pset_fapl_split failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c string
///\param raw_ext - IN: Raw data filename extension as \c string
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const string& meta_ext, const string& raw_ext ) const
{
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
void FileAccPropList::getSplit( size_t meta_ext_size, string& meta_ext, FileAccPropList& meta_plist, size_t raw_ext_size, string& raw_ext, FileAccPropList& raw_plist ) const
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
//--------------------------------------------------------------------------
// Function: FileAccPropList::getStream
///\brief Retrieves the streaming I/O driver settings
///\return The streaming I/O file access property list structure
/// For detail on this structure, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5FD_stream_fapl_t FileAccPropList::getStream() const
{
hid_t meta_plist_id, raw_plist_id; // meta-data and raw-data plist ids
char* meta_ext_C = new char[meta_ext_size]; // meta-data extension in C
char* raw_ext_C = new char[raw_ext_size]; // raw-data extension in C
herr_t ret_value = H5Pget_split( id, meta_ext_size, meta_ext_C,
&meta_plist_id, raw_ext_size, raw_ext_C, &raw_plist_id );
H5FD_stream_fapl_t fapl;
herr_t ret_value = H5Pget_fapl_stream(id, &fapl);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getSplit", "H5Pget_split failed");
throw PropListIException("FileAccPropList::getStream", "H5Pget_fapl_stream failed");
}
meta_plist.setId( meta_plist_id );
raw_plist.setId( raw_plist_id );
raw_ext = string( raw_ext_C );
meta_ext = string( raw_ext_C );
delete [] raw_ext_C;
delete [] meta_ext_C;
return(fapl);
}
*/
//--------------------------------------------------------------------------
// Function: FileAccPropList::setStream
///\brief Modifies this file access property list to use the Stream
/// driver.
///\param fapl - IN: The streaming I/O file access property list
///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
{
herr_t ret_value = H5Pset_fapl_stream (id, &fapl);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setStream", "H5Pset_fapl_stream failed");
}
}
#endif // Stream Virtual File Driver
//--------------------------------------------------------------------------
// Function: FileAccPropList::getSieveBufSize
///\brief Returns the current settings for the data sieve buffer size
/// property from this property list.
///\return Data sieve buffer size, in bytes
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t FileAccPropList::getSieveBufSize() const
{
size_t bufsize;
herr_t ret_value = H5Pget_sieve_buf_size(id, &bufsize);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getSieveBufSize", "H5Pget_sieve_buf_size failed");
}
return(bufsize);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSieveBufSize
///\brief Sets the maximum size of the data sieve buffer.
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSieveBufSize(size_t bufsize) const
{
herr_t ret_value = H5Pset_sieve_buf_size(id, bufsize);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getSieveBufSize", "H5Pget_sieve_buf_size failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setMetaBlockSize
///\brief Sets the minimum size of metadata block allocations.
///\param block_size - IN: Minimum size, in bytes, of metadata
/// block allocations
///\exception H5::PropListIException
///\par Description
/// For more detail, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
{
herr_t ret_value = H5Pset_meta_block_size(id, block_size);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setMetaBlockSize", "H5Pset_meta_block_size failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getMetaBlockSize
///\brief Returns the current metadata block size setting.
///\return Metadata block size
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getMetaBlockSize() const
{
hsize_t block_size;
herr_t ret_value = H5Pget_meta_block_size(id, &block_size);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getMetaBlockSize", "H5Pget_meta_block_size failed");
}
return(block_size);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setLog
///\brief Modifies this file access property list to use the logging
/// driver.
///\param logfile - IN: Name of the log file
///\param flags - IN: Flags specifying the types of logging activity
///\param buf_size - IN: Size of the logging buffer
///\exception H5::PropListIException
///\par Description
/// For detail on \a flags, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
{
herr_t ret_value = H5Pset_fapl_log(id, logfile, flags, buf_size);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setLog", "H5Pset_fapl_log failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setLog
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param logfile - IN: Name of the log file - string
///\param flags - IN: Flags specifying the types of logging activity
///\param buf_size - IN: Size of the logging buffer
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setLog(const string& logfile, unsigned flags, size_t buf_size) const
{
setLog(logfile.c_str(), flags, buf_size);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSec2
///\brief Modifies this file access property list to use the sec2
/// driver.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSec2() const
{
herr_t ret_value = H5Pset_fapl_sec2(id);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setSec2", "H5Pset_fapl_sec2 failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setAlignment
///\brief Sets the alignment properties of this property list.
///\param threshold - IN: Threshold value for file object size
///\param alignment - IN: Alignment value
///\exception H5::PropListIException
///\par Description
/// The parameter \a threshold must have a non-negative value.
/// Note that setting the threshold value to 0 (zero) has the
/// 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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment
//--------------------------------------------------------------------------
void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
{
herr_t ret_value = H5Pset_alignment( id, threshold, alignment );
@@ -173,7 +485,15 @@ void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
}
}
void FileAccPropList::getAlignment( hsize_t& threshold, hsize_t& alignment ) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getAlignment
///\brief Returns the current settings for alignment properties from
/// this property list.
///\param threshold - OUT: Retrieved threshold value for file object size
///\param alignment - OUT: Retrieved alignment value
///\exception H5::PropListIException
//--------------------------------------------------------------------------
void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) const
{
herr_t ret_value = H5Pget_alignment( id, &threshold, &alignment );
if( ret_value < 0 )
@@ -182,27 +502,62 @@ void FileAccPropList::getAlignment( hsize_t& threshold, hsize_t& alignment ) con
}
}
/* MPI_Comm and MPI_Info not declared in serial mode so leave these
routines out until C++ API needs to deal with parallel
void FileAccPropList::setMpi( MPI_Comm comm, MPI_Info info ) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::setMultiType
///\brief Sets data type for \c MULTI driver.
///\param dtype - IN: Type of data
///\exception H5::PropListIException
///\par Description
/// More details and valid values for \a dtype can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
{
herr_t ret_value = H5Pset_mpi( id, comm, info );
herr_t ret_value = H5Pset_multi_type(id, dtype);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setMpi", "H5Pset_mpi failed");
throw PropListIException("FileAccPropList::setMultiType", "H5Pset_multi_type failed");
}
}
void FileAccPropList::getMpi( MPI_Comm& comm, MPI_Info& info ) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getMultiType
///\brief Returns the data type property for \c MULTI driver.
///\return The data type property
///\exception H5::PropListIException
///\par Description
/// More details and possible returned values can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5FD_mem_t FileAccPropList::getMultiType() const
{
herr_t ret_value = H5Pget_mpi( id, &comm, &info );
H5FD_mem_t dtype;
herr_t ret_value = H5Pget_multi_type(id, &dtype);
if( ret_value < 0 )
return( false );
else
return( true );
{
throw PropListIException("FileAccPropList::getMultiType", "H5Pget_multi_type failed");
}
return(dtype);
}
*/
//--------------------------------------------------------------------------
// Function: FileAccPropList::setCache
///\brief Sets the meta data cache and raw data chunk cache parameters.
///\param mdc_nelmts - IN: Number of elements in the meta data cache
///\param rdcc_nelmts - IN: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - IN: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - IN: Preemption policy
///\exception H5::PropListIException
///\par Description
/// The argument \a rdcc_w0 should hold a value between 0 and 1
/// inclusive. This value indicates how much chunks that have
/// been fully read are favored for preemption. A value of zero
/// means fully read chunks are treated no differently than other
/// chunks (the preemption is strictly LRU) while a value of one
/// means fully read chunks are always preempted before other chunks.
//--------------------------------------------------------------------------
#ifdef H5_WANT_H5_V1_4_COMPAT
void FileAccPropList::setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const
{
@@ -213,6 +568,15 @@ void FileAccPropList::setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nby
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getCache
///\brief Queries the meta data cache and raw data chunk cache parameters.
///\param mdc_nelmts - OUT: Number of elements in the meta data cache
///\param rdcc_nelmts - OUT: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - OUT: Preemption policy
///\exception H5::PropListIException
//--------------------------------------------------------------------------
void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const
{
herr_t ret_value = H5Pget_cache( id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0 );
@@ -222,6 +586,22 @@ void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_
}
}
#else /* H5_WANT_H5_V1_4_COMPAT */
//--------------------------------------------------------------------------
// Function: FileAccPropList::setCache
///\brief Sets the meta data cache and raw data chunk cache parameters.
///\param mdc_nelmts - IN: Number of elements in the meta data cache
///\param rdcc_nelmts - IN: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - IN: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - IN: Preemption policy
///\exception H5::PropListIException
///\par Description
/// The argument \a rdcc_w0 should hold a value between 0 and 1
/// inclusive. This value indicates how much chunks that have
/// been fully read are favored for preemption. A value of zero
/// means fully read chunks are treated no differently than other
/// chunks (the preemption is strictly LRU) while a value of one
/// means fully read chunks are always preempted before other chunks.
//--------------------------------------------------------------------------
void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const
{
herr_t ret_value = H5Pset_cache( id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 );
@@ -231,6 +611,15 @@ void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getCache
///\brief Queries the meta data cache and raw data chunk cache parameters.
///\param mdc_nelmts - OUT: Number of elements in the meta data cache
///\param rdcc_nelmts - OUT: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - OUT: Preemption policy
///\exception H5::PropListIException
//--------------------------------------------------------------------------
void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const
{
herr_t ret_value = H5Pget_cache( id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0 );
@@ -241,6 +630,50 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd
}
#endif /* H5_WANT_H5_V1_4_COMPAT */
//--------------------------------------------------------------------------
// Function: FileAccPropList::setFcloseDegree
///\brief Sets the degree for the file close behavior.
///\param degree - IN:
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
{
herr_t ret_value = H5Pset_fclose_degree(id, degree);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::setFcloseDegree", "H5Pset_fclose_degree failed");
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFcloseDegree
///\brief Returns the degree for the file close behavior.
///\return The degree for the file close behavior
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5F_close_degree_t FileAccPropList::getFcloseDegree()
{
H5F_close_degree_t degree;
herr_t ret_value = H5Pget_fclose_degree(id, &degree);
if( ret_value < 0 )
{
throw PropListIException("FileAccPropList::getFcloseDegree", "H5Pget_fclose_degree failed");
}
return(degree);
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::setGcReferences
///\brief Sets garbage collecting references flag.
///\param gc_ref - IN: Flag setting reference garbage collection to
/// on (1) or off (0).
///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
//--------------------------------------------------------------------------
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
{
herr_t ret_value = H5Pset_gc_references( id, gc_ref );
@@ -250,6 +683,12 @@ void FileAccPropList::setGcReferences( unsigned gc_ref ) const
}
}
//--------------------------------------------------------------------------
// Function: FileAccPropList::getGcReferences
///\brief Returns the garbage collecting references setting.
///\return Garbage collecting references setting, 0 (off) or 1 (on)
///\exception H5::PropListIException
//--------------------------------------------------------------------------
unsigned FileAccPropList::getGcReferences() const
{
unsigned gc_ref;
@@ -263,6 +702,11 @@ unsigned FileAccPropList::getGcReferences() const
return( gc_ref );
}
//--------------------------------------------------------------------------
// Function: FileAccPropList destructor
///\brief Noop destructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::~FileAccPropList() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -25,88 +25,93 @@ class H5_DLLCPP FileAccPropList : public PropList {
public:
static const FileAccPropList DEFAULT;
// Creates a file access property list.
FileAccPropList();
// Modifies this property list to use the H5FD_STDIO driver
void setStdio() const;
// Copy constructor: creates a copy of a FileAccPropList object
FileAccPropList( const FileAccPropList& orig );
// Set file driver for this property list
void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
// Sets the low level file driver to use the functions
// declared in the stdio.h
// void setStdio() const;
// Returns a low-level file driver identifier.
hid_t getDriver() const;
// Determines whether the file access property list is set to the
// stdio driver.
// bool getStdio() const;
// Sets offset for family driver.
void setFamilyOffset(hsize_t offset) const;
// Gets offset for family driver.
hsize_t getFamilyOffset() const;
// Modifies this file access property list to use the sec2 driver.
void setSec2() const;
// Modifies this file access property list to use the H5FD_CORE
// driver.
void setCore (size_t increment, hbool_t backing_store) const;
// Queries H5FD_CORE driver properties.
void getCore (size_t& increment, hbool_t& backing_store) const;
// Sets this file access properties list to the family driver.
void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const;
// Returns information about the family file access property list.
void getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const;
FileAccPropList getFamily(hsize_t& memb_size) const;
// Emulates the old split file driver,
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const string& meta_ext, const string& raw_ext ) const;
#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
// Modifies this file access property list to use the Stream driver.
void setStream(H5FD_stream_fapl_t &fapl) const;
// Retrieves the streaming I/O driver settings
H5FD_stream_fapl_t getStream() const;
#endif
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
// Returns the current settings for the data sieve buffer size
// property
size_t getSieveBufSize() const;
// Sets the minimum size of metadata block allocations.
void setMetaBlockSize(hsize_t &block_size) const;
// Returns the current metadata block size setting.
hsize_t getMetaBlockSize() const;
// Modifies this file access property list to use the logging driver.
void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
void setLog(const string& logfile, unsigned flags, size_t buf_size) const;
// Sets alignment properties of this file access property list
void setAlignment( hsize_t threshold = 1, hsize_t alignment = 1 ) const;
// Retrieves the current settings for alignment properties from
// this file access property list.
// this property list.
void getAlignment( hsize_t& threshold, hsize_t& alignment ) const;
/* MPI stuff not working in serial mode
//void setMpi( MPI_Comm comm, MPI_Info info ) const;
//void getMpi( MPI_Comm& comm, MPI_Info& info ) const;
*/
// Sets data type for multi driver.
void setMultiType(H5FD_mem_t dtype) const;
// Returns a low-level file driver identifier.
// H5F_driver_t getDriver() const;
// Returns the data type property for MULTI driver.
H5FD_mem_t getMultiType() const;
// Sets the low-level file driver to use the declared functions.
// void setSec2() const;
// Determines whether this file access property list is set to the
// sec2 driver.
// bool getSec2() const;
// Sets the low-level file driver to use malloc() and free().
// void setCore( size_t increment ) const;
// Determines whether this file access property list is set to the
// core driver and retrieves the increment.
// bool getCore( size_t& increment ) const;
// Sets this file access properties list to the family driver.
// void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const;
// Determines whether this file access property list is set to the
// family driver and retrieves the member's file access property list.
// bool getFamily( hsize_t& memb_size, FileAccPropList& memb_plist ) const;
#ifdef H5_WANT_H5_V1_4_COMPAT
// Sets the meta data cache and raw data chunk cache parameters.
void setCache( int mdc_nelmts, int rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
// Retrieves maximum sizes of data caches and the preemption
// policy value.
void getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
#else /* H5_WANT_H5_V1_4_COMPAT */
// Sets the meta data cache and raw data chunk cache parameters.
void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
// Retrieves maximum sizes of data caches and the preemption
// policy value.
// Queries the meta data cache and raw data chunk cache parameters.
void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Sets the low-level driver to split meta data from raw data.
// void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
// const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
// Sets the degree for the file close behavior.
void setFcloseDegree(H5F_close_degree_t degree);
// void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
// const string& meta_ext, const string& raw_ext ) const;
// Determines whether this file access property list is set to the
// split driver and retrieves the meta-data and raw-data property lists.
// void getSplit( size_t meta_ext_size, string& meta_ext, FileAccPropList&
// meta_plist, size_t raw_ext_size, string& raw_ext, FileAccPropList&
// raw_plist ) const;
// Proposal: 2 separate functions
//FileAccPropList getMetaPlist( size_t meta_ext_size, char* meta_ext );
//FileAccPropList getRawPlist( size_t raw_ext_size, char* raw_ext );
// Returns the degree for the file close behavior.
H5F_close_degree_t getFcloseDegree();
// Sets garbage collecting references flag.
void setGcReferences( unsigned gc_ref = 0 ) const;
@@ -114,9 +119,15 @@ class H5_DLLCPP FileAccPropList : public PropList {
// Returns garbage collecting references setting.
unsigned getGcReferences() const;
// Creates a file access property list.
FileAccPropList();
// Copy constructor: creates a copy of a FileAccPropList object.
FileAccPropList( const FileAccPropList& original );
// Creates a copy of an existing file access property list
// using the property list id
FileAccPropList (const hid_t plist_id) : PropList( plist_id ) {}
// using the property list id.
FileAccPropList (const hid_t plist_id);
// Default destructor
virtual ~FileAccPropList();

View File

@@ -25,18 +25,51 @@
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for default property
//--------------------------------------------------------------------------
const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT );
// Creates a file create property list
//--------------------------------------------------------------------------
// Function: FileCreatPropList default constructor
///\brief Default constructor: creates a file creation property list.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {}
// Copy constructor: makes a copy of the original FileCreatPropList object;
FileCreatPropList::FileCreatPropList( const FileCreatPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
// Function: FileCreatPropList overloaded constructor
///\brief Creates a file creation property list using the id of an
/// existing one.
///\param plist_id - IN: FileCreatPropList id to use
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
//--------------------------------------------------------------------------
// Function: FileCreatPropList copy constructor
///\brief Copy constructor: makes a copy of the original FileCreatPropList object.
///\param original - IN: FileCreatPropList instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList(const FileCreatPropList& original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getVersion
///\brief Retrieves version information for various parts of a file.
///\param super - OUT: The file super block.
///\param freelist - OUT: The global free list.
///\param stab - OUT: The root symbol table entry.
///\param shhdr - OUT: Shared object headers.
///\exception H5::PropListIException
///\par Description
/// Any (or even all) of the output arguments can be null pointers.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::getVersion(
int& boot, int& freelist, int& stab, int& shhdr ) const
int& super, int& freelist, int& stab, int& shhdr ) const
{
herr_t ret_value = H5Pget_version( id, &boot, &freelist, &stab, &shhdr );
herr_t ret_value = H5Pget_version( id, &super, &freelist, &stab, &shhdr );
if( ret_value < 0 )
{
throw PropListIException("FileCreatPropList::getVersion",
@@ -44,6 +77,16 @@ void FileCreatPropList::getVersion(
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::setUserblock
///\brief Sets the user block size field of this file creation property list.
///\param size - IN: User block size to be set, in bytes
///\exception H5::PropListIException
///\par Description
/// The default user block size is 0; it may be set to any power
/// of 2 equal to 512 or greater (512, 1024, 2048, etc.)
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setUserblock( hsize_t size ) const
{
herr_t ret_value = H5Pset_userblock( id, size);
@@ -54,6 +97,13 @@ void FileCreatPropList::setUserblock( hsize_t size ) const
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getUserblock
///\brief Returns the user block size of this file creation property list.
///\return User block size
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t FileCreatPropList::getUserblock() const
{
hsize_t userblock_size;
@@ -66,6 +116,19 @@ hsize_t FileCreatPropList::getUserblock() const
return( userblock_size );
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::setSizes
///\brief Sets the byte size of the offsets and lengths used to
/// address objects in an HDF5 file.
///\param sizeof_addr - IN: Size of an object offset in bytes
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSizes
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
{
herr_t ret_value = H5Pset_sizes( id, sizeof_addr, sizeof_size );
@@ -76,6 +139,13 @@ void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getSizes
///\brief Retrieves the size of the offsets and lengths used in an
/// HDF5 file.
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const
{
herr_t ret_value = H5Pget_sizes( id, &sizeof_addr, &sizeof_size );
@@ -87,6 +157,18 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con
}
#ifdef H5_WANT_H5_V1_4_COMPAT
//--------------------------------------------------------------------------
// Function: FileCreatPropList::setSymk
///\brief Sets the size of parameters used to control the symbol table
/// nodes.
///\param ik - IN: Symbol table tree rank
///\param lk - IN: Symbol table node size
///\exception H5::PropListIException
///\par Description
/// For information, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setSymk( int ik, int lk ) const
{
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
@@ -97,6 +179,16 @@ void FileCreatPropList::setSymk( int ik, int lk ) const
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getSymk
///\brief Retrieves the size of the symbol table B-tree 1/2 rank and
/// the symbol table leaf node 1/2 size.
///\exception H5::PropListIException
///\par Description
/// For information, please see
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::getSymk( int& ik, int& lk ) const
{
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
@@ -107,6 +199,18 @@ void FileCreatPropList::getSymk( int& ik, int& lk ) const
}
}
#else /* H5_WANT_H5_V1_4_COMPAT */
//--------------------------------------------------------------------------
// Function: FileCreatPropList::setSymk
///\brief Sets the size of parameters used to control the symbol table
/// nodes.
///\param ik - IN: Symbol table tree rank
///\param lk - IN: Symbol table node size
///\exception H5::PropListIException
///\par Description
/// For information, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setSymk( int ik, unsigned lk ) const
{
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
@@ -117,6 +221,16 @@ void FileCreatPropList::setSymk( int ik, unsigned lk ) const
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getSymk
///\brief Retrieves the size of the symbol table B-tree 1/2 rank and
/// the symbol table leaf node 1/2 size.
///\exception H5::PropListIException
///\par Description
/// For information, please see
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const
{
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
@@ -128,6 +242,17 @@ void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const
}
#endif /* H5_WANT_H5_V1_4_COMPAT */
//--------------------------------------------------------------------------
// Function: FileCreatPropList::setIstorek
///\brief Sets the size of the parameter used to control the B-trees
/// for indexing chunked datasets.
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setIstorek( int ik ) const
{
herr_t ret_value = H5Pset_istore_k( id, ik );
@@ -137,6 +262,16 @@ void FileCreatPropList::setIstorek( int ik ) const
"H5Pset_istore_k failed");
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getIstorek
///\brief Returns the 1/2 rank of an indexed storage B-tree.
///\return 1/2 rank of chunked storage B-tree
///\exception H5::PropListIException
///\par Description
/// For information, please see
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int FileCreatPropList::getIstorek() const
{
int ik;
@@ -149,7 +284,11 @@ int FileCreatPropList::getIstorek() const
return( ik );
}
// Default destructor
//--------------------------------------------------------------------------
// Function: FileCreatPropList destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::~FileCreatPropList() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -23,58 +23,59 @@ namespace H5 {
// class for file access properties
class H5_DLLCPP FileCreatPropList : public PropList {
public:
// Default file creation property list.
static const FileCreatPropList DEFAULT;
// Creates a file create property list.
// Creates a file creation property list.
FileCreatPropList();
// Copy constructor: creates a copy of a FileCreatPropList object
FileCreatPropList( const FileCreatPropList& orig );
// Retrieves version information for various parts of a file.
void getVersion( int& boot, int& freelist, int& stab, int& shhdr ) const;
// Sets the userblock size field of a file creation property list.
void setUserblock( hsize_t size ) const;
// Gets the size of a user block in this file creation property list.
hsize_t getUserblock() const;
// Sets file size-of addresses and sizes.
void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const;
// Retrieves the size-of address and size quantities stored in a
// file according to this file creation property list.
void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const;
#ifdef H5_WANT_H5_V1_4_COMPAT
// Sets the size of parameters used to control the symbol table nodes.
void setSymk( int int_nodes_k, int leaf_nodes_k ) const;
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
void getSymk( int& int_nodes_k, int& leaf_nodes_k ) const;
#else /* H5_WANT_H5_V1_4_COMPAT */
// Sets the size of parameters used to control the symbol table nodes.
void setSymk( int int_nodes_k, unsigned leaf_nodes_k ) const;
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
void getSymk( int& int_nodes_k, unsigned& leaf_nodes_k ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Returns the 1/2 rank of an indexed storage B-tree.
int getIstorek() const;
// Sets the size of parameter used to control the B-trees for
// indexing chunked datasets.
void setIstorek( int ik ) const;
// Returns the 1/2 rank of an indexed storage B-tree.
int getIstorek() const;
// Retrieves the size-of address and size quantities stored in a
// file according to this file creation property list.
void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const;
// Sets file size-of addresses and sizes.
void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const;
#ifdef H5_WANT_H5_V1_4_COMPAT
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
void getSymk( int& int_nodes_k, int& leaf_nodes_k ) const;
// Sets the size of parameters used to control the symbol table nodes.
void setSymk( int int_nodes_k, int leaf_nodes_k ) const;
#else /* H5_WANT_H5_V1_4_COMPAT */
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
void getSymk( int& int_nodes_k, unsigned& leaf_nodes_k ) const;
// Sets the size of parameters used to control the symbol table nodes.
void setSymk( int int_nodes_k, unsigned leaf_nodes_k ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
// Gets the size of a user block in this file creation property list.
hsize_t getUserblock() const;
// Sets the userblock size field of a file creation property list.
void setUserblock( hsize_t size ) const;
// Retrieves version information for various parts of a file.
void getVersion( int& boot, int& freelist, int& stab, int& shhdr ) const;
// Copy constructor: creates a copy of a FileCreatPropList object
FileCreatPropList(const FileCreatPropList& orig);
// Creates a copy of an existing file create property list
// using the property list id
FileCreatPropList (const hid_t plist_id) : PropList( plist_id ) {}
FileCreatPropList (const hid_t plist_id);
// Default destructor
// Noop destructor.
virtual ~FileCreatPropList();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -42,23 +42,69 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function H5File default constructor
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File() : IdComponent() {}
// Creates or opens an HDF5 file depending on the parameter flags.
H5File::H5File( const string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
getFile( name.c_str(), flags, create_plist, access_plist );
}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
///\brief Creates or opens an HDF5 file depending on the parameter flags.
///\param name - IN: Name of the file
///\param flags - IN: File access flags
///\param create_plist - IN: File creation property list, used when
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileCreatPropList::DEFAULT
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
/// erasing all data previously stored in
/// the file.
/// \li \c H5F_ACC_EXCL - Fail if file already exists.
/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
/// \li \c H5F_ACC_DEBUG - print debug information. This flag is
/// used only by HDF5 library developers; it is neither
/// tested nor supported for use in applications.
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5F.html#File-Create
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
getFile( name, flags, create_plist, access_plist );
p_get_file(name, flags, create_plist, access_plist);
}
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
///\brief This is another overloaded constructor. It differs from the
/// above constructor only in the type of the \a name argument.
///\param name - IN: Name of the file - \c std::string
///\param flags - IN: File access flags
///\param create_plist - IN: File creation property list, used when
/// modifying default file meta-data. Default to
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileCreatPropList::DEFAULT
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist ) : IdComponent()
{
p_get_file(name.c_str(), flags, create_plist, access_plist);
}
//--------------------------------------------------------------------------
// This function is private and contains common code between the
// constructors taking a string or a char*
void H5File::getFile( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist )
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist)
{
// These bits only set for creation, so if any of them are set,
// create the file.
@@ -85,14 +131,23 @@ void H5File::getFile( const char* name, unsigned int flags, const FileCreatPropL
}
}
// Copy constructor: makes a copy of the original H5File object.
//--------------------------------------------------------------------------
// Function: H5File copy constructor
///\brief Copy constructor: makes a copy of the original
/// H5File object.
///\param original - IN: H5File instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File( const H5File& original ) : IdComponent( original ) {}
// Determines whether a file specified by its name in HDF5 format
bool H5File::isHdf5(const string& name )
{
return( isHdf5( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
///\brief Determines whether a file in HDF5 format.
///\param name - IN: Name of the file
///\return true if the file is in HDF5 format, and false, otherwise
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool H5File::isHdf5(const char* name )
{
// Calls C routine H5Fis_hdf5 to determine whether the file is in
@@ -108,15 +163,28 @@ bool H5File::isHdf5(const char* name )
}
}
// Get id of the location, which id the file id here; used by CommonFG
// member functions
hid_t H5File::getLocId() const
//--------------------------------------------------------------------------
// Function: H5File::isHdf5
///\brief This is an overloaded member function, provided for convenience.
/// It takes an \c std::string for \a name.
///\param name - IN: Name of the file - \c std::string
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool H5File::isHdf5(const string& name )
{
return( getId() );
return( isHdf5( name.c_str()) );
}
// Reopens this file
void H5File::reopen()
//--------------------------------------------------------------------------
// Function: H5File::reOpen
///\brief Reopens this file.
///\exception H5::FileIException
// Description
// If this object has represented another HDF5 file, the previous
// HDF5 file need to be closed first.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::reOpen()
{
// reset the identifier of this H5File - send 'this' in so that
// H5Fclose can be called appropriately
@@ -135,7 +203,27 @@ void H5File::reopen()
}
}
// Returns the creation property list of this file
//--------------------------------------------------------------------------
// Function: H5File::reopen
///\brief Reopens this file.
///\exception H5::FileIException
///\par Description
/// This function will be replaced by the above function \c reOpen
/// in future releases.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::reopen()
{
H5File::reOpen();
}
//--------------------------------------------------------------------------
// Function: H5File::getCreatePlist
///\brief Returns the creation property list of this file
///\return FileCreatPropList object
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList H5File::getCreatePlist() const
{
hid_t create_plist_id = H5Fget_create_plist( id );
@@ -153,7 +241,13 @@ FileCreatPropList H5File::getCreatePlist() const
}
}
// Returns the access property list of this file
//--------------------------------------------------------------------------
// Function: H5File::getAccessPlist
///\brief Returns the access property list of this file
///\return FileAccPropList object
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList H5File::getAccessPlist() const
{
hid_t access_plist_id = H5Fget_access_plist( id );
@@ -171,7 +265,280 @@ FileAccPropList H5File::getAccessPlist() const
}
}
// Calls the C API H5Fclose to close this file. Used by IdComponent::reset
//--------------------------------------------------------------------------
// Function: H5File::getFreeSpace
///\brief Returns the amount of free space in the file.
///\return Amount of free space
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
hssize_t H5File::getFreeSpace() const
{
hssize_t free_space = H5Fget_freespace(id);
if( free_space < 0 )
{
throw FileIException("H5File::getFreeSpace", "H5Fget_freespace failed");
}
return (free_space);
}
//--------------------------------------------------------------------------
// Function: H5File::getObjCount
///\brief Returns the number of opened object IDs (files, datasets,
/// groups and datatypes) in the same file.
///\param types - Type of object to retrieve the count
///\return Number of opened object IDs
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
/// \li \c H5F_OBJ_FILE Files only
/// \li \c H5F_OBJ_DATASET Datasets only
/// \li \c H5F_OBJ_GROUP Groups only
/// \li \c H5F_OBJ_DATATYPE Named datatypes only
/// \li \c H5F_OBJ_ATTR Attributes only
/// \li \c H5F_OBJ_ALL All of the above
/// \li \c (i.e., H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR )
/// Multiple object types can be combined with the logical OR operator (|).
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int H5File::getObjCount(unsigned types) const
{
int num_objs = H5Fget_obj_count(id, types);
if( num_objs < 0 )
{
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
}
return (num_objs);
}
//--------------------------------------------------------------------------
// Function: H5File::getObjCount
///\brief This is an overloaded member function, provided for convenience.
/// It takes no parameter and returns the object count of all
/// object types.
///\return Number of opened object IDs
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int H5File::getObjCount() const
{
int num_objs = H5Fget_obj_count(id, H5F_OBJ_ALL);
if( num_objs < 0 )
{
throw FileIException("H5File::getObjCount", "H5Fget_obj_count failed");
}
return (num_objs);
}
//--------------------------------------------------------------------------
// Function: H5File::getObjIDs
///\brief Retrieves a list of opened object IDs (files, datasets,
/// groups and datatypes) in the same file.
///\param types - Type of object to retrieve the count
///\param max_objs - Maximum number of object identifiers to place
/// into obj_id_list.
///\param oid_list - List of open object identifiers
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
/// \li \c H5F_OBJ_FILE Files only
/// \li \c H5F_OBJ_DATASET Datasets only
/// \li \c H5F_OBJ_GROUP Groups only
/// \li \c H5F_OBJ_DATATYPE Named datatypes only
/// \li \c H5F_OBJ_ATTR Attributes only
/// \li \c H5F_OBJ_ALL All of the above
/// \li \c (I.e., H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR )
/// Multiple object types can be combined with the logical OR operator (|).
//
// Notes: will do the overload for this one after hearing from Quincey???
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
void H5File::getObjIDs(unsigned types, int max_objs, hid_t *oid_list) const
{
herr_t ret_value = H5Fget_obj_ids(id, types, max_objs, oid_list);
if( ret_value < 0 )
{
throw FileIException("H5File::getObjIDs", "H5Fget_obj_ids failed");
}
}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
///\brief Returns the pointer to the file handle of the low-level file
/// driver.
///\param fapl - File access property list
///\param file_handle - Pointer to the file handle being used by
/// the low-level virtual file driver
///\exception H5::FileIException
///\par Description
/// For the FAMILY or MULTI drivers, \a fapl should be
/// defined through the property list functions:
/// \c FileAccPropList::setFamilyOffset for the FAMILY driver
/// and \c FileAccPropList::setMultiType for the MULTI driver.
///
/// The obtained file handle is dynamic and is valid only while
/// the file remains open; it will be invalid if the file is
/// closed and reopened or opened during a subsequent session.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
{
hid_t fapl_id = fapl.getId();
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
if( ret_value < 0 )
{
throw FileIException("H5File::getVFDHandle", "H5Fget_vfd_handle failed");
}
}
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param file_handle - Pointer to the file handle being used by
/// the low-level virtual file driver
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
void H5File::getVFDHandle(void **file_handle) const
{
herr_t ret_value = H5Fget_vfd_handle(id, H5P_DEFAULT, file_handle);
if( ret_value < 0 )
{
throw FileIException("H5File::getVFDHandle", "H5Fget_vfd_handle failed");
}
}
//--------------------------------------------------------------------------
// Function: H5File::getFileName
///\brief Gets the name of this file.
///\return File name
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
string H5File::getFileName() const
{
return(p_get_file_name());
}
//--------------------------------------------------------------------------
// Function: H5File::Reference
///\brief Creates a reference to an Hdf5 object or a dataset region.
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
///\return A reference
///\exception H5::ReferenceIException
///\par Description
/// Note that name must be an absolute path to the object in the file.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* H5File::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
{
return(p_reference(name, dataspace.getId(), ref_type));
}
//--------------------------------------------------------------------------
// Function: H5File::Reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param name - IN: Name of the object to be referenced
///\return A reference
///\exception H5::ReferenceIException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
///\par
/// Note that, for H5File, name must be an absolute path to the
/// object in the file.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* H5File::Reference(const char* name) const
{
return(p_reference(name, -1, H5R_OBJECT));
}
//--------------------------------------------------------------------------
// Function: H5File::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query
///\return Object type, which can be one of the following:
/// \li \c H5G_LINK - Object is a symbolic link.
/// \li \c H5G_GROUP - Object is a group.
/// \li \c H5G_DATASET - Object is a dataset.
/// \li \c H5G_TYPE - Object is a named datatype
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t H5File::getObjType(void *ref, H5R_type_t ref_type) const
{
return(p_get_obj_type(ref, ref_type));
}
//--------------------------------------------------------------------------
// Function: H5File::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace H5File::getRegion(void *ref, H5R_type_t ref_type) const
{
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
//--------------------------------------------------------------------------
// Function: H5File::getFileSize
///\brief Returns the file size of the HDF5 file.
///\return File size
///\exception H5::FileIException
///\par Description
/// This function is called after an existing file is opened in
/// order to learn the true size of the underlying file.
// Programmer Raymond Lu - June 24, 2004
//--------------------------------------------------------------------------
hsize_t H5File::getFileSize() const
{
hsize_t file_size;
herr_t ret_value = H5Fget_filesize(id, &file_size);
if (ret_value < 0)
{
throw FileIException("H5File::getFileSize", "H5Fget_filesize failed");
}
return (file_size);
}
//--------------------------------------------------------------------------
// Function: H5File::getLocId
// Purpose: Get the id of this file
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t H5File::getLocId() const
{
return( getId() );
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::p_close (private)
// Purpose: Closes this HDF5 file.
// Exception H5::FileIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::p_close() const
{
herr_t ret_value = H5Fclose( id );
@@ -180,23 +547,34 @@ void H5File::p_close() const
throw FileIException(0, "H5Fclose failed");
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Throw file exception; used in CommonFG implementation so that proper
// exception can be thrown for file or group. The func_name is a member
// function of CommonFG and "H5File::" will be inserted to indicate the
// function called is an implementation of H5File
void H5File::throwException(const string& func_name, const string& msg) const
//--------------------------------------------------------------------------
// Function: H5File::throwException
///\brief Throws file exception - initially implemented for CommonFG
///\param func_name - Name of the function where failure occurs
///\param msg - Message describing the failure
///\exception H5::FileIException
// Description
// This function is used in CommonFG implementation so that
// proper exception can be thrown for file or group. The
// argument func_name is a member of CommonFG and "H5File::"
// will be inserted to indicate the function called is an
// implementation of H5File.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5File::throwException(const string func_name, const string msg) const
{
string full_name = func_name;
full_name.insert(0, "H5File::");
throw FileIException(full_name, msg);
}
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: H5File destructor
///\brief Properly terminates access to this file.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::~H5File()
{
// The HDF5 file id will be closed properly

View File

@@ -22,49 +22,87 @@ namespace H5 {
class H5_DLLCPP H5File : public IdComponent, public CommonFG {
public:
// Default constructor
H5File();
// copy constructor: makes a copy of the original H5File object.
H5File(const H5File& original );
// Creates or opens an HDF5 file.
H5File( const string& name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
H5File( const char* name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
H5File( const string& name, unsigned int flags,
const FileCreatPropList& create_plist = FileCreatPropList::DEFAULT,
const FileAccPropList& access_plist = FileAccPropList::DEFAULT );
// Gets the access property list of this file.
FileAccPropList getAccessPlist() const;
// Gets the creation property list of this file.
FileCreatPropList getCreatePlist() const;
// Gets the name of this file.
string getFileName() const;
// Retrieves the file size of an opened file.
hsize_t getFileSize() const;
// Returns the amount of free space in the file.
hssize_t getFreeSpace() const;
// Returns the number of opened object IDs (files, datasets, groups
// and datatypes) in the same file.
int getObjCount(unsigned types) const;
int getObjCount() const;
// Retrieves a list of opened object IDs (files, datasets, groups
// and datatypes) in the same file.
void getObjIDs(unsigned types, int max_objs, hid_t *oid_list) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Returns the pointer to the file handle of the low-level file driver.
void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const char* name );
static bool isHdf5(const string& name );
// Reopens this file.
void reOpen(); // added for better name
void reopen();
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Throw file exception.
virtual void throwException(const string func_name, const string msg) const;
// Gets the file id
virtual hid_t getLocId() const;
// Throw file exception
virtual void throwException(const string& func_name, const string& msg) const;
// Default constructor
H5File();
// Copy constructor: makes a copy of the original H5File object.
H5File(const H5File& original);
// Determines if a file, specified by its name, is in HDF5 format
static bool isHdf5(const string& name );
static bool isHdf5(const char* name );
// Reopens this file
void reopen();
// Gets the creation property list of this file
FileCreatPropList getCreatePlist() const;
// Gets the access property list of this file
FileAccPropList getAccessPlist() const;
// Used by the API to appropriately close a file
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close a file.
void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// H5File destructor.
virtual ~H5File();
private:
// This function is private and contains common code between the
// constructors taking a string or a char*
void getFile( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
void p_get_file( const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist );
};
#ifndef H5_NO_NAMESPACE

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"
@@ -33,23 +35,51 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: FloatType default constructor
///\brief Default constructor: Creates a stub floating-point datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType() {}
// Creates a floating-point type using a predefined type
//--------------------------------------------------------------------------
// Function: FloatType overloaded constructor
///\brief Creates a floating-point datatype using a predefined type.
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType( const PredType& pred_type ) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy( pred_type );
}
// Creates a floating-point datatype using an existing id
//--------------------------------------------------------------------------
// Function: FloatType overloaded constructor
///\brief Creates an FloatType object using the id of an existing
/// datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType( const hid_t existing_id ) : AtomType( existing_id ) {}
// Copy constructor: makes a copy of the original FloatType object
//--------------------------------------------------------------------------
// Function: FloatType copy constructor
///\brief Copy constructor: makes a copy of the original FloatType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType( const FloatType& original ) : AtomType( original ){}
// Gets the floating-point datatype of the specified dataset - will reimplement
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Gets the floating-point datatype of the specified dataset
///\param dataset - IN: Dataset that this floating-point datatype
/// associates with
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType( const DataSet& dataset ) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -61,7 +91,17 @@ FloatType::FloatType( const DataSet& dataset ) : AtomType()
}
}
// Retrieves floating point datatype bit field information.
//--------------------------------------------------------------------------
// Function: FloatType::getFields
///\brief Retrieves floating point datatype bit field information.
///\param spos - OUT: Retrieved floating-point sign bit
///\param epos - OUT: Retrieved exponent bit-position
///\param esize - OUT: Retrieved size of exponent, in bits
///\param mpos - OUT: Retrieved mantissa bit-position
///\param msize - OUT: Retrieved size of mantissa, in bits
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FloatType::getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const
{
herr_t ret_value = H5Tget_fields( id, &spos, &epos, &esize, &mpos, &msize );
@@ -71,7 +111,18 @@ void FloatType::getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mp
}
}
// Sets locations and sizes of floating point bit fields.
//--------------------------------------------------------------------------
// Function: FloatType::setFields
///\brief Sets locations and sizes of floating point bit fields.
///\param spos - OUT: Sign position, i.e., the bit offset of the
/// floating-point sign bit.
///\param epos - OUT: Exponent bit position
///\param esize - OUT: Size of exponent, in bits
///\param mpos - OUT: Mantissa bit-position
///\param msize - OUT: Size of mantissa, in bits
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FloatType::setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const
{
herr_t ret_value = H5Tset_fields( id, spos, epos, esize, mpos, msize );
@@ -81,7 +132,13 @@ void FloatType::setFields( size_t spos, size_t epos, size_t esize, size_t mpos,
}
}
// Retrieves the exponent bias of a floating-point type.
//--------------------------------------------------------------------------
// Function: FloatType::getEbias
///\brief Retrieves the exponent bias of a floating-point type.
///\return Exponent bias
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t FloatType::getEbias() const
{
size_t ebias = H5Tget_ebias( id );
@@ -93,7 +150,13 @@ size_t FloatType::getEbias() const
return( ebias );
}
// Sets the exponent bias of a floating-point type.
//--------------------------------------------------------------------------
// Function: FloatType::setEbias
///\brief Sets the exponent bias of a floating-point type.
///\param ebias - Exponent bias value
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FloatType::setEbias( size_t ebias ) const
{
herr_t ret_value = H5Tset_ebias( id, ebias );
@@ -103,7 +166,21 @@ void FloatType::setEbias( size_t ebias ) const
}
}
// Retrieves mantissa normalization of a floating-point datatype.
//--------------------------------------------------------------------------
// Function: FloatType::getNorm
///\brief Retrieves mantissa normalization of a floating-point datatype.
///\param norm_string - OUT: Text string of the normalization type
///\return Valid normalization type, which can be:
/// \li \c H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
/// \li \c H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
/// \li \c H5T_NORM_NONE (2) - Mantissa is not normalized
///\exception H5::DataTypeIException
///\par Description
/// For your convenience, this function also provides the text
/// string of the returned normalization type, via parameter
/// \a norm_string.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_norm_t FloatType::getNorm( string& norm_string ) const
{
H5T_norm_t norm = H5Tget_norm( id ); // C routine
@@ -121,7 +198,18 @@ H5T_norm_t FloatType::getNorm( string& norm_string ) const
return( norm );
}
// Sets the mantissa normalization of a floating-point datatype.
//--------------------------------------------------------------------------
// Function: FloatType::setNorm
///\brief Sets the mantissa normalization of a floating-point datatype.
///\param norm - IN: Mantissa normalization type
///\exception H5::DataTypeIException
///\par Description
/// Valid values for normalization type include:
/// \li \c H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
/// \li \c H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
/// \li \c H5T_NORM_NONE (2) - Mantissa is not normalized
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FloatType::setNorm( H5T_norm_t norm ) const
{
herr_t ret_value = H5Tset_norm( id, norm );
@@ -131,7 +219,21 @@ void FloatType::setNorm( H5T_norm_t norm ) const
}
}
// Retrieves the internal padding type for unused bits in floating-point datatypes.
//--------------------------------------------------------------------------
// Function: FloatType::getInpad
///\brief Retrieves the internal padding type for unused bits in
/// this floating-point datatypes.
///\return Internal padding type, which can be:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros
/// \li \c H5T_PAD_ONE (1) - Set background to ones
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone
///\exception H5::DataTypeIException
///\par Description
/// For your convenience, this function also provides the text
/// string of the returned internal padding type, via parameter
/// \a pad_string.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_pad_t FloatType::getInpad( string& pad_string ) const
{
H5T_pad_t pad_type = H5Tget_inpad( id );
@@ -149,7 +251,23 @@ H5T_pad_t FloatType::getInpad( string& pad_string ) const
return( pad_type );
}
// Fills unused internal floating point bits.
//--------------------------------------------------------------------------
// Function: FloatType::setInpad
///\brief Fills unused internal floating point bits.
///\param inpad - IN: Internal padding type
///\exception H5::DataTypeIException
///\par Description
/// If any internal bits of a floating point type are unused
/// (that is, those significant bits which are not part of the
/// sign, exponent, or mantissa), then they will be filled
/// according to the padding value provided by \a inpad.
///\par
/// Valid values for normalization type include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros
/// \li \c H5T_PAD_ONE (1) - Set background to ones
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FloatType::setInpad( H5T_pad_t inpad ) const
{
herr_t ret_value = H5Tset_inpad( id, inpad );
@@ -159,7 +277,11 @@ void FloatType::setInpad( H5T_pad_t inpad ) const
}
}
// Default destructor
//--------------------------------------------------------------------------
// Function: FloatType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::~FloatType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -22,38 +22,23 @@ namespace H5 {
class H5_DLLCPP FloatType : public AtomType {
public:
// default constructor
FloatType();
// Creates a floating-point datatype using an existing id
FloatType( const hid_t existing_id );
// Creates a floating-point type using a predefined type
FloatType( const PredType& pred_type );
// Copy constructor: makes a copy of the original FloatType object.
FloatType( const FloatType& original );
// Gets the floating-point datatype of the specified dataset
FloatType( const DataSet& dataset );
// Retrieves floating point datatype bit field information.
void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
// Sets locations and sizes of floating point bit fields.
void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
// Retrieves the exponent bias of a floating-point type.
size_t getEbias() const;
// Sets the exponent bias of a floating-point type.
void setEbias( size_t ebias ) const;
// Retrieves mantissa normalization of a floating-point datatype.
H5T_norm_t getNorm( string& norm_string ) const;
// Retrieves floating point datatype bit field information.
void getFields( size_t& spos, size_t& epos, size_t& esize, size_t& mpos, size_t& msize ) const;
// Sets the mantissa normalization of a floating-point datatype.
void setNorm( H5T_norm_t norm ) const;
// Sets locations and sizes of floating point bit fields.
void setFields( size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize ) const;
// Retrieves the internal padding type for unused bits in floating-point datatypes.
H5T_pad_t getInpad( string& pad_string ) const;
@@ -61,6 +46,22 @@ class H5_DLLCPP FloatType : public AtomType {
// Fills unused internal floating point bits.
void setInpad( H5T_pad_t inpad ) const;
// Retrieves mantissa normalization of a floating-point datatype.
H5T_norm_t getNorm( string& norm_string ) const;
// Sets the mantissa normalization of a floating-point datatype.
void setNorm( H5T_norm_t norm ) const;
// Default constructor
FloatType();
// Creates a floating-point datatype using an existing id
FloatType( const hid_t existing_id );
// Copy constructor: makes a copy of the original FloatType object.
FloatType( const FloatType& original );
// Noop destructor.
virtual ~FloatType();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -1,7 +1,7 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
@@ -42,92 +42,117 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: Group default constructor
///\brief Default constructor: creates a stub Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group() : H5Object() {}
// Copy constructor: makes a copy of the original Group object
//--------------------------------------------------------------------------
// Function: Group copy constructor
///\brief Copy constructor: makes a copy of the original Group object.
///\param original - IN: Original group to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group( const Group& original ) : H5Object( original ) {}
// Get id of the location, which id the group id here; used by CommonFG
// member functions
//--------------------------------------------------------------------------
// Function: Group::getLocId
///\brief Returns the id of this group.
///\return Id of this group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t Group::getLocId() const
{
return( getId() );
}
// Creates a copy of an existing Group using its id
//--------------------------------------------------------------------------
// Function: Group overloaded constructor
///\brief Creates a Group object using the id of an existing group.
///\param group_id - IN: Id of an existing group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group( const hid_t group_id ) : H5Object( group_id ) {}
// Returns the number of objects in the group.
hsize_t Group::getNumObjs() const
//--------------------------------------------------------------------------
// Function: Group::Reference
///\brief Creates a reference to an HDF5 object or a dataset region.
///\param name - IN: Name of the object to be referenced
///\param dataspace - IN: Dataspace with selection
///\param ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
///\return A reference
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* Group::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type) const
{
hsize_t num_objs;
herr_t ret_value = H5Gget_num_objs(id, &num_objs);
if(ret_value < 0)
{
throwException("getNumObjs", "H5Gget_num_objs failed");
}
return (num_objs);
return(p_reference(name, dataspace.getId(), ref_type));
}
// Retrieves the name of an object in a given group by giving index
ssize_t Group::getObjnameByIdx(hsize_t idx, string& name, size_t size) const
//--------------------------------------------------------------------------
// Function: Group::Reference
///\brief This is an overloaded function, provided for your convenience.
/// It differs from the above function in that it only creates
/// a reference to an HDF5 object, not to a dataset region.
///\param name - IN: Name of the object to be referenced
///\return A reference
///\exception H5::ReferenceIException
///\par Description
// This function passes H5R_OBJECT and -1 to the protected
// function for it to pass to the C API H5Rcreate
// to create a reference to the named object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* Group::Reference(const char* name) const
{
char* name_C = new char[size];
ssize_t name_len = H5Gget_objname_by_idx(id, idx, name_C, size);
if(name_len < 0)
{
throwException("getObjnameByIdx", "H5Gget_objname_by_idx failed");
}
name = string( name_C );
delete [] name_C;
return (name_len);
return(p_reference(name, -1, H5R_OBJECT));
}
// Returns the type of an object in a given group by giving index
int Group::getObjTypeByIdx(hsize_t idx) const
//--------------------------------------------------------------------------
// Function: Group::getObjType
///\brief Retrieves the type of object that an object reference points to.
///\param ref - IN: Reference to query
///\param ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
// H5G_DATASET Object is a dataset.
// H5G_TYPE Object is a named datatype
// Exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t Group::getObjType(void *ref, H5R_type_t ref_type) const
{
int obj_type = H5Gget_objtype_by_idx(id, idx);
if (obj_type == H5G_UNKNOWN)
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
return (obj_type);
}
int Group::getObjTypeByIdx(hsize_t idx, string& type_name) const
{
int obj_type = H5Gget_objtype_by_idx(id, idx);
switch (obj_type)
{
case H5G_GROUP: type_name = string("group"); break;
case H5G_DATASET: type_name = string("dataset"); break;
case H5G_TYPE: type_name = string("datatype"); break;
case H5G_UNKNOWN:
default:
{
throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
}
}
return (obj_type);
return(p_get_obj_type(ref, ref_type));
}
// Iterates a user's function over the entries of a group.
//int Group::iterateElems( const string& name, int *idx, H5G_iterate_t op , void *op_data )
//{
//return( iterateElems( name.c_str(), idx, op, op_data ));
//}
//int Group::iterateElems( const char* name, int *idx, H5G_iterate_t op , void *op_data )
//{
//int ret_value = H5Giterate( id, name, idx, op, op_data );
//if( ret_value >= 0 )
//return( ret_value );
//else // raise exception when H5Aiterate returns a negative value
//{
//throw GroupIException("Group::iterateElems", "H5Giterate failed");
//}
//}
//--------------------------------------------------------------------------
// Function: Group::getRegion
///\brief Retrieves a dataspace with the region pointed to selected.
///\param ref - IN: Reference to get region of
///\param ref_type - IN: Type of reference to get region of - default
///\return DataSpace instance
///\exception H5::ReferenceIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
DataSpace Group::getRegion(void *ref, H5R_type_t ref_type) const
{
DataSpace dataspace(p_get_region(ref, ref_type));
return(dataspace);
}
// Calls the C API H5Gclose to close this group. Used by IdComponent::reset
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: Group::p_close (private)
// Purpose: Closes this group.
// Exception H5::GroupIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Group::p_close() const
{
herr_t ret_value = H5Gclose( id );
@@ -136,20 +161,34 @@ void Group::p_close() const
throw GroupIException(0, "H5Gclose failed");
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Throw file exception
void Group::throwException(const string& func_name, const string& msg) const
//--------------------------------------------------------------------------
// Function: Group::throwException
///\brief Throws H5::GroupIException.
///\param func_name - Name of the function where failure occurs
///\param msg - Message describing the failure
///\exception H5::GroupIException
// Description
// This function is used in CommonFG implementation so that
// proper exception can be thrown for file or group. The
// argument func_name is a member of CommonFG and "Group::"
// will be inserted to indicate the function called is an
// implementation of Group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void Group::throwException(const string func_name, const string msg) const
{
string full_name = func_name;
full_name.insert(0, "Group::");
throw GroupIException(full_name, msg);
}
// The destructor of this instance calls IdComponent::reset to
// reset its identifier - no longer true
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
//--------------------------------------------------------------------------
// Function: Group destructor
///\brief Properly terminates access to this group.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::~Group()
{
// The group id will be closed properly

View File

@@ -22,42 +22,40 @@ namespace H5 {
class H5_DLLCPP Group : public H5Object, public CommonFG {
public:
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a reference to a named Hdf5 object or to a dataset region
// in this object.
void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Creates a reference to a named Hdf5 object in this object.
void* Reference(const char* name) const;
// Throw group exception.
virtual void throwException(const string func_name, const string msg) const;
// for CommonFG to get the file id.
virtual hid_t getLocId() const;
// default constructor
Group();
// Copy constructor: makes a copy of the original object
Group( const Group& original );
Group(const Group& original);
// Returns the number of objects in the group.
hsize_t getNumObjs() const;
// Retrieves the name of an object in a given group by giving index
//ssize_t getObjnameByIdx(hsize_t idx, char *name, size_t size) const;
ssize_t getObjnameByIdx(hsize_t idx, string& name, size_t size) const;
// Returns the type of an object in a given group by giving index;
// the overloaded function also provided the object type in text as
// "group" for H5G_GROUP
// "dataset" for H5G_DATASET
// "datatype" for H5G_TYPE
int getObjTypeByIdx(hsize_t idx) const;
int getObjTypeByIdx(hsize_t idx, string& type_name) const;
// for CommonFG to get the file id
virtual hid_t getLocId() const;
// Throw group exception
virtual void throwException(const string& func_name, const string& msg) const;
// Used by the API to appropriately close a group
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close a group - will be obsolete.
void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor
virtual ~Group();
// Creates a copy of an existing Group using its id
// (used only by template functions in FGtemplates.h
// to return a Group; will not be published; maybe, use friend???)
// Creates a copy of an existing group using its id.
Group( const hid_t group_id );
};

View File

@@ -1,7 +1,7 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
@@ -25,22 +25,25 @@
namespace H5 {
#endif
// Default constructor - private
IdComponent::IdComponent() : id( -1 )
{
// starts counting object references
ref_count = new RefCounter;
}
// Constructor that takes an HDF5 object id. It creates an instance
// of IdComponent to hold the HDF5 id
//--------------------------------------------------------------------------
// Function: IdComponent overloaded constructor
///\brief Creates an IdComponent object using the id of an existing object.
///\param h5_id - IN: Id of an existing object
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent::IdComponent( const hid_t h5_id ) : id( h5_id )
{
// starts counting object references
ref_count = new RefCounter;
}
// Copy constructor: makes a copy of the original object
//--------------------------------------------------------------------------
// Function: IdComponent copy constructor
///\brief Copy constructor: makes a copy of the original IdComponent object.
///\param original - IN: IdComponent instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent::IdComponent( const IdComponent& original )
{
id = original.id;
@@ -48,17 +51,38 @@ IdComponent::IdComponent( const IdComponent& original )
ref_count->increment(); // increment number of references to this id
}
// Increment reference counter
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
///\brief Increments id reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::incRefCount() { ref_count->increment(); }
// Decrement reference counter
//--------------------------------------------------------------------------
// Function: IdComponent::decRefCount
///\brief Decrements id reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::decRefCount() { ref_count->decrement(); }
// Get the reference counter to this identifier
//--------------------------------------------------------------------------
// Function: IdComponent::getCounter
///\brief Returns the reference counter to this identifier.
///\return Reference count
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int IdComponent::getCounter() { return( ref_count->getCounter()); }
// Decrements the reference counter then determines if there are no more
// reference to this object
//--------------------------------------------------------------------------
// Function: IdComponent::noReference
///\brief Determines whether this object has any references.
///\return \c true if there is no reference, and \c false, otherwise.
///\note This function will be obsolete in the next release.
// Description
// Decrements the reference counter then determines if there
// are no more reference to this object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool IdComponent::noReference()
{
if( ref_count->getCounter() > 0 )
@@ -66,13 +90,20 @@ bool IdComponent::noReference()
return( ref_count->getCounter() == 0 ? true:false );
}
/* Assignment operator.
Description:
Reset the identifier of this object so that the HDF5 id can be properly
closed. Copy the new identifier to this object, then increment the
reference counter of the identifier to indicate that another object
is referencing the identifier.
*/
//--------------------------------------------------------------------------
// Function: IdComponent::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the existing object
///\return Reference to IdComponent instance
///\exception H5::IdComponentException when attempt to close the HDF5
/// object fails
// Description
// Reset the identifier of this object so that the HDF5 id can
// be properly closed. Copy the id from rhs to this object,
// then increment the reference counter of the id to indicate
// that another object is referencing it.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent& IdComponent::operator=( const IdComponent& rhs )
{
// reset the identifier of this object - resetIdComponent will call the
@@ -93,13 +124,20 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
return( *this );
}
/* Sets the identifier of this object to a new value
Description:
Reset the current identifier of this object so that the HDF5
id can be appropriately closed. If only this object references
its identifier, its reference counter will be deleted. A new
reference counter is created for the new HDF5 object id.
*/
//--------------------------------------------------------------------------
// Function: IdComponent::setId
///\brief Sets the identifier of this object to a new value.
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
///\par Description:
/// The calling routine must reset the id of this object by
/// calling resetIdComponent and passing in the "this" pointer.
/// resetIdComponent ensures that the HDF5 id will be
/// appropriately closed. If only this object references its
/// id, its reference counter will be deleted. A new reference
/// counter is created for the new HDF5 object id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::setId( hid_t new_id )
{
// reset the identifier of this object, call appropriate H5Xclose
@@ -115,20 +153,34 @@ void IdComponent::setId( hid_t new_id )
ref_count = new RefCounter;
}
// Gets the id of this object
//--------------------------------------------------------------------------
// Function: IdComponent::getId
///\brief Returns the id of this object.
///\return HDF5 object id
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t IdComponent::getId () const
{
return( id );
}
// Reset this object by deleting its RefCounter
//--------------------------------------------------------------------------
// Function: IdComponent::reset
///\brief Reset this object by deleting/resetting its reference counter.
///\return HDF5 object id
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::reset ()
{
delete ref_count;
ref_count = NULL;
}
// Default destructor
//--------------------------------------------------------------------------
// Function: IdComponent destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent::~IdComponent() {
/* uncomment this block and complete it when deciding to use dontAtExit
@@ -155,6 +207,133 @@ IdComponent::~IdComponent() {
*/
}
//
// Implementation of protected functions
//
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: IdComponent::p_get_file_name
// Purpose: Gets the name of the file, in which this object belongs.
// Exception: H5::IdComponentException
// Description:
// This function is protected so that the user applications can
// only have access to its code via allowable classes, namely,
// H5File and H5Object subclasses.
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
string IdComponent::p_get_file_name() const
{
// Preliminary call to H5Fget_name to get the length of the file name
ssize_t name_size = H5Fget_name(id, NULL, 0);
// If H5Aget_name returns a negative value, raise an exception,
if( name_size < 0 )
{
throw IdComponentException("IdComponent::p_get_file_name",
"H5Fget_name failed");
}
// Call H5Fget_name again to get the actual file name
char* name_C = new char[name_size+1]; // temporary C-string for C API
name_size = H5Fget_name(id, name_C, name_size+1);
// Check for failure again
if( name_size < 0 )
{
throw IdComponentException("IdComponent::p_get_file_name",
"H5Fget_name failed");
}
// Convert the C file name and return
string file_name(name_C);
delete name_C;
return(file_name);
}
//--------------------------------------------------------------------------
// Function: IdComponent::p_reference (protected)
// Purpose Creates a reference to an HDF5 object or a dataset region.
// Parameters
// name - IN: Name of the object to be referenced
// dataspace - IN: Dataspace with selection
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
// Return A reference
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void* IdComponent::p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const
{
void *ref=NULL;
herr_t ret_value = H5Rcreate(ref, id, name, ref_type, space_id);
if (ret_value < 0)
{
throw IdComponentException("IdComponent::p_reference",
"H5Rcreate failed");
}
return(ref);
}
//--------------------------------------------------------------------------
// Function: IdComponent::p_get_obj_type (protected)
// Purpose Retrieves the type of object that an object reference points to.
// Parameters
// ref - IN: Reference to query
// ref_type - IN: Type of reference to query
// Return An object type, which can be one of the following:
// H5G_LINK Object is a symbolic link.
// H5G_GROUP Object is a group.
// H5G_DATASET Object is a dataset.
// H5G_TYPE Object is a named datatype
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t IdComponent::p_get_obj_type(void *ref, H5R_type_t ref_type) const
{
H5G_obj_t obj_type = H5Rget_obj_type(id, ref_type, ref);
if (obj_type == H5G_UNKNOWN)
{
throw IdComponentException("IdComponent::p_get_obj_type",
"H5R_get_obj_type failed");
}
return(obj_type);
}
//--------------------------------------------------------------------------
// Function: IdComponent::p_get_region (protected)
// Purpose Retrieves a dataspace with the region pointed to selected.
// Parameters
// ref_type - IN: Type of reference to get region of - default
// to H5R_DATASET_REGION
// ref - IN: Reference to get region of
// Return Dataspace id
// Exception H5::IdComponentException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
hid_t IdComponent::p_get_region(void *ref, H5R_type_t ref_type) const
{
hid_t space_id = H5Rget_region(id, ref_type, ref);
if (space_id < 0)
{
throw IdComponentException("IdComponent::p_get_region",
"H5Rget_region failed");
}
return(space_id);
}
//--------------------------------------------------------------------------
// Function: IdComponent default constructor - private
///\brief Default constructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent::IdComponent() : id(-1)
{
// starts counting object references
ref_count = new RefCounter;
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
}
#endif

View File

@@ -25,23 +25,6 @@ namespace H5 {
class H5_DLLCPP IdComponent {
public:
// Parent classes must reset the current IdComponent copy
// before setting new id to control reference count
void setId( hid_t new_id );
// Pure virtual function so appropriate close function can
// be called by subclasses' for the corresponding object
virtual void p_close() const = 0;
// Creates an object to hold an HDF5 identifier
IdComponent( const hid_t h5_id );
// Copy constructor: makes copy of the original IdComponent object.
IdComponent( const IdComponent& original );
// Gets the value of IdComponent's data member
virtual hid_t getId () const;
// Increment reference counter
void incRefCount();
@@ -58,52 +41,62 @@ class H5_DLLCPP IdComponent {
// Assignment operator
IdComponent& operator=( const IdComponent& rhs );
// Resets this IdComponent instance
//template <class Type>
//void reset( Type* parent );
void reset();
void resetId();
// Sets the identifier of this object to a new value.
void setId( hid_t new_id );
// Creates an object to hold an HDF5 identifier
IdComponent( const hid_t h5_id );
// Copy constructor: makes copy of the original IdComponent object.
IdComponent( const IdComponent& original );
// Gets the value of IdComponent's data member
virtual hid_t getId () const;
// Pure virtual function so appropriate close function can
// be called by subclasses' for the corresponding object
// This function will be obsolete because its functionality
// is recently handled by the C library layer.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
virtual void p_close() const = 0;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor
virtual ~IdComponent();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
hid_t id; // HDF5 object id
RefCounter* ref_count; // used to keep track of the
// number of copies of an object
// Default constructor
// Default constructor.
IdComponent();
// Gets the name of the file, in which an HDF5 object belongs.
#ifndef H5_NO_STD
std::string p_get_file_name() const;
#else
string p_get_file_name() const;
#endif // H5_NO_STD
// Gets the id of the H5 file in which the given object is located.
hid_t p_get_file_id();
// Creates a reference to an HDF5 object or a dataset region.
void* p_reference(const char* name, hid_t space_id, H5R_type_t ref_type) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t p_get_obj_type(void *ref, H5R_type_t ref_type) const;
// Retrieves a dataspace with the region pointed to selected.
hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end class IdComponent
// BMR - including template member function implementation here to
// prevent compilation errors. When the compilers support template
// member functions in *.C files, move them to IdComponent.C.
// This function makes sure that this IdComponent instance actually
// represents an HDF5 component and that this HDF5 component is no longer
// referenced, then calls the parent function p_close to close the
// appropriate HDF5 component. In addition, this identifier instance
// will delete itself.
// Type is the class of the instance to whom this IdComponent object
// belongs.
/* 11/10/00 - BMR: commented this member function because many compilers
still have no support for member template function. The function is
replaced by resetIdComponent in H5Idtemplates.h
template <class Type>
void IdComponent::reset( Type* parent )
{
if( ref_count->noReference()) // ref_count is decremented here
{
if( id > 0 )
parent->p_close(); // which p_close depends on whom this
// IdComponent object belongs to
delete ref_count; // delete the reference counter
delete this; // this IdComponent object deletes itself
}
}
*/
#ifndef H5_NO_NAMESPACE
}
#endif

View File

@@ -22,10 +22,24 @@
namespace H5 {
#endif
// Older compilers (baldric) don't support template member functions
// and IdComponent::reset is one; so at this time, the resetId is not
// a member function so it can be template to work around that problem.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: resetIdComponent
///\brief Resets the id of the passed-in object.
///\param obj - IN: A "this" pointer of an IdComponent object
///\exception H5::Exception's subclasses, thrown by p_close
///\par Description:
/// This function is used to reset an IdComponent object
/// before using it again for another HDF5 object. If
/// the member \a id is the valid id of an HDF5 object, which
/// this IdComponent object represents, the associate close
/// function will be called to properly close the HDF5 object.
//
// Note: Some older compilers don't support template member functions;
// so at this time, resetIdComponent is not a member function so
// it can be template to work around that problem.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
template <class Type>
H5_DLLCPP void resetIdComponent(
Type* obj ) // pointer to object to be reset
@@ -40,7 +54,7 @@ H5_DLLCPP void resetIdComponent(
obj->reset(); // delete ref_count from IdComponent
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
}
#endif

View File

@@ -20,3 +20,18 @@
// by #include <hdf5.h>, but decide not to. BMR - 3/22/01
#include <hdf5.h>
// Define bool type for platforms that don't support bool yet
#ifdef BOOL_NOTDEFINED
#ifdef false
#undef false
#endif
#ifdef true
#undef true
#endif
typedef int bool;
const bool false = 0;
const bool true = 1;
#endif

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AbstractDs.h"
#include "H5DxferProp.h"
@@ -33,31 +35,51 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: IntType default constructor
///\brief Default constructor: Creates a stub integer datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType() {}
// Copy constructor: makes copy of the original IntType object
//--------------------------------------------------------------------------
// Function: IntType copy constructor
///\brief Copy constructor: makes a copy of the original IntType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType( const IntType& original ) : AtomType( original ) {}
// Creates a integer type using a predefined type
//--------------------------------------------------------------------------
// Function: IntType overloaded constructor
///\brief Creates a integer type using a predefined type
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType( const PredType& pred_type ) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy( pred_type );
}
/* BMR - may not keep
IntType& IntType::operator=( const PredType& rhs )
{
copy(rhs);
return(*this);
}
*/
// Creates a integer datatype using an existing id
//--------------------------------------------------------------------------
// Function: IntType overloaded constructor
///\brief Creates an integer datatype using the id of an existing
/// datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType( const hid_t existing_id ) : AtomType( existing_id ) {}
// Gets the integer datatype of the specified dataset - may reimplement -BMR
//--------------------------------------------------------------------------
// Function: IntType overloaded constructor
///\brief Gets the integer datatype of the specified dataset.
///\param dataset - IN: Dataset that this integer datatype associates with
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType( const DataSet& dataset ) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -69,11 +91,18 @@ IntType::IntType( const DataSet& dataset ) : AtomType()
}
}
// Retrieves the sign type for an integer type
//--------------------------------------------------------------------------
// Function: IntType::getSign
///\brief Retrieves the sign type for an integer type.
///\return Valid sign type
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_sign_t IntType::getSign() const
{
H5T_sign_t type_sign = H5Tget_sign( id ); // C routine
// Returns a valid sign type if successful
// Returns a valid sign type if no errors
if( type_sign == H5T_SGN_ERROR )
{
throw DataTypeIException("IntType::getSign",
@@ -82,7 +111,13 @@ H5T_sign_t IntType::getSign() const
return( type_sign );
}
// Sets the sign proprety for an integer type.
//--------------------------------------------------------------------------
// Function: IntType::getSign
///\brief Sets the sign property for an integer type.
///\param sign - IN: Sign type
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IntType::setSign( H5T_sign_t sign ) const
{
// Call C routine to set the sign property
@@ -93,7 +128,11 @@ void IntType::setSign( H5T_sign_t sign ) const
}
}
// This destructor terminates access to the datatype
//--------------------------------------------------------------------------
// Function: IntType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::~IntType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -21,25 +21,11 @@ namespace H5 {
#endif
class H5_DLLCPP IntType : public AtomType {
public:
// default constructor
IntType();
// Creates a integer datatype using an existing id
IntType( const hid_t existing_id );
// Creates a integer type using a predefined type
IntType( const PredType& pred_type );
// Copy constructor: makes copy of IntType object
IntType( const IntType& original );
IntType(const PredType& pred_type);
// Gets the integer datatype of the specified dataset
IntType( const DataSet& dataset );
// Assignment operator that takes a predefined type
// may not use - BMR
// virtual IntType& operator=( const PredType& rhs );
IntType(const DataSet& dataset);
// Retrieves the sign type for an integer type
H5T_sign_t getSign() const;
@@ -47,6 +33,16 @@ class H5_DLLCPP IntType : public AtomType {
// Sets the sign proprety for an integer type.
void setSign( H5T_sign_t sign ) const;
// Default constructor
IntType();
// Creates a integer datatype using an existing id
IntType(const hid_t existing_id);
// Copy constructor: makes copy of IntType object
IntType(const IntType& original);
// Noop destructor.
virtual ~IntType();
};
#ifndef H5_NO_NAMESPACE

View File

@@ -14,6 +14,7 @@
#include <string>
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
#include "H5Exception.h"
#include "H5Library.h"
@@ -22,10 +23,17 @@
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This static variable will be set to true when dontAtExit is called
bool H5Library::need_cleanup = false;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Initializes the HDF5 library.
//--------------------------------------------------------------------------
// Function: H5Library::open
///\brief Initializes the HDF5 library.
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Library::open()
{
herr_t ret_value = H5open();
@@ -35,7 +43,12 @@ void H5Library::open()
}
}
// Flushes all data to disk, closes files, and cleans up memory.
//--------------------------------------------------------------------------
// Function: H5Library::close
///\brief Flushes all data to disk, closes files, and cleans up memory.
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Library::close()
{
herr_t ret_value = H5close();
@@ -45,7 +58,12 @@ void H5Library::close()
}
}
// Instructs library not to install atexit cleanup routine
//--------------------------------------------------------------------------
// Function: H5Library::dontAtExit
///\brief Instructs library not to install \c atexit cleanup routine
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Library::dontAtExit()
{
herr_t ret_value = H5dont_atexit();
@@ -55,7 +73,15 @@ void H5Library::dontAtExit()
}
}
// Returns the HDF library release number.
//--------------------------------------------------------------------------
// Function: H5Library::getLibVersion
///\brief Returns the HDF library release number.
///\param majnum - OUT: Major version of the library
///\param minnum - OUT: Minor version of the library
///\param relnum - OUT: Release number of the library
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& relnum )
{
herr_t ret_value = H5get_libversion( &majnum, &minnum, &relnum );
@@ -65,17 +91,84 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
}
}
// Verifies that the arguments match the version numbers compiled
// into the library
void H5Library::checkVersion( unsigned majnum, unsigned minnum, unsigned relnum )
//--------------------------------------------------------------------------
// Function: H5Library::checkVersion
///\brief Verifies that the arguments match the version numbers
/// compiled into the library
///\param majnum - IN: Major version of the library
///\param minnum - IN: Minor version of the library
///\param relnum - IN: Release number of the library
///\exception H5::LibraryIException
///\par Description
/// For information about library version, please refer to
/// the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-VersCheck
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
{
herr_t ret_value = H5check_version( majnum, minnum, relnum );
herr_t ret_value = H5check_version(majnum, minnum, relnum);
if( ret_value < 0 )
{
throw LibraryIException("H5Library::checkVersion", "H5check_version failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Library::garbageCollect
///\brief Walks through all the garbage collection routines for the
/// library, which are supposed to free any unused memory they
/// have allocated.
///\exception H5::LibraryIException
///\par Description
/// It is not required that H5Library::garbageCollect be called
/// at any particular time; it is only necessary in certain
/// situations, such as when the application has performed actions
/// that cause the library to allocate many objects. The
/// application should call H5Library::garbageCollect if it
/// eventually releases those objects and wants to reduce the
/// memory used by the library from the peak usage required.
///\par
/// The library automatically garbage collects all the free
/// lists when the application ends.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Library::garbageCollect()
{
herr_t ret_value = H5garbage_collect();
if( ret_value < 0 )
{
throw LibraryIException("H5Library::garbageCollect", "H5garbage_collect failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Library::setFreeListLimits
///\brief Sets limits on the different kinds of free lists.
///\param reg_global_lim - IN: Limit on all "regular" free list memory used
///\param reg_list_lim - IN: Limit on memory used in each "regular" free list
///\param arr_global_lim - IN: Limit on all "array" free list memory used
///\param arr_list_lim - IN: Limit on memory used in each "array" free list
///\param blk_global_lim - IN: Limit on all "block" free list memory used
///\param blk_list_lim - IN: Limit on memory used in each "block" free list
///\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://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5.html#Library-SetFreeListLimits
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
int arr_global_lim, int arr_list_lim, int blk_global_lim,
int blk_list_lim)
{
herr_t ret_value = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
if( ret_value < 0 )
{
throw LibraryIException("H5Library::setFreeListLimits", "H5set_free_list_limits failed");
}
}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

View File

@@ -20,7 +20,9 @@
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define NOTATEXIT (-10) // just in case the HDF5 library use more
#endif // DOXYGEN_SHOULD_SKIP_THIS
// negative constants. Note: the solution used for the atexit/global
// destructors is not reliable, and desperately needs improvement
// It is not even working, inifiteloop message still printed when
@@ -28,7 +30,9 @@ namespace H5 {
class H5_DLLCPP H5Library {
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static bool need_cleanup; // indicates if H5close should be called
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Initializes the HDF5 library.
static void open();
@@ -46,6 +50,14 @@ class H5_DLLCPP H5Library {
// into the library
static void checkVersion( unsigned majnum, unsigned minnum, unsigned relnum );
// Walks through all the garbage collection routines for the library,
// which are supposed to free any unused memory they have allocated.
static void garbageCollect();
// Sets limits on the different kinds of free lists.
static void setFreeListLimits(int reg_global_lim, int reg_list_lim, int
arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim);
private:
// Default constructor - no instance ever created
H5Library() {};

View File

@@ -21,6 +21,8 @@
#include "H5Idtemplates.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5DataSpace.h"
#include "H5AbstractDs.h"
@@ -30,6 +32,7 @@
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// userAttrOpWrpr simply interfaces between the user's function and the
// C library function H5Aiterate; used to resolve the different prototype
// problem. May be moved to Iterator later.
@@ -45,17 +48,56 @@ extern "C" herr_t userAttrOpWrpr( hid_t loc_id, const char* attr_name, void* op_
return 0;
}
// Default constructor - set id to 0 by default here but may be set
// to a valid HDF5 id, if any, by a subclass constructor.
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
// Description
// The id is set by IdComponent() but subclass constructor will
// set it to a valid HDF5 id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object() : IdComponent() {}
// Constructs an object from an existing HDF5 id
//--------------------------------------------------------------------------
// Function: H5Object overloaded constructor (protected)
// Purpose Creates an H5Object object using the id of an existing HDF5
// object.
// Parameters object_id - IN: Id of an existing HDF5 object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object( const hid_t object_id ) : IdComponent( object_id ) {}
// Copy constructor: makes a copy of the original H5Object instance
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Object copy constructor
///\brief Copy constructor: makes a copy of the original H5Object
/// instance.
///\param original - IN: H5Object instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object( const H5Object& original ) : IdComponent( original ) {}
// Creates an attribute for a group, dataset, or named datatype.
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief Creates an attribute for a group, dataset, or named datatype.
///\param name - IN: Name of the attribute
///\param data_type - IN: Datatype for the attribute
///\param data_space - IN: Dataspace for the attribute - only simple
/// dataspaces are allowed at this time
///\param create_plist - IN: Creation property list - default to
/// PropList::DEFAULT
///\return Attribute instance
///\exception H5::AttributeIException
///\par Description
/// The attribute name specified in \a name must be unique.
/// Attempting to create an attribute with the same name as an
/// existing attribute will raise an exception, leaving the
/// pre-existing attribute intact. To overwrite an existing
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Object::removeAttr, then
/// recreate it with this function.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const char* name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
hid_t type_id = data_type.getId();
@@ -75,13 +117,26 @@ Attribute H5Object::createAttribute( const char* name, const DataType& data_type
}
}
// Creates an attribute for a group, dataset, or named datatype.
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::createAttribute( const string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist ) const
{
return( createAttribute( name.c_str(), data_type, data_space, create_plist ));
}
// Opens an attribute given its name; name is given as char*
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its name.
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const char* name ) const
{
hid_t attr_id = H5Aopen_name( id, name );
@@ -96,13 +151,26 @@ Attribute H5Object::openAttribute( const char* name ) const
}
}
// Opens an attribute given its name; name is given as string
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const string& name ) const
{
return( openAttribute( name.c_str()) );
}
// Opens an attribute given its index.
//--------------------------------------------------------------------------
// Function: H5Object::openAttribute
///\brief Opens an attribute given its index.
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute H5Object::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_idx( id, idx );
@@ -117,7 +185,22 @@ Attribute H5Object::openAttribute( const unsigned int idx ) const
}
}
// Iterates a user's function over all the attributes of the dataset
//--------------------------------------------------------------------------
// Function: H5Object::iterateAttrs
///\brief Iterates a user's function over all the attributes of an H5
/// object, which may be a group, dataset or named datatype.
///\param user_op - IN: User's function to operate on each attribute
///\param idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
///\param op_data - IN: User's data to pass to user's operator function
///\return Returned value of the last operator if it was non-zero, or
/// zero if all attributes were processed
///\exception H5::AttributeIException
///\par Description
/// For information, please refer to the C layer Reference Manual
/// at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5A.html#Annot-Iterate
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::iterateAttrs( attr_operator_t user_op, unsigned * idx, void *op_data )
{
// store the user's function and data
@@ -140,7 +223,13 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned * idx, void *op_da
}
}
// Determines the number of attributes attached to
//--------------------------------------------------------------------------
// Function: H5Object::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int H5Object::getNumAttrs() const
{
int num_attrs = H5Aget_num_attrs( id );
@@ -153,7 +242,13 @@ int H5Object::getNumAttrs() const
return( num_attrs );
}
// Removes the named attribute from this object.
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const char* name ) const
{
herr_t ret_value = H5Adelete( id, name );
@@ -162,12 +257,31 @@ void H5Object::removeAttr( const char* name ) const
throw AttributeIException("H5Object::removeAttr", "H5Adelete failed");
}
}
//--------------------------------------------------------------------------
// Function: H5Object::removeAttr
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c std::string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::removeAttr( const string& name ) const
{
removeAttr( name.c_str() );
}
// Flushes all buffers associated with a file to disk.
//--------------------------------------------------------------------------
// Function: H5Object::flush
///\brief Flushes all buffers associated with a file to disk.
///\param scope - IN: Specifies the scope of the flushing action,
/// which can be either of these values:
/// \li \c H5F_SCOPE_GLOBAL - Flushes the entire virtual file
/// \li \c H5F_SCOPE_LOCAL - Flushes only the specified file
///\exception H5::AttributeIException
///\par Description
/// This object is used to identify the file to be flushed.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void H5Object::flush(H5F_scope_t scope ) const
{
herr_t ret_value = H5Fflush( id, scope );
@@ -177,9 +291,23 @@ void H5Object::flush(H5F_scope_t scope ) const
}
}
// each subclass' destructor calls the template function resetIdComponent()
// to reset the corresponding IdComponent object and close the HDF5 object
// where appropriate.
//--------------------------------------------------------------------------
// Function: H5Object::getFileName
///\brief Gets the name of the file, in which this HDF5 object belongs.
///\return File name
///\exception H5::IdComponentException
// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
string H5Object::getFileName() const
{
return(p_get_file_name());
}
//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::~H5Object() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -27,6 +27,7 @@
namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
@@ -41,59 +42,54 @@ class UserData4Aiterate { // user data for attribute iteration
void* opData;
H5Object* object;
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
// The above part is being moved into Iterator, but not completed
class H5_DLLCPP H5Object : public IdComponent {
public:
// Pure virtual function so appropriate close function can
// be called by subclasses' for the corresponding HDF5 object
//virtual void p_close() const = 0;
// Copy constructor: makes copy of an H5Object object.
H5Object( const H5Object& original );
// Flushes all buffers associated with this object to disk
void flush( H5F_scope_t scope ) const;
// Assignment operator
//H5Object& operator=( const H5Object& rhs );
// Sets and gets H5Object's data member
//void setId( hid_t new_id );
//hid_t getId () const;
// Creates an attribute for a group, dataset, or named datatype.
// PropList is currently not used, so always be default.
Attribute createAttribute( const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
Attribute createAttribute( const string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT ) const;
// Opens an attribute given its name.
Attribute openAttribute( const string& name ) const;
Attribute openAttribute( const char* name ) const;
Attribute openAttribute( const string& name ) const;
// Opens an attribute given its index.
Attribute openAttribute( const unsigned int idx ) const;
// Iterate user's function over the attributes of this object
int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
// Flushes all buffers associated with this object to disk
void flush( H5F_scope_t scope ) const;
// Gets the name of the file, in which this HDF5 object belongs.
string getFileName() const;
// Determines the number of attributes attached to this object.
int getNumAttrs() const;
// Removes the named attribute from this object.
void removeAttr( const string& name ) const;
void removeAttr( const char* name ) const;
// Iterate user's function over the attributes of this object
int iterateAttrs( attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL );
// Removes the named attribute from this object.
void removeAttr( const char* name ) const;
void removeAttr( const string& name ) const;
// Copy constructor: makes copy of an H5Object object.
H5Object(const H5Object& original);
// Noop destructor.
virtual ~H5Object();
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
H5Object();
// Creates a copy of an existing object giving the object id
H5Object( const hid_t object_id );
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; /* end class H5Object */

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5Library.h"
@@ -29,25 +31,36 @@
namespace H5 {
#endif
// Default constructor
PredType::PredType() : AtomType() {}
// creates predefined datatype, so set DataType::is_predtype to true by default
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PredType overloaded constructor
///\brief Creates a PredType object using the id of an existing
/// predefined datatype.
///\param predtype_id - IN: Id of a predefined datatype
// Description
// This constructor creates a predefined datatype, so it sets
// DataType::is_predtype to true.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType( const hid_t predtype_id ) : AtomType( predtype_id )
{
is_predtype = true;
}
// Copy constructor: makes a copy of this PredType object.
PredType::PredType( const PredType& original ) : AtomType( original ) {}
//--------------------------------------------------------------------------
// Function: PredType default constructor
///\brief Default constructor: Creates a stub predefined datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType() : AtomType() {}
// Makes a copy of the predefined type and stores the new
// id in the left hand side object.
PredType& PredType::operator=( const PredType& rhs )
{
copy(rhs);
return(*this);
}
//--------------------------------------------------------------------------
// Function: PredType copy constructor
///\brief Copy constructor: makes a copy of the original PredType object.
///\param original - IN: PredType instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType( const PredType& original ) : AtomType( original ) {}
const PredType PredType::NotAtexit; // only for atexit/global dest. problem
@@ -196,7 +209,31 @@ const PredType PredType::NATIVE_INT_LEAST64( E_NATIVE_INT_LEAST64 );
const PredType PredType::NATIVE_UINT_LEAST64( E_NATIVE_UINT_LEAST64 );
const PredType PredType::NATIVE_INT_FAST64( E_NATIVE_INT_FAST64 );
const PredType PredType::NATIVE_UINT_FAST64( E_NATIVE_UINT_FAST64 );
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PredType::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the predefined datatype
///\return Reference to PredType instance
///\exception H5::DataTypeIException
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType& PredType::operator=( const PredType& rhs )
{
copy(rhs);
return(*this);
}
//--------------------------------------------------------------------------
// Function: PredType::getId
///\brief Returns the HDF5 predefined type id.
///\return HDF5 predefined type id or INVALID
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t PredType::getId() const
{
switch( id ) {
@@ -468,6 +505,7 @@ hid_t PredType::getId() const
} // end switch
} // end of getId()
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
void PredType::commit( H5Object& loc, const char* name )
@@ -485,8 +523,14 @@ bool PredType::committed()
throw DataTypeIException("PredType::committed", "Error: Attempting to check for commit status on a predefined datatype." );
return (0);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Default destructor
//--------------------------------------------------------------------------
// Function: PredType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::~PredType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -27,15 +27,17 @@ namespace H5 {
class H5_DLLCPP PredType : public AtomType {
public:
// Makes a copy of the predefined type and stores the new
// id in the left hand side object.
PredType& operator=( const PredType& rhs );
// Returns the HDF5 predefined type id.
virtual hid_t getId() const;
// Default destructor
virtual ~PredType();
// Copy constructor - makes copy of the original object
PredType( const PredType& original );
virtual hid_t getId() const;
// Declaration of predefined types; their definition is in Predtype.C
// Declaration of predefined types; their definition is in H5PredType.cpp
static const PredType STD_I8BE;
static const PredType STD_I8LE;
static const PredType STD_I16BE;
@@ -173,11 +175,13 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType NATIVE_INT_FAST64;
static const PredType NATIVE_UINT_FAST64;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw a DataTypeIException if invoked.
void commit( H5Object& loc, const string& name );
void commit( H5Object& loc, const char* name );
bool committed();
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
// added this to work around the atexit/global destructor problem
@@ -233,15 +237,18 @@ class H5_DLLCPP PredType : public AtomType {
};
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Default constructor
PredType();
// Creates a pre-defined type using an HDF5 pre-defined constant
PredType( const hid_t predtype_id ); // used by the library only
// Makes a copy of the predefined type and stores the new
// id in the left hand side object.
PredType& operator=( const PredType& rhs );
// Copy constructor - makes copy of the original object
PredType( const PredType& original );
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
#ifndef H5_NO_NAMESPACE
}

View File

@@ -30,23 +30,40 @@
namespace H5 {
#endif
//--------------------------------------------------------------------------
///\brief Constant for default property.
//--------------------------------------------------------------------------
const PropList PropList::DEFAULT( H5P_DEFAULT );
// Default constructor - set id to 0 by default here but may be set
// to a valid one, if any, by a subclass constructor.
PropList::PropList() : IdComponent( 0 ) {}
//--------------------------------------------------------------------------
// Function Default constructor
///\brief Default constructor: creates a stub property list object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList() : IdComponent(0) {}
// Copy constructor: makes a copy of the original object
//--------------------------------------------------------------------------
// Function: PropList copy constructor
///\brief Copy constructor
///\param original - IN: The original property list to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const PropList& original ) : IdComponent( original ) {}
/* Constructor that takes an existing property list id.
Description:
Uses an HDF5 id to create a PropList identifier object. This id
can be either an existing property list id or a default property
list id. Design note: in the case of default property list,
the identifier still has reference counter; the p_close function
will take care of not to call H5Pclose on the default id.
*/
//--------------------------------------------------------------------------
// Function: PropList overloaded constructor
///\brief Creates a property list using the id of an existing property.
///\param plist_id - IN: Id of the existing property list
///\exception H5::PropListIException
// Description
// This function calls H5Pcreate to create a new property list
// if the given id, plist_id, is that of a property class. If
// the given id is equal to H5P_NO_CLASS, then set this
// property's id to H5P_DEFAULT, otherwise, to the given id.
// Note: someone else added this code without comments and this
// description was what I came up with from reading the code.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const hid_t plist_id ) : IdComponent(0)
{
if (H5I_GENPROP_CLS == H5Iget_type(plist_id)) {
@@ -65,7 +82,13 @@ PropList::PropList( const hid_t plist_id ) : IdComponent(0)
}
}
// Makes a copy of an existing property list
//--------------------------------------------------------------------------
// Function: PropList::copy
///\brief Makes a copy of an existing property list
///\param like_plist - IN: Reference to the existing property list
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copy( const PropList& like_plist )
{
// reset the identifier of this PropList - send 'this' in so that
@@ -88,22 +111,33 @@ void PropList::copy( const PropList& like_plist )
}
}
// Makes a copy of the property list on the right hand side and stores
// the new id in the left hand side object.
//--------------------------------------------------------------------------
// Function: PropList::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the existing property list
///\return Reference to PropList instance
///\exception H5::PropListIException
// Description
// Makes a copy of the property list on the right hand side
// and stores the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList& PropList::operator=( const PropList& rhs )
{
copy(rhs);
return(*this);
}
// Copies a property from one list or class to another
void PropList::copyProp( PropList& dest, PropList& src, const string& name )
{
copyProp( dest, src, name.c_str());
}
// Copies a property from one list or class to another
void PropList::copyProp( PropList& dest, PropList& src, const char *name )
//--------------------------------------------------------------------------
// Function: PropList::copyProp
///\brief Copies a property from one list or class to another.
///\param dest - IN: Destination property list or class
///\param src - IN: Source property list or class
///\param name - IN: Name of the property to copy - \c char pointer
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const
{
hid_t dst_id = dest.getId();
hid_t src_id = src.getId();
@@ -112,10 +146,33 @@ void PropList::copyProp( PropList& dest, PropList& src, const char *name )
{
throw PropListIException("PropList::copyProp", "H5Pcopy_prop failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::copyProp
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param dest - IN: Destination property list or class
///\param src - IN: Source property list or class
///\param name - IN: Name of the property to copy - \c std::string
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copyProp( PropList& dest, PropList& src, const string& name ) const
{
copyProp( dest, src, name.c_str());
}
// Closes the property list if it is not a default one
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: PropList::p_close (private)
// Purpose: Closes the property list if it is not a default one.
// Exception H5::PropListIException
// Description
// This function will be obsolete because its functionality
// is recently handled by the C library layer. - May, 2004
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::p_close() const
{
if( id != H5P_NO_CLASS ) // not a constant, should call H5Pclose
@@ -127,8 +184,15 @@ void PropList::p_close() const
}
}
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Returns the class of this property list, i.e. H5P_FILE_CREATE...
//--------------------------------------------------------------------------
// Function: PropList::getClass
///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE...
///\return The property list class if it is not equal to \c H5P_NO_CLASS
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t PropList::getClass() const
{
hid_t plist_class = H5Pget_class( id );
@@ -140,8 +204,384 @@ hid_t PropList::getClass() const
return( plist_class );
}
// The destructor of this instance calls the template resetIdComponent to
// reset its identifier
//--------------------------------------------------------------------------
// Function: PropList::propExist
///\brief Query the existance of a property in a property object.
///\param name - IN: Name of property to check for - \c char pointer
///\return true if the property exists in the property object, and
/// false, otherwise.
///\exception H5::PropListIException
///\par Description
/// This routine checks if a property exists within a property
/// list or class.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool PropList::propExist(const char* name ) const
{
// Calls C routine H5Pexist to determine whether a property exists
// within a property list or class. It returns a positive value, 0,
// or a negative value
htri_t ret_value = H5Pexist(id, name);
if( ret_value > 0 )
return true;
else if( ret_value == 0 )
return false;
else // Raise exception when H5Pexist returns a negative value
{
throw PropListIException("PropList::propExist", "H5Pexist failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::propExist
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to check for - \c std::string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool PropList::propExist(const string& name ) const
{
return( propExist( name.c_str()) );
}
//--------------------------------------------------------------------------
// Function: PropList::closeClass
///\brief Close a property list class.
///\exception H5::PropListIException
///\par Description
/// Releases memory and de-attaches a class from the property
/// list class hierarchy.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::closeClass() const
{
herr_t ret_value = H5Pclose_class(id);
if( ret_value < 0 )
{
throw PropListIException("PropList::closeClass", "H5Pclose_class failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::getProperty
///\brief Query the value of a property in a property list.
///\param name - IN: Name of property to query - \c char pointer
///\param value - OUT: Pointer to the buffer for the property value
///\exception H5::PropListIException
///\par Description
/// Retrieves a copy of the value for a property in a property list. The
/// property name must exist or this routine will throw an exception.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::getProperty(const char* name, void* value) const
{
herr_t ret_value = H5Pget(id, name, value);
if (ret_value < 0)
{
throw PropListIException("PropList::getProperty", "H5Pget failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::getProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to query - \c char pointer
///\return The property that is a \c std::string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
string PropList::getProperty(const char* name) const
{
size_t size = getPropSize(name);
char* prop_strg_C = new char[size+1]; // temporary C-string for C API
herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API
// Throw exception if H5Pget returns failure
if (ret_value < 0)
{
throw PropListIException("PropList::getProperty", "H5Pget failed");
}
// Return propety value as a string after deleting temp C-string
string prop_strg = string(prop_strg_C);
delete prop_strg_C;
return (prop_strg);
}
//--------------------------------------------------------------------------
// Function: PropList::getProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to query - \c str::string
///\param value - OUT: Pointer to the buffer for the property value
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::getProperty(const string& name, void* value) const
{
getProperty(name.c_str(), value);
}
//--------------------------------------------------------------------------
// Function: PropList::getProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to query - \c std::string
///\return The property that is a \c std::string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
string PropList::getProperty(const string& name) const
{
return (getProperty(name.c_str()));
}
//--------------------------------------------------------------------------
// Function: PropList::getPropSize
///\brief Query the size of a property in a property list or class.
///\param name - IN: Name of property to query
///\return Size of the property
///\exception H5::PropListIException
///\par Description
/// This routine retrieves the size of a property's value
/// in bytes. Zero-sized properties are allowed and the return
/// value will be of 0. This function works for both property
/// lists and classes.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t PropList::getPropSize(const char *name) const
{
size_t prop_size;
herr_t ret_value = H5Pget_size(id, name, &prop_size);
if (prop_size < 0)
{
throw PropListIException("PropList::getPropSize", "H5Pget_size failed");
}
return(prop_size);
}
//--------------------------------------------------------------------------
// Function: PropList::getPropSize
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to query - \c std::string
///
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t PropList::getPropSize(const string& name) const
{
return (getPropSize(name.c_str()));
}
//--------------------------------------------------------------------------
// Function: PropList::getClassName
///\brief Return the name of a generic property list class
///\return A string containing the class name, if success, otherwise,
/// a NULL string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
string PropList::getClassName() const
{
char* temp_str;
temp_str = H5Pget_class_name(id);
if (temp_str != NULL)
{
string class_name = string(temp_str);
free(temp_str);
return(class_name);
}
else
return 0;
}
//--------------------------------------------------------------------------
// Function: PropList::getNumProps
///\brief Returns the number of properties in this property list or class.
///\return Size of the property.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t PropList::getNumProps() const
{
size_t nprops;
herr_t ret_value = H5Pget_nprops (id, &nprops);
if( nprops < 0 )
{
throw PropListIException("PropList::getNumProps", "H5Pget_nprops failed");
}
return (nprops);
}
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief Set a property's value in a property list.
///\param name - IN: Name of property to set - \c char pointer
///\param value - IN: Void pointer to the value for the property
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, void* value) const
{
herr_t ret_value = H5Pset(id, name, value);
if (ret_value < 0)
{
throw PropListIException("PropList::setProperty", "H5Pset failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to set - \c char pointer
///\param charptr - IN: Char pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, const char* charptr) const
{
herr_t ret_value = H5Pset(id, name, (void*) charptr);
if (ret_value < 0)
{
throw PropListIException("PropList::setProperty", "H5Pset failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to set - \c char pointer
///\param strg - IN: Value for the property is a \c std::string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, string& strg) const
{
setProperty(name, strg.c_str());
}
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to set - \c std::string
///\param value - IN: Void pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const string& name, void* value) const
{
setProperty(name.c_str(), value);
}
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to set - \c std::string
///\param strg - IN: Value for the property is a \c std::string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const string& name, string& strg) const
{
setProperty(name.c_str(), strg.c_str());
}
//--------------------------------------------------------------------------
// Function: PropList::isAClass
///\brief Determines whether a property list is a certain class.
///\param prop_class - IN: Property class to query
///\return true if the property list is a member of the property list
/// class, and false, otherwise.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool PropList::isAClass(const PropList& prop_class) const
{
htri_t ret_value = H5Pisa_class(id, prop_class.getId());
if( ret_value > 0 )
return true;
else if( ret_value == 0 )
return false;
else // Raise exception when H5Pisa_class returns a negative value
{
throw PropListIException("PropList::isAClass", "H5Pisa_class failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::removeProp
///\brief Removes a property from a property list.
///\param name - IN: Name of property to remove - \c char pointer
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::removeProp(const char *name) const
{
herr_t ret_value = H5Premove(id, name);
if (ret_value < 0)
{
throw PropListIException("PropList::removeProp", "H5Premove failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::removeProp
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to remove - \c std::string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::removeProp(const string& name) const
{
removeProp(name.c_str());
}
//--------------------------------------------------------------------------
// Function: PropList::operator==
///\brief Compares this property list or class against the given list or class.
///\param rhs - IN: Reference to the property list to compare
///\return true if the property lists or classes are equal, and
/// false, otherwise.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool PropList::operator==(const PropList& rhs) const
{
htri_t ret_value = H5Pequal(id, rhs.getId());
if( ret_value > 0 )
return true;
else if( ret_value == 0 )
return false;
else // Raise exception when H5Pequal returns a negative value
{
throw PropListIException("PropList::operator==", "H5Pequal failed");
}
}
//--------------------------------------------------------------------------
// Function: PropList::getClassParent
///\brief Returns the parent class of a generic property class
///\return The parent class of a property class
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
PropList PropList::getClassParent() const
{
hid_t class_id = H5Pget_class_parent(id);
if (class_id <= 0)
{
throw PropListIException("PropList::getClassParent", "H5Pget_class_parent failed");
}
PropList pclass(class_id);
return(pclass);
}
//--------------------------------------------------------------------------
// Function: PropList destructor
///\brief Properly terminates access to this property list.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::~PropList()
{
// The property list id will be closed properly

View File

@@ -25,34 +25,79 @@ class H5_DLLCPP PropList : public IdComponent {
// Default property list
static const PropList DEFAULT;
// Creates a property list of a given type or creates a copy of an
// existing property list giving the property list id
PropList( const hid_t plist_id );
// Make a copy of the given property list using assignment statement
PropList& operator=( const PropList& rhs );
// Default constructor: creates a PropList object - this object
// does not represent any property list yet.
PropList();
// Compares this property list or class against the given list or class.
bool operator==(const PropList& rhs) const;
// Copy constructor: creates a copy of a PropList object.
PropList( const PropList& original );
// Close a property list class.
void closeClass() const;
// Makes a copy of the given property list.
void copy( const PropList& like_plist );
// Make a copy of the given property list using assignment statement
PropList& operator=( const PropList& rhs );
// Copies a property from one property list or property class to another
void copyProp( PropList& dest, PropList& src, const string& name);
void copyProp( PropList& dest, PropList& src, const char* name);
void copyProp( PropList& dest, PropList& src, const char* name) const;
void copyProp( PropList& dest, PropList& src, const string& name) const;
// Gets the class of this property list, i.e. H5P_FILE_CREATE,
// H5P_FILE_ACCESS, ...
hid_t getClass() const;
// Used by the API to close the property list
void p_close() const;
// Return the name of a generic property list class.
string getClassName() const;
// Returns the parent class of a generic property class.
PropList getClassParent() const;
// Returns the number of properties in this property list or class.
size_t getNumProps() const;
// Query the value of a property in a property list.
void getProperty(const char* name, void* value) const;
string getProperty(const char* name) const;
void getProperty(const string& name, void* value) const;
string getProperty(const string& name) const;
// Set a property's value in a property list.
void setProperty(const char* name, void* charptr) const;
void setProperty(const char* name, const char* value) const;
void setProperty(const char* name, string& strg) const;
void setProperty(const string& name, void* value) const;
void setProperty(const string& name, string& strg) const;
// Query the size of a property in a property list or class.
size_t getPropSize(const char *name) const;
size_t getPropSize(const string& name) const;
// Determines whether a property list is a certain class.
bool isAClass(const PropList& prop_class) const;
/// Query the existance of a property in a property object.
bool propExist(const char* name) const;
bool propExist(const string& name) const;
// Removes a property from a property list.
void removeProp(const char *name) const;
void removeProp(const string& name) const;
// Default constructor: creates a stub PropList object.
PropList();
// Creates a property list of a given type or creates a copy of an
// existing property list giving the property list id.
PropList(const hid_t plist_id);
// Copy constructor: creates a copy of a PropList object.
PropList(const PropList& original);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to close the property list.
void p_close() const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor: properly terminates access to this property list.
virtual ~PropList();
};

View File

@@ -13,36 +13,74 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "H5Include.h"
#include "H5Exception.h"
#include "H5RefCounter.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// Creates a reference counter to be used by an HDF5 object
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: RefCounter default constructor
// Purpose Default constructor: Creates a reference counter and set it
// to 1.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
RefCounter::RefCounter() : counter(1) {}
// Returns the current value of the reference counter
//--------------------------------------------------------------------------
// Function: RefCounter::getCounter
// Purpose Returns the current value of the reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int RefCounter::getCounter () const { return counter; }
// Increments the reference counter as a copy of the object that uses
// this counter is created.
//--------------------------------------------------------------------------
// Function: RefCounter::increment
// Purpose Increments the reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void RefCounter::increment() { counter++; }
// Decrements the reference counter as a copy of the object that uses
// this counter is destroyed.
void RefCounter::decrement() { counter--; }
// Decrements the reference counter then determines if there are no more
// reference to the object that uses this counter
bool RefCounter::noReference()
{
if( counter > 0 )
//--------------------------------------------------------------------------
// Function: RefCounter::decrement
// Purpose Decrements the reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void RefCounter::decrement()
{
if (counter > 0)
counter--;
return( counter == 0 ? true:false );
else
throw IdComponentException("RefCounter::decrement",
"reference counter of this object has non-positive value");
}
//--------------------------------------------------------------------------
// Function: RefCounter::noReference
// Purpose Returns true if there are no more reference to the object
// that uses this counter.
// Return true if there are no more reference to the object
// that uses this counter, and false, otherwise.
// Description
// Decrements the reference counter then determines if there
// are no more reference to the object that uses this counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool RefCounter::noReference()
{
if (counter > 0)
counter--;
return(counter <= 0 ? true:false);
}
//--------------------------------------------------------------------------
// Function: RefCounter destructor
// Purpose Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
RefCounter::~RefCounter() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
#ifndef H5_NO_NAMESPACE
} // end namespace

View File

@@ -16,40 +16,36 @@
#ifndef _H5RefCounter_H
#define _H5RefCounter_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
// define bool type for platforms that don't support bool yet
// Note: it is added here because most of the C++ library source
// files include this header file
#ifdef BOOL_NOTDEFINED
#ifdef false
#undef false
#endif
#ifdef true
#undef true
#endif
typedef int bool;
const bool false = 0;
const bool true = 1;
#endif
///\remarks The features provided by this class are now handled at
/// the C library layer; thus, the class will be removed from
/// future releases.
class H5_DLLCPP RefCounter {
public:
// Creates a reference counter to be used by an HDF5 object
RefCounter();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Returns the current value of the reference counter.
int getCounter () const;
// Increments the reference counter.
void increment();
// Decrements the reference counter.
void decrement();
// this bool function is used to determine whether to close an
// HDF5 object when there are no more reference to that object
// This function is used to determine whether to close an
// HDF5 object when there are no more reference to that object.
bool noReference();
// Creates a reference counter to be used by an HDF5 object.
RefCounter();
~RefCounter();
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
int counter; // keeps track of number of copies of an object

View File

@@ -20,6 +20,8 @@
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5AbstractDs.h"
@@ -33,19 +35,45 @@
namespace H5 {
#endif
// Default constructor
//--------------------------------------------------------------------------
// Function: StrType default constructor
///\brief Default constructor: Creates a stub string datatype
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType() : AtomType() {}
// Creates a string type using a predefined type
//--------------------------------------------------------------------------
// Function: StrType overloaded constructor
///\brief Creates a string datatype using a predefined type.
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const PredType& pred_type ) : AtomType()
{
// use DataType::copy to make a copy of this predefined type
copy( pred_type );
}
// Creates a string type with a specified length - 1st argument could
// have been skipped, but this constructor will collide with the one
// that takes an existing id below
//--------------------------------------------------------------------------
// Function: StrType overloaded constructor
///\brief Creates a string datatype with a specified length
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Description
// The 1st argument could have been skipped, but this
// constructor will collide with the one that takes an
// existing id.
//
// Update: by passing 'size' by reference will avoid the
// clashing problem, so the 1st argument can actually be
// omitted. This constructor should be replaced by the
// other after announcing. - May, 2004
///\note
/// This constructor will be obsolete in later releases,
/// please use StrType( const size_t& size ) instead.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const PredType& pred_type, const size_t size ) : AtomType()
{
// use DataType::copy to make a copy of the string predefined type
@@ -53,14 +81,37 @@ StrType::StrType( const PredType& pred_type, const size_t size ) : AtomType()
copy(pred_type);
setSize(size);
}
StrType::StrType( const size_t& size ) : AtomType()
{
// use DataType::copy to make a copy of the string predefined type
// then set its length
copy(H5T_C_S1);
setSize(size);
}
// Creates a string datatype using an existing id
//--------------------------------------------------------------------------
// Function: StrType overloaded constructor
///\brief Creates an StrType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {}
// Copy constructor: makes copy of the original StrType object
//--------------------------------------------------------------------------
// Function: StrType copy constructor
///\brief Copy constructor: makes a copy of the original StrType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const StrType& original ) : AtomType ( original ) {}
// Gets the string datatype of the specified dataset - will reimplement - BMR
//--------------------------------------------------------------------------
// Function: EnumType overloaded constructor
///\brief Gets the string datatype of the specified dataset
///\param dataset - IN: Dataset that this string datatype associates with
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const DataSet& dataset ) : AtomType ()
{
// Calls C function H5Dget_type to get the id of the datatype
@@ -72,7 +123,14 @@ StrType::StrType( const DataSet& dataset ) : AtomType ()
}
}
// Retrieves the character set type of a string datatype.
//--------------------------------------------------------------------------
// Function: StrType::getCset
///\brief Retrieves the character set type of this string datatype.
///\return Character set type, which can be:
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_cset_t StrType::getCset() const
{
H5T_cset_t cset = H5Tget_cset( id );
@@ -85,7 +143,14 @@ H5T_cset_t StrType::getCset() const
return( cset );
}
// Sets character set to be used.
//--------------------------------------------------------------------------
// Function: StrType::setCset
///\brief Sets character set to be used.
///\param cset - IN: character set type
///\exception H5::DataTypeIException
/// \li \c H5T_CSET_ASCII (0) - Character set is US ASCII.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void StrType::setCset( H5T_cset_t cset ) const
{
herr_t ret_value = H5Tset_cset( id, cset );
@@ -96,7 +161,16 @@ void StrType::setCset( H5T_cset_t cset ) const
}
}
// Retrieves the string padding method for a string datatype.
//--------------------------------------------------------------------------
// Function: StrType::getCset
///\brief Retrieves the storage mechanism for of this string datatype.
///\return String storage mechanism, which can be:
/// \li \c H5T_STR_NULLTERM (0) - Null terminate (as C does)
/// \li \c H5T_STR_NULLPAD (0) - Pad with zeros
/// \li \c H5T_STR_SPACEPAD (0) - pad with spaces (as FORTRAN does)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_str_t StrType::getStrpad() const
{
H5T_str_t strpad = H5Tget_strpad( id );
@@ -110,7 +184,16 @@ H5T_str_t StrType::getStrpad() const
return( strpad );
}
// Defines the storage mechanism for character strings.
//--------------------------------------------------------------------------
// Function: StrType::setStrpad
///\brief Defines the storage mechanism for this string datatype.
///\param strpad - IN: String padding type
///\exception H5::DataTypeIException
///\par Description
/// For detail, please refer to the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetStrpad
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void StrType::setStrpad( H5T_str_t strpad ) const
{
herr_t ret_value = H5Tset_strpad( id, strpad );
@@ -121,7 +204,11 @@ void StrType::setStrpad( H5T_str_t strpad ) const
}
}
// This destructor terminates access to the datatype
//--------------------------------------------------------------------------
// Function: StrType destructor
///\brief Properly terminates access to this string datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::~StrType() {}
#ifndef H5_NO_NAMESPACE

View File

@@ -22,36 +22,40 @@ namespace H5 {
class H5_DLLCPP StrType : public AtomType {
public:
// default constructor
StrType();
// Creates a string type using a predefined type
StrType( const PredType& pred_type );
StrType(const PredType& pred_type);
// Creates a string type with specified length
StrType( const PredType& pred_type, const size_t size );
StrType(const size_t& size);
// Creates a string datatype using an existing id
StrType( const hid_t existing_id );
// Copy constructor - makes a copy of the original object
StrType( const StrType& original );
// Creates a string type with specified length - will be obsolete
StrType(const PredType& pred_type, const size_t size);
// Gets the string datatype of the specified dataset
StrType( const DataSet& dataset );
StrType(const DataSet& dataset);
// Retrieves the character set type of this string datatype.
H5T_cset_t getCset() const;
// Sets character set to be used.
void setCset( H5T_cset_t cset ) const;
void setCset(H5T_cset_t cset) const;
// Retrieves the string padding method for this string datatype.
H5T_str_t getStrpad() const;
// Defines the storage mechanism for character strings.
void setStrpad( H5T_str_t strpad ) const;
void setStrpad(H5T_str_t strpad) const;
// default constructor
StrType();
// Creates a string datatype using an existing id
StrType(const hid_t existing_id);
// Copy constructor - makes a copy of the original object
StrType(const StrType& original);
// Noop destructor.
virtual ~StrType();
};
#ifndef H5_NO_NAMESPACE

85
c++/src/H5VarLenType.cpp Normal file
View File

@@ -0,0 +1,85 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <string>
#include "H5Include.h"
#include "H5RefCounter.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5VarLenType.h"
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
//--------------------------------------------------------------------------
// Function: VarLenType default constructor
///\brief Default constructor: Creates a stub variable-length datatype.
//--------------------------------------------------------------------------
VarLenType::VarLenType() : DataType() {}
//--------------------------------------------------------------------------
// Function: VarLenType overloaded constructor
///\brief Creates an VarLenType object using an existing id.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {}
//--------------------------------------------------------------------------
// Function: VarLenType copy constructor
///\brief Copy constructor: makes a copy of the original VarLenType object.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const VarLenType& original) : DataType(original) {}
//--------------------------------------------------------------------------
// Function: VarLenType overloaded constructor
///\brief Creates a new variable-length datatype based on the specified
/// \a base_type.
///\param base_type - IN: Pointer to existing datatype
///\exception H5::DataTypeIException
// Description
// DataType passed by pointer to avoid clashing with copy
// constructor.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const DataType* base_type) : DataType()
{
id = H5Tvlen_create(base_type->getId());
if (id <= 0)
{
throw DataTypeIException("VarLenType constructor",
"H5Tvlen_create returns negative value");
}
}
//--------------------------------------------------------------------------
// Function: VarLenType destructor
///\brief Properly terminates access to this datatype.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::~VarLenType() {}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif

47
c++/src/H5VarLenType.h Normal file
View File

@@ -0,0 +1,47 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Class VarLenType inherits from DataType and provides wrappers for
// the HDF5 C's Variable-length Datatypes.
#ifndef _H5VarLenType_H
#define _H5VarLenType_H
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class H5_DLLCPP VarLenType : public DataType {
public:
// Constructor that creates a variable-length datatype based
// on the specified base type.
VarLenType(const DataType* base_type);
// Copy constructor - makes copy of the original object
VarLenType( const VarLenType& original );
// Default destructor
virtual ~VarLenType();
protected:
// Default constructor
VarLenType();
// Constructor that takes an existing id
VarLenType( const hid_t existing_id );
};
#ifndef H5_NO_NAMESPACE
}
#endif
#endif

View File

@@ -38,7 +38,8 @@ LIB_SRC=H5Exception.cpp H5RefCounter.cpp H5IdComponent.cpp H5Library.cpp
H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp H5DataType.cpp \
H5DataSpace.cpp H5AbstractDs.cpp H5AtomType.cpp H5PredType.cpp \
H5EnumType.cpp H5IntType.cpp H5FloatType.cpp H5StrType.cpp \
H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
H5ArrayType.cpp H5VarLenType.cpp H5CompType.cpp H5DataSet.cpp \
H5CommonFG.cpp H5Group.cpp H5File.cpp
LIB_OBJ=$(LIB_SRC:.cpp=.lo)
PUB_HDR=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
@@ -46,12 +47,15 @@ PUB_HDR=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h
H5DcreatProp.h H5DxferProp.h H5EnumType.h H5Exception.h H5FaccProp.h \
H5FcreatProp.h H5File.h H5FloatType.h H5Group.h H5IdComponent.h \
H5Include.h H5IntType.h H5Library.h H5Object.h H5PredType.h \
H5PropList.h H5RefCounter.h H5StrType.h
H5PropList.h H5RefCounter.h H5StrType.h H5CppDoc.h H5ArrayType.h \
H5VarLenType.h
PUB_PROGS=h5c++
ARFLAGS=rs
## h5c++ is generated during configure time. Remove it only when distclean.
DISTCLEAN=h5c++
## libhdf5.settings is generated during configure. Remove it when distclean.
DISTCLEAN=h5c++ libhdf5.settings
@CONCLUDE@

212
c++/src/cpp_doc_config Normal file
View File

@@ -0,0 +1,212 @@
# Doxyfile 1.3.7
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME =
PROJECT_NUMBER =
OUTPUT_DIRECTORY = C:\HDF\cpplus_RM
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT =
FILE_PATTERNS =
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH = ../examples
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER = header.html
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

View File

@@ -74,6 +74,7 @@ usage() {
echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -90,6 +91,17 @@ usage() {
exit 1
}
# Show the configuration summary of the library recorded in the
# libhdf5.settings file reside in the lib directory.
showconfigure()
{
cat ${libdir}/libhdf5.settings
status=$?
}
# Main
status=0
if test "$#" = "0"; then
# No parameters specified, issue usage statement and exit.
usage
@@ -164,6 +176,10 @@ for arg in $@ ; do
-show)
SHOW="echo"
;;
-showconfig)
showconfigure
exit $status
;;
-help)
usage
;;

322
c++/src/header.html Normal file
View File

@@ -0,0 +1,322 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="header_files/filelist.xml">
<link rel=Edit-Time-Data href="header_files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Main Page</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Randy Ribler</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>Randy Ribler</o:LastAuthor>
<o:Revision>6</o:Revision>
<o:TotalTime>16</o:TotalTime>
<o:Created>2004-07-23T05:34:00Z</o:Created>
<o:LastSaved>2004-07-23T06:03:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>5</o:Words>
<o:Characters>32</o:Characters>
<o:Company>LC</o:Company>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>36</o:CharactersWithSpaces>
<o:Version>10.2625</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<link rel=Stylesheet type="text/css" media=all href=doxygen.css>
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-believe-normal-left:yes;}
h1
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
text-align:center;
mso-pagination:widow-orphan;
mso-outline-level:1;
font-size:24.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:#252E78;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:#3D2185;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
address
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
font-style:italic;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
p.formuladsp, li.formuladsp, div.formuladsp
{mso-style-name:formuladsp;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
text-align:center;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.mdtable, li.mdtable, div.mdtable
{mso-style-name:mdtable;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
background:#F4F4FB;
border:none;
mso-border-alt:solid #868686 .75pt;
padding:0in;
mso-padding-alt:0in 0in 0in 0in;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.mdrow, li.mdrow, div.mdrow
{mso-style-name:mdrow;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.mdescleft, li.mdescleft, div.mdescleft
{mso-style-name:mdescleft;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
background:#FAFAFA;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-style:italic;}
p.mdescright, li.mdescright, div.mdescright
{mso-style-name:mdescright;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
background:#FAFAFA;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-style:italic;}
p.memitemleft, li.memitemleft, div.memitemleft
{mso-style-name:memitemleft;
margin:3.0pt;
mso-pagination:widow-orphan;
background:#FAFAFA;
border:none;
mso-border-top-alt:solid #E0E0E0 .75pt;
padding:0in;
mso-padding-alt:1.0pt 0in 0in 0in;
font-size:9.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.memitemright, li.memitemright, div.memitemright
{mso-style-name:memitemright;
margin:3.0pt;
mso-pagination:widow-orphan;
background:#FAFAFA;
border:none;
mso-border-top-alt:solid #E0E0E0 .75pt;
padding:0in;
mso-padding-alt:1.0pt 0in 0in 0in;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.search, li.search, div.search
{mso-style-name:search;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
font-weight:bold;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
table.MsoTableGrid
{mso-style-name:"Table Grid";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--><![if mso 9]>
<style>
p.MsoNormal
{margin-left:15.0pt;}
</style>
<![endif]><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="4098">
<o:colormru v:ext="edit" colors="#060"/>
<o:colormenu v:ext="edit" strokecolor="#060"/>
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link="#252E78" vlink="#3D2185" style='tab-interval:
.5in;margin-left:15.0pt;margin-right:15.0pt'>
<div class=Section1>
<p class=MsoNormal style='margin-top:0in;margin-right:15.0pt;margin-bottom:
0in;margin-left:15.0pt;margin-bottom:.0001pt'><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_s1026" type="#_x0000_t75" style='position:absolute;
left:0;text-align:left;margin-left:30pt;margin-top:9pt;width:72.75pt;height:57.75pt;
z-index:1'>
<v:imagedata src="header_files/image001.jpg" o:title="NCSAlogo"/>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;position:
absolute;z-index:1;left:0px;margin-left:40px;margin-top:12px;width:97px;
height:77px'><img width=97 height=77 src="header_files/image002.jpg" v:shapes="_x0000_s1026"></span><![endif]><span
style='mso-spacerun:yes'> </span><b style='mso-bidi-font-weight:normal'><span
style='font-size:22.0pt'><o:p></o:p></span></b></p>
<div align=center>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:103.45pt;border-collapse:collapse;border:none;mso-border-bottom-alt:
solid #006600 2.25pt;mso-yfti-tbllook:480;mso-padding-alt:0in 5.4pt 0in 5.4pt'>
<tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:29.25pt'>
<td width=443 valign=top style='width:332.6pt;border:none;border-bottom:solid #006600 2.25pt;
padding:0in 5.4pt 0in 5.4pt;height:29.25pt'>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
style='font-size:22.0pt'>HDF5 C++ API Reference Manual</span></b></p>
</td>
</tr>
</table>
</div>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

View File

@@ -0,0 +1,6 @@
<xml xmlns:o="urn:schemas-microsoft-com:office:office">
<o:MainFile HRef="../header.html"/>
<o:File HRef="image001.jpg"/>
<o:File HRef="image002.jpg"/>
<o:File HRef="filelist.xml"/>
</xml>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -22,6 +22,7 @@ srcdir=@srcdir@
hdf5_srcdir=$(top_srcdir)/src
hdf5_builddir=$(top_builddir)/src
hdf5_testdir=$(top_builddir)/test
## Add include directory to the cpp preprocessor flags; note that the
## hdf5/test directory is needed for the use of h5test
@@ -30,6 +31,7 @@ CPPFLAGS=-I. -I../src -I$(srcdir)/../src -I$(top_srcdir)/test -I$(hdf5_builddir)
## Add the C++ API library and the hdf5 library to the library lists
LIB=../src/libhdf5_cpp.la
LIBHDF5=$(hdf5_builddir)/libhdf5.la
LIBH5TEST=$(hdf5_testdir)/libh5test.la
LT_LINK_LIB=$(LT) --mode=link $(CXX) -rpath $(libdir)
@@ -49,12 +51,12 @@ TEST_SCRIPTS=
DISTCLEAN=$(TEST_PROGS_SRC:.cpp=.lo) $(TEST_PROGS_SRC:.cpp=.o)
$(TEST_PROGS): $(LIB) $(LIBHDF5)
$(TEST_PROGS): $(LIB) $(LIBHDF5) $(LIBH5TEST)
testhdf5: $(TEST_OBJ)
@$(LT_LINK_EXE) $(CFLAGS) -o $@ $(TESTHDF5_OBJ) $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS) $(DEFAULT_LIBS)
@$(LT_LINK_EXE) $(CFLAGS) -o $@ $(TESTHDF5_OBJ) $(LIB) $(LIBH5TEST) $(LIBHDF5) $(LDFLAGS) $(LIBS) $(DEFAULT_LIBS)
dsets: dsets.lo h5cpputil.lo
@$(LT_LINK_EXE) $(CFLAGS) -o $@ dsets.lo h5cpputil.lo $(hdf5_builddir)/../test/h5test.lo $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS) $(DEFAULT_LIBS)
@$(LT_LINK_EXE) $(CFLAGS) -o $@ dsets.lo h5cpputil.lo $(hdf5_builddir)/../test/h5test.lo $(LIB) $(LIBH5TEST) $(LIBHDF5) $(LDFLAGS) $(LIBS) $(DEFAULT_LIBS)
@CONCLUDE@

View File

@@ -32,9 +32,9 @@
#include <iostream>
#endif
#include "H5Cpp.h"
#include "h5test.h"
#include "testhdf5.h"
#include "h5test.h"
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
@@ -42,11 +42,7 @@ using namespace H5;
#include "h5cpputil.h"
const char *FILENAME[] = {
"dataset",
NULL
};
const string FILE1("dataset.h5");
#define DSET_DEFAULT_NAME "default"
#define DSET_CHUNKED_NAME "chunked"
#define DSET_SIMPLE_IO_NAME "simple_io"
@@ -56,9 +52,10 @@ const char *FILENAME[] = {
#define H5Z_FILTER_BOGUS 305
/* Local prototypes for filter functions */
// Local prototypes
static size_t bogus(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
void cleanup_dsets(void);
/*-------------------------------------------------------------------------
@@ -113,7 +110,7 @@ test_create( H5File& file)
(DSET_DEFAULT_NAME, PredType::NATIVE_DOUBLE, space));
// continuation here, that means no exception has been thrown
H5_FAILED();
cout << " Library allowed overwrite of existing dataset." << endl;
cerr << " Library allowed overwrite of existing dataset." << endl;
goto error;
}
catch (FileIException E ) // catching invalid creating dataset
@@ -136,7 +133,7 @@ test_create( H5File& file)
dataset = new DataSet (file.openDataSet( "does_not_exist" ));
// continuation here, that means no exception has been thrown
H5_FAILED();
cout << " Opened a non-existent dataset." << endl;
cerr << " Opened a non-existent dataset." << endl;
goto error;
}
catch (FileIException E ) // catching creating non-existent dataset
@@ -203,8 +200,8 @@ check_values (hsize_t i, hsize_t j, int apoint, int acheck)
if (apoint != acheck)
{
H5_FAILED();
cout << " Read different values than written.\n" << endl;
cout << " At index " << (unsigned long)i << "," <<
cerr << " Read different values than written.\n" << endl;
cerr << " At index " << (unsigned long)i << "," <<
(unsigned long)j << endl;
return -1;
}
@@ -353,14 +350,14 @@ test_tconv( H5File& file)
in[4*i+3]!=out[4*i+0])
{
H5_FAILED();
cout << " Read with byte order conversion failed." << endl;
cerr << " Read with byte order conversion failed." << endl;
goto error;
}
}
delete [] out;
delete [] in;
cout << " PASSED" << endl;
cerr << " PASSED" << endl;
return 0;
} // end try
@@ -493,8 +490,8 @@ test_compression(H5File& file)
for (j=0; j<size[1]; j++) {
if (0!=check[i][j]) {
H5_FAILED();
cout << " Read a non-zero value." << endl;
cout << " At index " << (unsigned long)i << "," <<
cerr << " Read a non-zero value." << endl;
cerr << " At index " << (unsigned long)i << "," <<
(unsigned long)j << endl;
goto error;
}
@@ -620,12 +617,12 @@ test_compression(H5File& file)
if (points[hs_offset[0]+i][hs_offset[1]+j] !=
check[hs_offset[0]+i][hs_offset[1]+j]) {
H5_FAILED();
cout << " Read different values than written.\n" << endl;
cout << " At index " << (unsigned long)(hs_offset[0]+i) <<
cerr << " Read different values than written.\n" << endl;
cerr << " At index " << (unsigned long)(hs_offset[0]+i) <<
"," << (unsigned long)(hs_offset[1]+j) << endl;
cout << " At original: " << (int)points[hs_offset[0]+i][hs_offset[1]+j] << endl;
cout << " At returned: " << (int)check[hs_offset[0]+i][hs_offset[1]+j] << endl;
cerr << " At original: " << (int)points[hs_offset[0]+i][hs_offset[1]+j] << endl;
cerr << " At returned: " << (int)check[hs_offset[0]+i][hs_offset[1]+j] << endl;
goto error;
}
}
@@ -638,7 +635,7 @@ test_compression(H5File& file)
#else
TESTING("deflate filter");
SKIPPED();
cout << not_supported << endl;
cerr << not_supported << endl;
#endif
/*----------------------------------------------------------------------
@@ -750,7 +747,7 @@ test_multiopen (H5File& file)
if (cur_size[0]!=tmp_size[0])
{
H5_FAILED();
cout << " Got " << (int)tmp_size[0] << " instead of "
cerr << " Got " << (int)tmp_size[0] << " instead of "
<< (int)cur_size[0] << "!" << endl;
delete space;
goto error;
@@ -845,7 +842,7 @@ test_types(H5File& file)
// catch exceptions thrown in try block of bitfield_1
catch (Exception E) {
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
@@ -866,7 +863,7 @@ test_types(H5File& file)
try { dset->write (buf, type); }
catch(DataSetIException E)
{
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
delete dset;
goto error;
@@ -876,7 +873,7 @@ test_types(H5File& file)
// catch exceptions thrown in try block of bitfield_2
catch (Exception E) {
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
@@ -908,12 +905,12 @@ test_types(H5File& file)
// catch exceptions thrown in try block of opaque_1
catch (DataSetIException E) {
delete optype;
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
catch (Exception E) {
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
@@ -943,12 +940,12 @@ test_types(H5File& file)
} //end try block of opaque_2
catch (DataSetIException E) {
delete optype;
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
catch (Exception E) {
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
@@ -958,7 +955,7 @@ test_types(H5File& file)
} // end top try block
catch (Exception E) { // Group and DataType exceptions
cout << "Failure in " << E.getFuncName() << " - "
cerr << "Failure in " << E.getFuncName() << " - "
<< E.getDetailMsg() << endl;
goto error;
}
@@ -995,9 +992,6 @@ main(void)
hid_t fapl_id;
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
char filename[1024];
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
int nerrors=0; // keep track of number of failures occurr
try
{
@@ -1010,9 +1004,9 @@ main(void)
// list object to pass in H5File::H5File
FileAccPropList fapl(fapl_id);
H5File file( filename, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
H5File file(FILE1, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
/* Cause the library to emit initial messages */
// Cause the library to emit initial messages
Group grp = file.createGroup( "emit diagnostics", 0);
grp.setComment( ".", "Causes diagnostic messages to be emitted");
@@ -1032,10 +1026,31 @@ main(void)
{
return(test_report(nerrors, string(" Dataset")));
}
/* use C test utility routine to clean up data files */
h5_cleanup(FILENAME, fapl_id);
/* print out dsets test results */
// Clean up data file
cleanup_dsets();
// Print out dsets test results
cerr << endl << endl;
return(test_report(nerrors, string(" Dataset")));
}
/*-------------------------------------------------------------------------
* Function: cleanup_dsets
*
* Purpose: Cleanup temporary test files
*
* Return: none
*
* Programmer: (use C version)
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
cleanup_dsets(void)
{
remove(FILE1.c_str());
} /* cleanup_dsets */

View File

@@ -31,8 +31,8 @@
using namespace std;
#endif
#include "h5cpputil.h"
#include "h5test.h"
#include "h5cpputil.h"
/*-------------------------------------------------------------------------
* Function: test_report
@@ -58,16 +58,17 @@ int test_report( int nerrors, const string& testname )
{
nerrors = MAX(1, nerrors);
if (1 == nerrors)
cout << "***** " << nerrors << testname
cerr << "***** " << nerrors << testname
<< " TEST FAILED! *****" << endl;
else
cout << "***** " << nerrors << testname
cerr << "***** " << nerrors << testname
<< " TESTS FAILED! *****" << endl;
return 1;
}
else
{
cout << "All" << testname << " tests passed." << endl;
cerr << "All" << testname << " tests passed." << endl;
return 0;
}
}

View File

@@ -25,8 +25,27 @@
#ifndef H5_NO_STD
int test_report (int, const std::string&);
using std::cerr;
using std::endl;
#else
int test_report (int, const string&);
#endif
template <class Type1, class Type2>
void verify_val(Type1 x, Type2 value, const char* where, int line, const char* file_name)
{
if (GetTestVerbosity()>=VERBO_HI)
{
cerr << " Call to routine: " << where << " at line " << line
<< " in " << file_name << " had value " << x << endl;
}
if (x != value)
{
cerr << "*** UNEXPECTED VALUE from " << where << " should be "
<< value << ", but is " << x << " at line " << line
<< " in " << file_name << endl;
H5Eprint (stdout);
}
}
#endif

View File

@@ -35,288 +35,54 @@
***************************************************************************/
#ifdef __MWERKS__
#include <console.h>
#endif /* __MWERKS__ */
#include <stdarg.h>
#define MAXNUMOFTESTS 30
#define HDF5_TEST_MASTER
/* Internal Variables */
static int Index = 0;
/* Global variables */
int num_errs = 0;
int Verbosity;
// Use C version of the header file testhdf5.h instead of re-coding it
#include "testhdf5.h"
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif /* !H5_NO_NAMESPACE */
#include "h5cpputil.h"
struct TestStruct {
int NumErrors;
char Description[64];
int SkipFlag;
char Name[16];
void (*Call) (void);
void (*Cleanup) (void);
} Test[MAXNUMOFTESTS];
static void InitTest(const char *, void (*) (void), void (*) (void), const char *TheDescr);
static void usage(void);
static void InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr)
{
if (Index >= MAXNUMOFTESTS) {
print_func("Uh-oh, too many tests added, increase MAXNUMOFTEST!\n");
exit(-1);
}
HDstrcpy(Test[Index].Description, TheDescr);
HDstrcpy(Test[Index].Name, TheName);
Test[Index].Call = TheCall;
Test[Index].Cleanup = Cleanup;
Test[Index].NumErrors = -1;
Test[Index].SkipFlag = 0;
Index++;
}
static void
usage(void)
{
print_func("Usage: testhdf5 [-v[erbose] (l[ow]|m[edium]|h[igh]|0-10)] \n");
print_func(" [-[e]x[clude] name+] \n");
print_func(" [-o[nly] name+] \n");
print_func(" [-b[egin] name] \n");
print_func(" [-s[ummary]] \n");
print_func(" [-c[leanoff]] \n");
print_func(" [-n[ocaching]] \n");
print_func(" [-h[elp]] \n");
print_func("\n\n");
print_func("verbose controls the amount of information displayed\n");
print_func("exclude to exclude tests by name\n");
print_func("only to name tests which should be run\n");
print_func("begin start at the name of the test givin\n");
print_func("summary prints a summary of test results at the end\n");
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
print_func("nocaching do not turn on low-level DD caching\n");
print_func("help print out this information\n");
print_func("\n\n");
print_func("This program currently tests the following: \n\n");
print_func("%16s %s\n", "Name", "Description");
print_func("%16s %s\n", "----", "-----------");
for (int i = 0; i < Index; i++)
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
print_func("\n\n");
}
/*
* This routine is designed to provide equivalent functionality to 'printf'
* and allow easy replacement for environments which don't have stdin/stdout
* available. (i.e. Windows & the Mac)
*/
int
print_func(const char *format,...)
{
va_list arglist;
int ret_value;
va_start(arglist, format);
ret_value = vprintf(format, arglist);
va_end(arglist);
return ret_value;
}
int
main(int argc, char *argv[])
{
int CLLoop; /* Command Line Loop */
int Loop, Loop1;
int Summary = 0;
int CleanUp = 1;
int Cache = 1;
#ifdef __MWERKS__
argc = ccommand(&argv);
#endif /* __MWERKS__ */
#if !(defined MAC || defined __MWERKS__ || defined SYMANTEC_C)
/* Un-buffer the stdout and stderr */
setbuf(stderr, NULL);
setbuf(stdout, NULL);
#endif /* !(MAC || __MWERKS__ || SYMANTEC_C) */
/*
* Turn off automatic error reporting since we do it ourselves. Besides,
* half the functions this test calls are private, so automatic error
* reporting wouldn't do much good since it's triggered at the API layer.
*/
Exception::dontPrint();
/* Initialize testing framework */
TestInit(argv[0], NULL, NULL);
// testing file creation and opening in tfile.cpp
InitTest("file", test_file, cleanup_file, "File I/O Operations");
AddTest("file", test_file, cleanup_file, "File I/O Operations", NULL);
// testing dataspace functionalities in th5s.cpp
InitTest("h5s", test_h5s, cleanup_h5s, "Dataspaces");
AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL);
/* Comment out tests that are not done yet. - BMR, Feb 2001
InitTest("attr", test_attr, cleanup_attr, "Attributes");
InitTest("select", test_select, cleanup_select, "Selections");
InitTest("time", test_time, cleanup_time, "Time Datatypes");
InitTest("reference", test_reference, cleanup_reference, "References");
InitTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes");
InitTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings");
InitTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration");
InitTest("array", test_array, cleanup_array, "Array Datatypes");
InitTest("genprop", test_genprop, cleanup_genprop, "Generic Properties");
/* Comment out tests that are not done yet. - BMR, Feb 2001
AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL);
AddTest("select", test_select, cleanup_select, "Selections", NULL);
AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
AddTest("reference", test_reference, cleanup_reference, "References", NULL);
AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
AddTest("vlstrings", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL);
AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
Comment out tests that are not done yet */
Verbosity = 4; /* Default Verbosity is Low */
unsigned major, minor, release;
H5Library::getLibVersion( major, minor, release);
/* Display testing information */
TestInfo(argv[0]);
print_func("\nFor help use: testhdf5 -help\n");
print_func("Linked with hdf5 version %u.%u release %u\n",
(unsigned)major, (unsigned)minor, (unsigned)release);
/* Parse command line arguments */
TestParseCmdLine(argc,argv);
for (CLLoop = 1; CLLoop < argc; CLLoop++) {
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-verbose") == 0) ||
(HDstrcmp(argv[CLLoop], "-v") == 0))) {
if (argv[CLLoop + 1][0] == 'l')
Verbosity = 4;
else if (argv[CLLoop + 1][0] == 'm')
Verbosity = 6;
else if (argv[CLLoop + 1][0] == 'h')
Verbosity = 10;
else
Verbosity = atoi(argv[CLLoop + 1]);
}
/* Perform requested testing */
PerformTests();
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-summary") == 0) ||
(HDstrcmp(argv[CLLoop], "-s") == 0)))
Summary = 1;
/* Display test summary, if requested */
if (GetTestSummary())
TestSummary();
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-help") == 0) ||
(HDstrcmp(argv[CLLoop], "-h") == 0))) {
usage();
exit(0);
}
/* Clean up test files, if allowed */
if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP"))
TestCleanup();
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-cleanoff") == 0) ||
(HDstrcmp(argv[CLLoop], "-c") == 0)))
CleanUp = 0;
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-nocache") == 0) ||
(HDstrcmp(argv[CLLoop], "-n") == 0))) {
Cache = 0;
printf ("Cache = %d\n", Cache);
}
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-exclude") == 0) ||
(HDstrcmp(argv[CLLoop], "-x") == 0))) {
Loop = CLLoop + 1;
while ((Loop < argc) && (argv[Loop][0] != '-')) {
for (Loop1 = 0; Loop1 < Index; Loop1++)
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
Test[Loop1].SkipFlag = 1;
Loop++;
}
}
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-begin") == 0) ||
(HDstrcmp(argv[CLLoop], "-b") == 0))) {
Loop = CLLoop + 1;
while ((Loop < argc) && (argv[Loop][0] != '-')) {
for (Loop1 = 0; Loop1 < Index; Loop1++) {
if (HDstrcmp(argv[Loop], Test[Loop1].Name) != 0)
Test[Loop1].SkipFlag = 1;
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
Loop1 = Index;
}
Loop++;
}
}
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-only") == 0) ||
(HDstrcmp(argv[CLLoop], "-o") == 0))) {
for (Loop = 0; Loop < Index; Loop++)
Test[Loop].SkipFlag = 1;
Loop = CLLoop + 1;
while ((Loop < argc) && (argv[Loop][0] != '-')) {
for (Loop1 = 0; Loop1 < Index; Loop1++)
if (HDstrcmp(argv[Loop], Test[Loop1].Name) == 0)
Test[Loop1].SkipFlag = 0;
Loop++;
}
}
}
#ifdef NOT_YET
if (Cache) /* turn on caching, unless we were instucted not to */
Hcache(CACHE_ALL_FILES, TRUE);
#endif /* NOT_YET */
for (Loop = 0; Loop < Index; Loop++) {
if (Test[Loop].SkipFlag) {
MESSAGE(2, ("Skipping -- %s \n", Test[Loop].Description));
} else {
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description,
Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
(*Test[Loop].Call) ();
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int) Test[Loop].NumErrors));
}
}
MESSAGE(2, ("\n\n"))
test_report(num_errs, string(" HDF5 Base"));
if (Summary) {
print_func("Summary of Test Results:\n");
print_func("Name of Test Errors Description of Test\n");
print_func("---------------- ------ --------------------------------------\n");
for (Loop = 0; Loop < Index; Loop++) {
if (Test[Loop].NumErrors == -1)
print_func("%16s %6s %s\n", Test[Loop].Name, "N/A", Test[Loop].Description);
else
print_func("%16s %6d %s\n", Test[Loop].Name, (int) Test[Loop].NumErrors,
Test[Loop].Description);
}
print_func("\n\n");
}
if (CleanUp && !getenv("HDF5_NOCLEANUP")) {
MESSAGE(2, ("\nCleaning Up temp files...\n\n"));
/* call individual cleanup routines in each source module */
for (Loop = 0; Loop < Index; Loop++)
if (!Test[Loop].SkipFlag && Test[Loop].Cleanup!=NULL)
(*Test[Loop].Cleanup) ();
}
return num_errs;
return (GetTestNumErrs());
}

View File

@@ -18,13 +18,12 @@
EXTERNAL ROUTINES/VARIABLES:
These routines are in the test directory of the C library:
h5_reset() -- in h5test.c, resets the library by closing it
h5_fileaccess() -- in h5test.c, returns a file access template
h5_fixname() -- in h5test.c, create a file name from a file base name
h5_cleanup() -- in h5test.c, cleanup temporary test files
***************************************************************************/
#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
@@ -33,6 +32,7 @@
#include "H5Cpp.h"
#include "testhdf5.h"
#include "h5cpputil.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
@@ -43,21 +43,24 @@ using namespace H5;
#define F1_LENGTH_SIZE sizeof(hsize_t)
#define F1_SYM_LEAF_K 4
#define F1_SYM_INTERN_K 16
#define FILE1 "tfile1.h5"
const char* FILE1 = "tfile1.h5";
#define F2_USERBLOCK_SIZE (hsize_t)512
#define F2_OFFSET_SIZE 8
#define F2_LENGTH_SIZE 8
#define F2_SYM_LEAF_K 8
#define F2_SYM_INTERN_K 32
#define FILE2 "tfile2.h5"
const char* FILE2 = "tfile2.h5";
#define F3_USERBLOCK_SIZE (hsize_t)0
#define F3_OFFSET_SIZE F2_OFFSET_SIZE
#define F3_LENGTH_SIZE F2_LENGTH_SIZE
#define F3_SYM_LEAF_K F2_SYM_LEAF_K
#define F3_SYM_INTERN_K F2_SYM_INTERN_K
#define FILE3 "tfile3.h5"
const char* FILE3 = "tfile3.h5";
#define KB 1024
const char* FILE4 = "tfile4.h5";
/*-------------------------------------------------------------------------
@@ -88,46 +91,47 @@ test_file_create(void)
remove(FILE1);
try {
H5File* fid1 = new H5File (FILE1, H5F_ACC_EXCL);
H5File* file1 = new H5File (FILE1, H5F_ACC_EXCL);
/*
* try to create the same file with H5F_ACC_TRUNC. This should fail
* because fid1 is the same file and is currently open.
* because file1 is the same file and is currently open.
*/
try {
H5File fid2 (FILE1, H5F_ACC_TRUNC); // should throw E
H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
// Should FAIL but didn't - BMR (Note 1): a macro, with a diff
// name, that skips the comparison b/w the 1st & 2nd args would
// be more appropriate, but VERIFY can be used for now - Mar 13, 01
// also, more text about what is testing would be better.
VERIFY(fid2.getId(), FAIL, "H5File constructor");
VERIFY(file2.getId(), FAIL, "H5File constructor");
}
catch( FileIException E ) {} // do nothing, FAIL expected
// Close file fid1
delete fid1;
// Close file file1
delete file1;
/*
* Try again with H5F_ACC_EXCL. This should fail because the file already
* exists from the previous steps.
*/
try {
fid1 = new H5File( FILE1, H5F_ACC_EXCL ); // should throw E
VERIFY(fid1->getId(), FAIL, "H5File constructor");
file1 = new H5File( FILE1, H5F_ACC_EXCL ); // should throw E
VERIFY(file1->getId(), FAIL, "H5File constructor");
}
catch( FileIException E ) {} // do nothing, FAIL expected
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
fid1 = new H5File (FILE1, H5F_ACC_TRUNC);
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
/*
* Try to truncate first file again. This should fail because fid1 is the
* Try to truncate first file again. This should fail because file1 is the
* same file and is currently open.
*/
try {
H5File fid2 (FILE1, H5F_ACC_TRUNC); // should throw E
VERIFY(fid2.getId(), FAIL, "H5File constructor");
H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E
VERIFY(file2.getId(), FAIL, "H5File constructor");
}
catch( FileIException E ) {} // do nothing, FAIL expected
@@ -136,13 +140,13 @@ test_file_create(void)
* exists.
*/
try {
H5File fid3 (FILE1, H5F_ACC_EXCL); // should throw E
VERIFY(fid3.getId(), FAIL, "H5File constructor");
H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E
VERIFY(file3.getId(), FAIL, "H5File constructor");
}
catch( FileIException E ) {} // do nothing, FAIL expected
/* Get the file-creation template */
FileCreatPropList tmpl1 = fid1->getCreatePlist();
FileCreatPropList tmpl1 = file1->getCreatePlist();
hsize_t ublock = tmpl1.getUserblock();
VERIFY(ublock, F1_USERBLOCK_SIZE, "FileCreatPropList::getUserblock");
@@ -166,7 +170,7 @@ test_file_create(void)
// caught in the catch block
/* Close first file */
delete fid1;
delete file1;
}
catch( PropListIException E ) {
CHECK(FAIL, FAIL, E.getCFuncName());
@@ -189,13 +193,13 @@ test_file_create(void)
* Try to create second file, with non-standard file-creation template
* params.
*/
H5File fid2( FILE2, H5F_ACC_TRUNC, *tmpl1 );
H5File file2( FILE2, H5F_ACC_TRUNC, *tmpl1 );
/* Release file-creation template */
delete tmpl1;
/* Get the file-creation template */
tmpl1 = new FileCreatPropList (fid2.getCreatePlist());
tmpl1 = new FileCreatPropList (file2.getCreatePlist());
/* Get the file-creation parameters */
hsize_t ublock = tmpl1->getUserblock();
@@ -230,10 +234,10 @@ test_file_create(void)
* Try to create second file, with non-standard file-creation template
* params
*/
H5File fid3( FILE3, H5F_ACC_TRUNC, tmpl2 );
H5File file3( FILE3, H5F_ACC_TRUNC, tmpl2 );
/* Get the file-creation template */
tmpl1 = new FileCreatPropList (fid3.getCreatePlist());
tmpl1 = new FileCreatPropList (file3.getCreatePlist());
/* Get the file-creation parameters */
ublock = tmpl1->getUserblock();
@@ -279,10 +283,10 @@ test_file_open(void)
try {
/* Open first file */
H5File fid1 (FILE2, H5F_ACC_RDWR );
H5File file1 (FILE2, H5F_ACC_RDWR );
/* Get the file-creation template */
FileCreatPropList tmpl1 = fid1.getCreatePlist();
FileCreatPropList tmpl1 = file1.getCreatePlist();
/* Get the file-creation parameters */
hsize_t ublock = tmpl1.getUserblock();
@@ -309,6 +313,149 @@ test_file_open(void)
}
} /* test_file_open() */
/*-------------------------------------------------------------------------
* Function: test_file_size
*
* Purpose: Test file size.
*
* Return: None
*
* Programmer: Raymond Lu
* June, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static void
test_file_size(void)
{
/* Output message about test being performed */
MESSAGE(5, ("Testing File Size\n"));
hid_t fapl_id;
fapl_id = h5_fileaccess(); // in h5test.c, returns a file access template
try {
// Use the file access template id to create a file access prop.
// list object to pass in H5File::H5File
FileAccPropList fapl(fapl_id);
// Set to sec2 driver. Do we want to test other file drivers?
// They're not tested in C++.
// File drivers seem not implemented.
//fapl.setSec2();
// Create a file
H5File file4( FILE4, H5F_ACC_TRUNC, FileCreatPropList::DEFAULT, fapl);
// Get file size
hsize_t file_size = file4.getFileSize();
// Check if file size is reasonable. It's supposed to be 2KB now.
if(file_size<1*KB || file_size>4*KB)
CHECK(FAIL, FAIL, "H5File::getFileSize");
} // end of try block
catch( Exception E ) {
CHECK(FAIL, FAIL, E.getCFuncName());
}
// use C test utility routine to close property list.
H5Pclose(fapl_id);
} /* test_file_size() */
/*-------------------------------------------------------------------------
* Function: test_file_name
*
* Purpose: Test getting file's name.
*
* Return: None
*
* Programmer: Binh-Minh Ribler
* July, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
const int RANK = 2;
const int NX = 4;
const int NY = 5;
const string GROUPNAME ("group");
const string DSETNAME ("dataset");
const string ATTRNAME ("attribute");
const string DTYPENAME ("compound");
/* Compound datatype */
typedef struct s1_t {
unsigned int a;
float b;
} s1_t;
static void
test_file_name()
{
/* Output message about test being performed */
MESSAGE(5, ("Testing File Name\n"));
string file_name;
try {
// Create a file using default properties.
H5File file4(FILE4, H5F_ACC_TRUNC);
// Get file name from the file instance.
file_name = file4.getFileName();
verify_val(file_name, FILE4, "H5File::getFileName", __LINE__, __FILE__);
/* Create a group in the root group */
Group group(file4.createGroup(GROUPNAME, 0));
/* Get and verify file name */
file_name = group.getFileName();
verify_val(file_name, FILE4, "Group::getFileName", __LINE__, __FILE__);
/* Create the data space */
hsize_t dims[RANK] = {NX, NY};
DataSpace space(RANK, dims);
/* Create a new dataset */
DataSet dataset(file4.createDataSet (DSETNAME, PredType::NATIVE_INT, space));
/* Get and verify file name */
file_name = dataset.getFileName();
verify_val(file_name, FILE4, "DataSet::getFileName", __LINE__, __FILE__);
/* Create an attribute for the dataset */
Attribute attr(dataset.createAttribute(ATTRNAME, PredType::NATIVE_INT, space));
/* Get and verify file name */
file_name = attr.getFileName();
verify_val(file_name, FILE4, "Attribute::getFileName", __LINE__, __FILE__);
/* Create a compound datatype */
CompType comp_type (sizeof(s1_t));
/* Insert fields */
comp_type.insertMember("a", HOFFSET(s1_t, a), PredType::NATIVE_INT);
comp_type.insertMember("b", HOFFSET(s1_t, b), PredType::NATIVE_FLOAT);
/* Save it on file */
comp_type.commit(file4, DTYPENAME);
/* Get and verify file name */
comp_type.getFileName();
verify_val(file_name, FILE4, "CompType::getFileName", __LINE__, __FILE__);
} // end of try block
catch (Exception E) {
CHECK(FAIL, FAIL, E.getCFuncName());
}
} /* test_file_name() */
/*-------------------------------------------------------------------------
* Function: test_file
@@ -332,6 +479,8 @@ test_file(void)
test_file_create(); /* Test file creation (also creation templates) */
test_file_open(); /* Test file opening */
test_file_size(); /* Test file size */
test_file_name(); /* Test getting file's name */
} /* test_file() */
@@ -354,4 +503,5 @@ cleanup_file(void)
remove(FILE1);
remove(FILE2);
remove(FILE3);
remove(FILE4);
} /* cleanup_file */

View File

@@ -27,15 +27,15 @@
#include <iostream>
#endif
#include "H5Cpp.h"
#include "testhdf5.h"
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif /* !H5_NO_NAMESPACE */
#define TESTFILE "th5s.h5"
#define DATAFILE "th5s1.h5"
const char* TESTFILE = "th5s.h5";
const char* DATAFILE = "th5s1.h5";
/* 3-D dataset with fixed dimensions */
#define SPACE1_NAME "Space1"
@@ -77,7 +77,7 @@ struct space4_struct {
unsigned u;
float f;
char c2;
} space4_data={'v',987123,-3.14,'g'}; /* Test data for 4th dataspace */
} space4_data={'v',987123,(float)-3.14,'g'}; /* Test data for 4th dataspace */
/*-------------------------------------------------------------------------
*
@@ -203,7 +203,7 @@ test_h5s_basic(void)
// catch exception thrown by H5File constructor
catch( FileIException error ) {
CHECK_I(FAIL, error.getCFuncName());
cout << "***cannot open the pre-created H5S_MAX_RANK test file" <<
cerr << "***cannot open the pre-created H5S_MAX_RANK test file" <<
testfile << endl;
}
@@ -468,15 +468,14 @@ test_h5s_compound_scalar_read(void)
// Verify read data
if(HDmemcmp(&space4_data,&rdata,sizeof(struct space4_struct)))
{
cout << "scalar data different: space4_data.c1="
cerr << "scalar data different: space4_data.c1="
<< space4_data.c1 << ", read_data4.c1=" << rdata.c1 << endl;
cout << "scalar data different: space4_data.u="
cerr << "scalar data different: space4_data.u="
<< space4_data.u << ", read_data4.u=" << rdata.u << endl;
cout << "scalar data different: space4_data.f="
cerr << "scalar data different: space4_data.f="
<< space4_data.f << ", read_data4.f=" << rdata.f << endl;
cout << "scalar data different: space4_data.c1="
<< space4_data.c1 << ", read_data4.c1=" << rdata.c2 << endl;
num_errs++;
TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n",
space4_data.c1, rdata.c2);
} /* end if */
} // end of try block
catch (Exception error)

View File

@@ -28,13 +28,14 @@ CP=cp
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
PARALLEL=@PARALLEL@
RUNSERIAL=@RUNSERIAL@
RUNPARALLEL=@RUNPARALLEL@
RUNTEST=$(RUNSERIAL)
TRACE=:
## Installation points
prefix?=@prefix@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@

View File

@@ -36,7 +36,7 @@ TAGS: $(LIB_SRC)
##
tests: $(TEST_PROGS) $(TEST_PROGS_PARA) $(TEST_SCRIPTS) $(LIB)
check test _test: tests
@echo "===Tests begin `date`==="
@echo "===Tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="
@for test in $(TEST_PROGS) dummy; do \
if test $$test != dummy; then \
echo "============================"; \
@@ -87,7 +87,7 @@ check test _test: tests
fi; \
done; \
test $$test = dummy || false
@echo "===Tests ended `date`==="
@echo "===Tests in `echo ${PWD} | sed -e s:.*/::` ended `date`==="
@for d in X $(SUBDIRS); do \
if test $$d != X; then \
(set -x; cd $$d && $(MAKE) tests) || exit 1; \
@@ -145,7 +145,17 @@ install: $(AUX_LIB) $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $
done
@for f in X $(PUB_PROGS); do \
if test $$f != X; then \
($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
if test "X$(PARALLEL)" != "Xno"; then \
if test $$f = "h5cc"; then \
($(LT_INSTALL_PROG) $$f $(bindir)/h5pcc || exit 1); \
elif test $$f = "h5fc"; then \
($(LT_INSTALL_PROG) $$f $(bindir)/h5pfc || exit 1); \
else \
($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
else \
($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
fi; \
fi; \
done
@for d in X $(SUBDIRS); do \

Some files were not shown because too many files have changed in this diff Show More